Count devices for up to 20 filters in one call
Return only numbers: {"counts":{"<label>":<number>}}, one per labelled query. Use it for any how-many question about devices, one total or a breakdown (by MDM status, platform, availability, encryption, online state, custom field…) with one query per bucket, instead of calling getDevices once per bucket. A query takes the filter, matchAny and search of getDevices, keyed by the keys of getDeviceFilterCatalog, and counts what getDevices would return for it (pagination.totalElements): retired devices are left out unless the query has an availableStatus clause (INCLUDE keeps only the statuses it lists, EXCLUDE every other status, retired ones included), so the empty query {} counts every device not retired. An unknown criterion in any query rejects the whole call with 400, naming the label and the key. To list the devices behind a count, use getDevices. For the company headline KPIs (devices in use and in stock, MDM on or off, encryption, online) in one read, use getCompanyMetrics.
Authorizations
Use your Primo API key in the Authorization header as Bearer <API_KEY>.
Body
Up to 20 device queries, each under a label you choose (letters, digits, "_" or "-"), e.g. {"mdmOff":{"filter":{"mdmStatus":{"operationType":"INCLUDE","values":["MDM_OFF"]}}},"all":{}}. A query takes the filter, matchAny and search of getDevices, nothing else.
Response
The number of records matching each query, under the label the query was sent with