Getting a Device list through REST
search cancel

Getting a Device list through REST

book

Article ID: 129641

calendar_today

Updated On:

Products

CA Infrastructure Management CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

How can I get a device list and status  through REST 

Environment

CAPM 20.2, 21.2

Resolution

Do a "POST" against the following URL: 

 

http://<DA>:8581/rest/devices/manageable/filtered 

 

Where the "Body" has the following syntax



<FilterSelect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
   <Filter>
      <Device.ContactStatus type ="EQUAL">MANAGEMENT_LOST</Device.ContactStatus>
   </Filter>
   <Select use="exclude" isa="include">
     <Item use="exclude">
         <Name use="include"/> 
        <CreateTime use="include"/>
     </Item>
     <Device use="exclude"> 

        <PrimaryIPAddress use="include"/> 
        <ContactStatus use="include"/>
      </Device> 
  </Select>
</FilterSelect> 

Additional Information

Sometimes copy / paste can cause syntax errors in a REST client.  If syntax errors are received type out the following syntax and it should work