Threat Report: Exposing Malware in Linux-Based Multi-Cloud Environments | Download Now

Endpoint Standard API Connector: Endpoints report is only returning a maximum of 20 endpoints. How does one increase the limit?

Endpoint Standard API Connector: Endpoints report is only returning a maximum of 20 endpoints. How does one increase the limit?

Environment

Endpoint Standard API Connector: All versions

Objective

The following code block is only returning 20 endpoints, though 1000's qualify:
end_date=$(date -d ‘-2 week’ ‘+%Y-%m-%dT%H:%M:%S.000Z’)
date_range=‘{ “criteria”: { “last_contact_time”: { “start”: “2017-08-27T00:00:00.000Z”, “end”: “‘$end_date’” } } }'

curl -H X-Auth-Token:$token -H “Content-Type: application/json” -s -k -X POST -d “$date_range” “$url/appservices/v6/orgs/$orgkey/devices/_search”

 

Resolution

20 sensors is the default maxmimum. To override the default, add the "rows" qualifier such as  ->   "rows": 10000 
For example using the above code:
end_date=$(date -d ‘-2 week’ ‘+%Y-%m-%dT%H:%M:%S.000Z’)
date_range='{ "criteria": { "last_contact_time": { "start": "2017-08-27T00:00:00.000Z", "end": "'$end_date'" }, "rows": 10000  }'

curl -H X-Auth-Token:$token -H “Content-Type: application/json” -s -k -X POST -d “$date_range” “$url/appservices/v6/orgs/$orgkey/devices/_search”


 

Related Content


Was this article helpful? Yes No
No ratings
Article Information
Author:
Creation Date:
‎09-23-2021
Views:
238
Contributors