Skip to main content

Bulk Disable Devices

POST /clients/{client_id}/devices/disable

Disable collection on one or more devices. Disabled devices stop all data collection but continue sending lightweight heartbeats to poll for config changes. This operation is idempotent -- disabling an already-disabled device is treated as a success. Optionally set log_shipping_enabled alongside the state change.

Path Parameters

ParameterTypeDescription
client_idstring (uuid)Unique identifier for the client organization

Request Body

FieldTypeRequiredDescription
device_idsstring (uuid)[]YesList of device IDs to disable
log_shipping_enabledbooleanNoIf 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"
]
}

Response

Returns a BulkDeviceControlResult with status 200 OK.

All succeeded

{
"succeeded": [
"f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"a9b8c7d6-e5f4-3210-fedc-ba9876543210"
],
"failed": []
}

Business Rules

  • Atomic per-device -- one failure does not roll back others.
  • Disabling an already-disabled device succeeds (idempotent).
  • Deleted devices cannot be disabled (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/disable" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"device_ids": [
"f1e2d3c4-b5a6-7890-abcd-ef1234567890"
]
}'

Error Responses

StatusDescription
400Invalid request (empty device_ids, client is deleted)
401Authentication required
403Insufficient permissions for this client
404Client not found
500Server error