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:

Https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/performance-management/21-2/apis/data-aggregator-rest-webservices.html

See the section starting at:

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

Also:

https://knowledge.broadcom.com/external/article?articleId=35733

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


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>