05-11-2020 05:49 AM
Hi,
I can get bulk create, bulk delete and bulk status (using a bulk ID) to work, but not bulk read. What is the format? ISE documentation on SDK is bad, nothing on bulk read and delete.
I tried operationType="get", and operationType="read", with PUT and GET. Nothing works. I use ISE 2.4.
Thanks for your help! Below is what I used in POSTMAN.
ACCEPT: application/vnd.com.cisco.ise.network.networkdevicebulkrequest.1.1+xml
Content-Type: application/vnd.com.cisco.ise.network.networkdevicebulkrequest.1.1+xml
GET https://<ise-server-ip>:9060/ers/config/networkdevice/bulk
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns8:networkDeviceBulkRequest operationType="get" resourceMediaType="vnd.com.cisco.ise.network.networkdevice.1.1+xml" xmlns:ns6="sxp.ers.ise.cisco.com" xmlns:ns5="trustsec.ers.ise.cisco.com" xmlns:ns8="network.ers.ise.cisco.com" xmlns:ns7="anc.ers.ise.cisco.com" xmlns:ers="ers.ise.cisco.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns4="identity.ers.ise.cisco.com">
:ns8="network.ers.ise.cisco.com" xmlns:ns7="anc.ers.ise.cisco.com" xmlns:ers="ers.ise.cisco.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns4="identity.ers.ise.cisco.com">
<idList>
<id>id_1</id>
<id>id_2</id>
</idList>
</ns8:networkDeviceBulkRequest>
Solved! Go to Solution.
05-12-2020 03:02 PM
I don't see anything about bulk read in the ERS documentation. The whole bulk concept is to allow you make additions, updates and deletions. They already have bulk read concept limited to 100 results per page.
From the ERS SDK on bulk operations:
"After a successful Bulk Request, The server responding with 202 + bulkid in the Location header. This bulkid can be used to fetch a Bulk Execution Status. The BulkStatus object holds for each item in the bulk request" a status entry which describe the execution status. The status is kept in the server for two hours and after that its deleted"
So you can do a GET request with the Bulk ID to monitor status of your bulk request.
05-11-2020 05:56 AM
Here is the error response message in postman, btw. Same for operationType="read", and operationType="get".
05-11-2020 03:24 PM
If you're trying to retrieve a list of the Network Devices, use the Get-All operation listed in the online API Reference Guide
GET https://<ip>:9060/ers/config/networkdevice
05-11-2020 04:11 PM
Thanks for the response. Yes, I was able to do what you said. I just wanted to see the difference that and the bulk read request.
Sounds like, I shouldn't bother using the bulk read then.
05-12-2020 02:49 PM
I haven't tested this with network devices and REST but you may need to adjust the results per query and then make multiple queries to get all the data. Last time I checked the max page size was 100:
https://<ip>:9060/ers/config/networkdevice?size=100
Once you do that query then you get the total count of how many elements there are and know how many pages to call up. If there were 280 network devices you would need to make 3 calls:
Original- https://<ip>:9060/ers/config/networkdevice?size=100
Page 2- https://<ip>:9060/ers/config/networkdevice?size=100&page=2
Page 3- https://<ip>:9060/ers/config/networkdevice?size=100&page=3
The default page size I think is 20, but I haven't checked in 2.6 or 2.7 to see if that has changed.
05-12-2020 02:54 PM
Thanks Paul. Like I communicated before, I got that (individual/non-bulk get) working like what you shared, but not the bulk read.
Do you have any success with a bulk read?
05-12-2020 03:02 PM
I don't see anything about bulk read in the ERS documentation. The whole bulk concept is to allow you make additions, updates and deletions. They already have bulk read concept limited to 100 results per page.
From the ERS SDK on bulk operations:
"After a successful Bulk Request, The server responding with 202 + bulkid in the Location header. This bulkid can be used to fetch a Bulk Execution Status. The BulkStatus object holds for each item in the bulk request" a status entry which describe the execution status. The status is kept in the server for two hours and after that its deleted"
So you can do a GET request with the Bulk ID to monitor status of your bulk request.
05-12-2020 03:06 PM
That sounds logical. I am moving on now :) Thanks.
09-19-2023 12:39 AM
@paul wrote:
I don't see anything about bulk read in the ERS documentation.
The first line in the bulk operations documentation states "Bulk request will allow client to send up to 500 (or 5000 for 'id type') CRUD operations in a single request.".
CRUD includes Read... just lazy documentation on Cisco's part?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide