Create a device group
Create a device group with a name and a target filter. name must be unique per company — always GET /device-groups first to list existing groups and avoid a duplicate (a conflicting name is rejected with 409). Preview the target with POST /devices/preview-filter to confirm it matches the intended devices before creating. Build the target from the GET /device-groups/filters-options catalog; an invalid target is rejected with 400.
Authorizations
Use your Primo API key in the Authorization header as Bearer <API_KEY>.
Body
Device group name
1Device-group target filter. An object keyed by criterion key (from the /device-groups/filters-options catalog); each value is a clause { operationType: "INCLUDE" | "EXCLUDE", values: string[] } — never a bare array. Add top-level matchAny: true for OR across clauses. Example: { "platform": { "operationType": "INCLUDE", "values": ["MACOS"] } }.
Response
Device group ID
Device group name
Device-group target filter. An object keyed by criterion key (from the /device-groups/filters-options catalog); each value is a clause { operationType: "INCLUDE" | "EXCLUDE", values: string[] } — never a bare array. Add top-level matchAny: true for OR across clauses. Example: { "platform": { "operationType": "INCLUDE", "values": ["MACOS"] } }.