Listing retired Data Aggregator devices via REST
search cancel

Listing retired Data Aggregator devices via REST

book

Article ID: 254546

calendar_today

Updated On:

Products

DX NetOps CA Performance Management - Usage and Administration

Issue/Introduction

Listing retired Data Aggregator devices via REST

Environment

DX Netops Performance Management.

Resolution

To get RETIRED Data Aggregator devices we can use a tunneled get request.

A) For additional detail on tunneled get requests see:

Data Aggregator REST Web Services

See the section starting at:

Filter on Attributes in the XSD Schema for Data-Driven REST Web Services

Also:

Using Get tunneling with REST to filter results from the Data Aggregator

See the devices rest endpoint on the DA for different attributes that can be used:

https://<DA>:8582/rest/devices/documentation

B) Listing retired devices by Lifecycle.TimeStamp last changed:

URL: http(s)://<DAorProxy>:PORT/rest/devices/fitered:
REST Method: POST
Content-Type: application/xml

BODY:

<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
   <Filter>
        <And>
            <Lifecycle.State type="EQUAL">RETIRED</Lifecycle.State>
            <Lifecycle.TimeStamp type="COMPARISONOPERATOR">EpochInMilliseconds</Lifecycle.TimeStamp>
        </And>
   </Filter>
   <Select use="exclude" isa="exclude">
      <Item use="exclude">
         <Name use="include"/>
      </Item>
      <Lifecycle use="include"/>
   </Select>
</FilterSelect>

Where:

COMPARISONOPERATOR= LESS, LESS_OR_EQUAL, GREATER, GREATER_OR_EQUAL, EQUAL

Where:

EpochInMilliseconds= unix timestamp in milliseconds, look for a website that converts useful time into this value.


Example:

Get anything retired before Fri Oct 21 10:28:09 2022 +0000

URL http://mydahost:8581/rest/devices/filtered

Body:

<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
   <Filter>
        <And>
            <Lifecycle.State type="EQUAL">RETIRED</Lifecycle.State>
            <Lifecycle.TimeStamp type="LESS">1666348089000</Lifecycle.TimeStamp>
        </And>
   </Filter>
   <Select use="exclude" isa="exclude">
      <Item use="exclude">
         <Name use="include"/>
      </Item>
      <Lifecycle use="include"/>
   </Select>
</FilterSelect>

Result:

<DeviceList>
    <Device version="1.0.0">
        <ID>11080</ID>
        <Lifecycle version="1.0.0">
            <TimeStamp>Fri Oct 21 10:28:08 2022 +0000</TimeStamp>
            <State>RETIRED</State>
        </Lifecycle>
        <Item version="1.0.0">
            <Name>mydevicenamehere</Name>
        </Item>
    </Device>
</DeviceList>

Additional Information

See the following on deleting multiple Data Aggregator devices at once:

How to delete multiple devices in CA Performance Management (CAPM) Data Aggregator via REST API

Note that deleting devices removes all historical data for that device and any associated components