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"
Using older api.
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.