Create Device Group (EA)
Creates a new device group based on the provided group display name and associated device display names.Requires admin permissions to run this API.
Note: This endpoint is currently in Early Availability.
Resource name: /api/v1/groups
Request Method: POST
Request Parameters:
| Parameter | Type | Description |
|---|---|---|
| displayName
mandatory |
string | Display name of the group. |
Request Body:
| Parameter | Type | Description |
|---|---|---|
| devices | array of strings | One or more device display names (list - comma separated) associated with the group. To get a device's display name, use GET /devices method from the Devices Setup |
Request Example:
{
"device1",
"device2"}
cUrl Example:
curl -X 'POST' \
'https://<localhost>/afa/api/v1/groups?displayName=device' \
-H 'Cookie: PHPSESSID=5f1a3je95qqrn5fj0k3hhv7foc' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '[
"device1",
"device2"
]'
Status Codes:
| Code | Description |
|---|---|
| 200 | Group created successfully. |
| 400 | Invalid group details provided. |
| 401 | Unauthorized. |
| 403 | User does not have permission to create groups. |
| 404 | Not Found. |
| 423 | Locked. |
| 429 | Too Many Requests. |
| 500 | Internal Server Error. |
| 503 | Service Unavailable. |
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| message | string | Response message indicating success or error details. |
Response Example Success 200:
{"message": "Group created successfully." }
Response Example Failure 400:
{
"error": "string",
"description": "string",
"fieldErrors": [
{
"field": "string",
"error": "string"
}
]
}