Skip to main content
POST/api/public/v1/devices/{id}/draining

devices.draining.set

devices.draining.set — Pause (draining: true) or resume new sessions on a machine: while paused no person, run or app opens a browser there (start returns CAPACITY_UNAVAILABLE with reason draining; automatic placement picks another machine); browsers already running continue.

Capability: device.manageCommand (idempotent)MCP tool: devices_draining_set
View as Markdown

Parameters

NameTypeRequiredDescription
idpathstring (uuid)YesDevice id
command_idbodystring (uuid)YesClient-generated UUID for this command. Send the same id (and body) again to get the stored receipt instead of a second change; a different body under the same id is CONFLICT.
drainingbodybooleanYestrue pauses new sessions on this machine (running ones continue); false resumes

Examples

curl -X POST "https://browlix.com/api/public/v1/devices/<id>/draining" \
  -H "Authorization: Bearer $BROWLIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command_id":"<uuid>","draining":true}'

Response

201 with { data, replayed: false, correlation_id } the first time; 200 with replayed: true when the same command_id and body come again.

FieldTypeAlways presentDescription
dataobjectYes
data.device_idstring (uuid)Yes
data.drainingbooleanYestrue while new sessions are paused
data.draining_sincestring (date-time)No
data.runningintegerYesBrowsers still running on the machine (they continue) (min -9007199254740991, max 9007199254740991)
data.revisionintegerYes(min -9007199254740991, max 9007199254740991)
correlation_idstring (uuid)Yes
replayedbooleanNotrue when this command_id was already applied and the stored receipt came back

New fields can appear at any time; ignore the ones you do not know.

Errors

CodeHTTPRetryable
UNAUTHENTICATED401No
FORBIDDEN403No
RATE_LIMITED429Yes
VALIDATION_FAILED422No
NOT_FOUND404No
CONFLICT409No
OUTCOME_UNKNOWN202Yes
CAPACITY_UNAVAILABLE503Yes
DEPENDENCY_UNAVAILABLE503Yes
UNKNOWN500No

Every error code and when to retry

All operations

Using an AI agent?

Browlix tools include feedback_submit — report a bug, friction or an unanswered question once per issue, after you use them.

How feedback works