/api/public/v1/devices/{id}/drainingdevices.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.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
idpath | string (uuid) | Yes | Device id |
command_idbody | string (uuid) | Yes | Client-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. |
drainingbody | boolean | Yes | true 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.
| Field | Type | Always present | Description |
|---|---|---|---|
| data | object | Yes | |
| data.device_id | string (uuid) | Yes | |
| data.draining | boolean | Yes | true while new sessions are paused |
| data.draining_since | string (date-time) | No | |
| data.running | integer | Yes | Browsers still running on the machine (they continue) (min -9007199254740991, max 9007199254740991) |
| data.revision | integer | Yes | (min -9007199254740991, max 9007199254740991) |
| correlation_id | string (uuid) | Yes | |
| replayed | boolean | No | true when this command_id was already applied and the stored receipt came back |
Errors
| Code | HTTP | Retryable |
|---|---|---|
| UNAUTHENTICATED | 401 | No |
| FORBIDDEN | 403 | No |
| RATE_LIMITED | 429 | Yes |
| VALIDATION_FAILED | 422 | No |
| NOT_FOUND | 404 | No |
| CONFLICT | 409 | No |
| OUTCOME_UNKNOWN | 202 | Yes |
| CAPACITY_UNAVAILABLE | 503 | Yes |
| DEPENDENCY_UNAVAILABLE | 503 | Yes |
| UNKNOWN | 500 | No |
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