/api/public/v1/devices/{id}/adspower-apidevices.adspower_api.set
Turn the machine's AdsPower-compatible Local API (manifest adspower-8.9.23, loopback only, Browlix API key on every call) on or off.
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. |
enabledbody | boolean | Yes | Serve the AdsPower-compatible Local API on this machine (loopback only) |
portbody | integer | No | Local port; AdsPower's default is 50325 (min 1024, max 65535) Default: `50325`. |
expected_revisionbody | integer | No | Device revision from devices.list; a stale value is CONFLICT (min 1, max 9007199254740991) |
Examples
curl -X POST "https://browlix.com/api/public/v1/devices/<id>/adspower-api" \
-H "Authorization: Bearer $BROWLIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"command_id":"<uuid>","enabled":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.
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 |
| DEPENDENCY_UNAVAILABLE | 503 | Yes |
| UNKNOWN | 500 | No |
