CAPM API Questions (OData)
search cancel

CAPM API Questions (OData)

book

Article ID: 204607

calendar_today

Updated On:

Products

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

Issue/Introduction

Trying to use the API to pull certain relevant data from CAPM. Have looked at the documentation but there are still a few things I can't find and don't fully understand the outputs I am getting.


Want a query to show me the device and times that were under 100% for any time with this hour.

Environment

Release : 20.2

Component : IM Reporting / Admin / Configuration

Resolution

This query will show the device name and time(s) that were under 100% for any time with an hour. Timestamp was the field you were looking for. All timestamps in odata queries and their results are in UNIX time format and currently there is no way to format into regular date format in odata or its output. However there is a way to convert the time in excel when using .csv format.

This query will show the devices and availability percent for the last 30 days.

http://<DA_SYSTEM>:8581/odata/api/availabilitymfs?&resolution=RATE&period=1m&$format=text/csv&$top=2000&$skip=0&top=100&$orderby=Timestamp desc&$expand=device&$select=ID,DeviceItemID,Timestamp,im_Availability,device/Name,device/PrimaryIPAddress&$filter=((im_Availability lt 100))