Delete devices under a specific domain
search cancel

Delete devices under a specific domain

book

Article ID: 440346

calendar_today

Updated On:

Products

Network Observability CA Performance Management

Issue/Introduction

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.

Environment

All supported NetOps Performance Management releases

Cause

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.

Resolution

To ensure you capture all devices within a domain for deletion, follow these steps:

1. Identify Device IDs Using the Standard Endpoint

You use the standard filtered devices endpoint to capture all devices, not just those that are SNMP manageable.

  • Endpoint: http://<DA>:8581/rest/devices/filtered
  • Method: POST
  • Filter: You use an XML filter to target the specific Domain ID (e.g., Domain ID 2 for the Default Domain).

Example 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>

 

2. Retrieve the List

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"

 

3. Execute Batch Deletions

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:

  • Before you perform bulk deletions, you should verify you have a current backup of your system state.
  • If you require assistance with backing up the environment prior to these operations, please consult with Broadcom Support.