How to get a list of retired items through REST

Document ID : KB000124322
Last Modified Date : 10/01/2019
Show Technical Document Details
Introduction:
How can I get a list of retired items through REST?
Environment:
Any version of CAPM
Instructions:
  1. In a REST client, change the method to "POST"
    • Content-type and Charset should be¬†application/xml; charset=UTF-8
  2. Use the following URL: http://DA:8581/rest/devices/filtered
  3. Add the following syntax to the Body:
<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">

<Filter>
<And><Lifecycle.State type="EQUAL">RETIRED</Lifecycle.State><Not><Item.Name type="CONTAINS">DataAggregator:</Item.Name></Not><Not><Item.Name type="CONTAINS">DataCollector</Item.Name></Not></And>
</Filter>

<Select use="exclude" isa="exclude" relatesto="exclude">
<Item use="exclude">
<Name use="include"/>
</Item>
<Device use="exclude">
<PrimaryIPAddress use="include"/>
</Device>
<Lifecycle use="exclude">
<State use="include"/>
</Lifecycle>
</Select>
</FilterSelect>

After running this REST call you should see a list of "retired" items on the data aggregator.
Additional Information:
When copying and pasting into a REST client you can sometimes pick up special characters that will cause the REST call to fail.  The above syntax has been verified to work, so if you receive errors you should type out the syntax rather than copy and paste and it will work fine