How to query the CAPM to get a list of devices and the current device state.
search cancel

How to query the CAPM to get a list of devices and the current device state.

book

Article ID: 114727

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration

Issue/Introduction

How to use the DA REST api to query the database for a list of devices and the current state of the devices in CAPM.

This customer was looking for a way to query the CAPM database using the REST api to get a list of devices and the current state of the devices for automation purposes.

Environment

CAPM 3.6

Resolution

Use the following URL with the http "POST" method.

http://DAHost:8581/rest/devices/manageable/filtered 

Use the following XML post body with the above URL.


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