Create a device group
Create a device group with a name and a target filter. name must be unique per company — a conflicting name is rejected with 409; getDeviceGroups (GET /device-groups) lists the existing names. Build the target from getDeviceGroupFiltersOptions (GET /device-groups/filters-options); validateDeviceGroupTarget (POST /device-groups/validate-target) reports whether it is targetable and how many devices it matches, without creating anything. 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"] } }.