Bulk Enable Devices
POST /clients/{client_id}/devices/enable
Enable collection on one or more devices. This operation is idempotent -- enabling an already-enabled device is treated as a success. Optionally set log_shipping_enabled alongside the state change.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
client_id | string (uuid) | Unique identifier for the client organization |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
device_ids | string (uuid)[] | Yes | List of device IDs to enable |
log_shipping_enabled | boolean | No | If provided, set log shipping alongside the state change. If omitted, log shipping is not changed. |
Example Request Body
{
"device_ids": [
"f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"a9b8c7d6-e5f4-3210-fedc-ba9876543210"
],
"log_shipping_enabled": true
}
Response
Returns a BulkDeviceControlResult with status 200 OK.
All succeeded
{
"succeeded": [
"f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"a9b8c7d6-e5f4-3210-fedc-ba9876543210"
],
"failed": []
}
Partial success
{
"succeeded": [
"f1e2d3c4-b5a6-7890-abcd-ef1234567890"
],
"failed": [
{
"id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"error": "Device not found"
}
]
}
Business Rules
- Atomic per-device -- one failure does not roll back others.
- Enabling an already-enabled device succeeds (idempotent).
- Deleted devices cannot be enabled (reported in
failed). - If the client is
deleted, the entire operation is rejected (400). - One audit log entry created per affected device.
- Scales to 10,000 devices.
Example Request
curl -X POST "https://api.example.com/v2/clients/aa7cf840-9ca9-46a3-9778-9015d6580d50/devices/enable" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"device_ids": [
"f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"a9b8c7d6-e5f4-3210-fedc-ba9876543210"
]
}'
Error Responses
| Status | Description |
|---|---|
| 400 | Invalid request (empty device_ids, client is deleted) |
| 401 | Authentication required |
| 403 | Insufficient permissions for this client |
| 404 | Client not found |
| 500 | Server error |
Related Endpoints
- Update Device Controls - Update a single device
- Bulk Disable Devices - Disable collection on multiple devices
- Bulk Delete Devices - Mark multiple devices as deleted
- Collection Control Audit Log - Audit trail of all collection control changes