Remove Devices from Group (EA)
Removes one or more devices from a specified group by providing the group display name in the path and a list of device display names in the request body. The devices must already be part of the group. Requires admin permissions to run this API.
Important: Since you cannot leave a group with no devices, all devices from a group cannot be removed by this endpoint. Use the Delete Group (EA) endpoint (DELETE /api/v1/groups/{groupDisplayName}) to delete an existing group instead.
Note: This endpoint is currently in Early Availability.
Resource name: /api/v1/groups/{groupDisplayName}/removeDevices
Request Method: DELETE
Request parameters
| Parameter | Type | Description |
|---|---|---|
| groupDisplayName | string (path) | The display name of the group from which devices should be removed. |
| body | array of strings (JSON) | List of device display names to remove. Use the GET /devices method from the Devices Setup Resource Group to get device display names. |
Request example
[
"device-01",
"device-02"
]
cUrl Example
curl -X DELETE "https://<localhost>/api/v1/groups/MyGroup/removeDevices" \
-H 'Cookie: PHPSESSID=5f1a3je95qqrn5fj0k3hhv7foc' \
-H 'accept: */*' \
-H "Content-Type: application/json" \
-d '["device-01", "device-02"]'
Status codes
| Code | Description |
|---|---|
| 200 | Devices removed successfully |
| 400 | Invalid device names provided |
| 401 | Unauthorized |
| 403 | User does not have permission to modify the group |
| 404 | Group not found |
| 423 | Locked |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 503 | Service Unavailable |
Response parameters
| parameter | type | description |
|---|---|---|
| error | string | Top-level error message |
| description | string | Details about the nature of the failure |
| fieldErrors | array of FieldError | Specific validation issues with the request |
| field | string | The name of the field with the error |
| error | string | Description of the specific error encountered |
Response example success 200
"Devices removed successfully"
Response example failure 400
{
"error": "Invalid device names provided",
"description": "The following devices could not be found: [device-xyz]",
"fieldErrors": [
{
"field": "deviceNames",
"error": "device-xyz is not a valid device"
}
]
}