Skip to main content
POST
Check a device group target before creating the group
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
target
object
required

Device group target to validate. An object keyed by criterion key (from the /device-groups/filters-options catalog); each value is a clause { operationType: "INCLUDE" | "EXCLUDE", values: string[] }. Add top-level matchAny: true for OR across clauses.

Response

default - application/json
valid
boolean
required

Whether the target can be used to create or update a device group.

errors
string[]
required

Why the target is invalid — malformed clauses, or criteria that are not device-group-targetable.

matchedCount
integer
required

How many devices the target currently matches. 0 when the target is invalid.

Required range: -9007199254740991 <= x <= 9007199254740991