Skip to main content
POST
Get devices, optionally narrowed by a filter
Key: Read Scope: Company

Authorizations

Authorization
string
header
required

Use your Primo API key in the Authorization header as Bearer <API_KEY>.

Body

application/json
filter
object

One entry per criterion, keyed by the key returned by the filter catalog (GET /devices/filters-options) — a native key such as platform, availableStatus, assigned or mdmStatuses.online, or a custom field id. Every value is a clause { operationType, values } — never a bare value, never an operator like eq. availableStatus takes only IN_USE, IN_STOCK, RETIRED. Whether a device has an owner is assigned (true or false), never a status. Enrollment is mdmStatus: MDM_ON is enrolled, MDM_OFF, MISSING_AGENT, READY_ZTD and MDM_ON_IN_ANOTHER_MDM are the other states. A device name, serial number or IMEI goes in search. The device type is not a criterion: read type on the returned devices. An unknown key is rejected with 400 rather than ignored. Illustrative filters: devices free to hand out → {"availableStatus":{"operationType":"INCLUDE","values":["IN_STOCK"]},"assigned":{"operationType":"INCLUDE","values":[false]}}; devices offline for a week or more → {"mdmStatuses.online":{"operationType":"INCLUDE","values":["INACTIVE"]}}; macOS in use → {"platform":{"operationType":"INCLUDE","values":["MACOS"]},"availableStatus":{"operationType":"INCLUDE","values":["IN_USE"]}}; devices in use to encrypt, as the company metrics count them → {"availableStatus":{"operationType":"INCLUDE","values":["IN_USE"]},"mdmStatuses.encryption":{"operationType":"INCLUDE","values":["NOT_ENCRYPTED"]},"withMdmIssue":{"operationType":"INCLUDE","values":[true]}} (encrypted is what the disk inventory reports, not the compliance verdict); a custom field value → {"<customFieldId>":{"operationType":"INCLUDE","values":["<optionId>"]}}.

matchAny
boolean

When true, a device matching ANY clause is returned (OR). Omitted or false means every clause must match (AND).

Free-text search over device name, serial number, IMEI, owner and custom field values.

page
integer
default:1
Required range: 1 <= x <= 9007199254740991
perPage
integer
default:25

Devices per page (default 25, max 100). Device payloads are large — keep pages small.

Required range: 1 <= x <= 100

Response

default - application/json
data
object[]
required
pagination
object
required