How to lookup APM Agents using the APM
search cancel

How to lookup APM Agents using the APM

book

Article ID: 275808

calendar_today

Updated On:

Products

DX Operational Intelligence

Issue/Introduction

Looking up APM Agents using DX SAAS API. Getting less agents returned than expected.

curl -XPOST https://<host>/oi/v2/api/maintenance/inventory/_search -H 'Authorization: Bearer <token>' -d '{"searchText": "", "size":"14", "source":"APM"}' -H  "Content-Type:application/json"

Cause

Using older api.

Resolution

Use the v3 api since v2 is redacted and will be removed at a later date.

 

https://<hostname>/oi/v3/api/inventory/_search

{"pageSize":100,"customFilter":{"and":{"expressions":[{"or":{"expressions":[{"fieldDescription":"Source","field":"sources","value":"APM","condition":"equals"}]}}]}},"sortCol":"name:asc","searchText":"","layerFilter":[<filter_name>"]}

 

Instead of 

https://<hostname>/oi/v2/api/maintenance/inventory/_search  will be decommissioned at a later date. 

The newer API is used with Monitored Inventory.