You are attempting to delete all devices associated with a specific domain, such as the Default Domain, but your initial queries return errors like 413 Too many items requested or do not capture all expected devices.
All supported NetOps Performance Management releases
This issue occurs when you request a large volume of entities that exceeds the REST API's item count threshold or when you use a specific endpoint (like manageable) that excludes non-SNMP manageable devices.
To ensure you capture all devices within a domain for deletion, follow these steps:
You use the standard filtered devices endpoint to capture all devices, not just those that are SNMP manageable.
http://<DA>:8581/rest/devices/filteredExample XML Filter (filter.xml):
<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
<Filter>
<And>
<IPDomainMember.IPDomainID type="EQUAL">2</IPDomainMember.IPDomainID>
</And>
</Filter>
</FilterSelect>
You run the following command to retrieve the full list of device IDs:
Review this command before running it.
curl -X POST -u ####:#### -H "Content-Type: application/xml" -d @filter.xml http://<DA>:8581/rest/devices/filtered|xmllint --format - | egrep "<ID"
Once you have the full list of IDs, you proceed with the DELETE calls. If your list is extremely large, you batch these deletions into smaller groups. This practice prevents system timeouts and avoids "Too many items" errors during the processing of the request.
NOTE: