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

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

book

Article ID: 285929

calendar_today

Updated On:

Products

Carbon Black Cloud Endpoint Standard (formerly Cb Defense)

Issue/Introduction

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”

 

Environment

Endpoint Standard API Connector: All versions

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”