03-23-2021 12:25 AM - edited 03-24-2021 03:54 AM
The network devices have been deleted one by one by using the API.
- https://x.x.x.x:9060/ers/config/networkdevice/{id}
Complete registration test of many network devices at once by using Bulk API.
What I want is to delete the network devices registered in ISE using Bulk API.
According to the API guide, other commands that are supported in large quantities are also available.
- API Documentation > Network Device > Overview (https://x.x.x.x:9060/ers/sdk#_?)
- The Bulk section is showing only 'create' bulk operation however, all other operation which are bulk supported can be used in same way.?
In the case of endpoints, you can delete many endpoints at once with the Bulk API.
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns4:endpointBulkRequest operationType="Delete" resourceMediaType="vnd.com.cisco.ise.identity.endpoint.1.0+xml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns4="identity.ers.ise.cisco.com"> <idList> <id>c7c05220-a682-11e9-92cd-024294667a96</id> <id>c7c50d10-a682-11e9-92cd-024294667a96</id> </idList> </ns4:endpointBulkRequest> |
Using the endpoint deletion sample Bulk API, I wrote a bulk API that deletes many network devices, but an error remains.
- Network Device Bulk API (Delete)
Method : DELETE URL : https://xxx.xxx.xxx.xxx:9060/ers/config/networkdevice/bulk
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns8:networkDeviceBulkRequest operationType="delete" 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:resourcesList> <idList> <id>84989900-8b80-11eb-b9e8-d6b0eca942db</id> <id>849564b0-8b80-11eb-b9e8-d6b0eca942db</id> <id>84927e80-8b80-11eb-b9e8-d6b0eca942db</id> <id>84923060-8b80-11eb-b9e8-d6b0eca942db</id> <id>84923062-8b80-11eb-b9e8-d6b0eca942db</id> <id>84938ff2-8b80-11eb-b9e8-d6b0eca942db</id> <id>84925770-8b80-11eb-b9e8-d6b0eca942db</id> <id>84920952-8b80-11eb-b9e8-d6b0eca942db</id> <id>8492cca0-8b80-11eb-b9e8-d6b0eca942db</id> </idList> </ns8:resourcesList> </ns8:networkDeviceBulkRequest> |
Result - Status : 404 Not Found
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns3:ersResponse operation="DELETE-delete-networkdevice" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns3="ers.ise.cisco.com"> <link rel="related" href="https://xxx.xxx.xxx.xxx:9060/ers/config/networkdevice/bulk" type="application/xml"/> <messages> <message type="ERROR" code="Resource not found exception"> <title>The specified resource does not exist</title> </message> </messages> </ns3:ersResponse> |
Is it not possible to delete a network device using Bulk API?
Network devices don't support Bulk API?
How to delete a large number of Network Devices using Bulk API?
Solved! Go to Solution.
03-23-2021 05:18 AM
I suggest taking a peek at the online SDK if you have not already done so. <https://<pan ip>:9060/ers/sdk#>.
Network devices don't support Bulk APIs?
-AFAIK this is not supported as of 2.7. For bulk requests and network devices you can leverage the PUT operation to create several devices.
HTH!
03-23-2021 05:18 AM
I suggest taking a peek at the online SDK if you have not already done so. <https://<pan ip>:9060/ers/sdk#>.
Network devices don't support Bulk APIs?
-AFAIK this is not supported as of 2.7. For bulk requests and network devices you can leverage the PUT operation to create several devices.
HTH!
03-23-2021 08:58 AM
Mike is correct.
See https://developer.cisco.com/docs/identity-services-engine/3.0/#!bulk-operations/sending-bulk-request which uses PUT then GET for status but not DELETE.
You will need to iterate over your list of IDs with
DELETE https://xxx.xxx.xxx.xxx:9060/ers/config/networkdevice/{id}
as shown at https://developer.cisco.com/docs/identity-services-engine/3.0/#!network-device/delete
06-01-2023 01:10 PM
How quickly can we iterate through the list? I've tried sequentially and pausing at 30 seconds but both times our PSN's fell behind sync and the run time engine cause authentication outages. Thanks!
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: