26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Deactivate edge device

POST  /api/v1/billing/devices/deactivate

Deactivates the device on the controller and deletes it along with its cameras. For a Camera (Agent) device, the camera is permanently deleted with all its streams and does not appear in the deleted cameras list, just as when an administrator or user deactivates a Camera (Agent) device.

JSON
{
    "uuid": "7a593d26-8cfd-47e9-8647-1fb18a36fedb",
    "leave_reserved": true
}

Method parameters

string uuid  required , Device UUID


bool leave_reserved, Flag indicating whether the device remains reserved after deletion

204  No Content

Successful response

422  Unprocessable Entity

Returns a JSON error object (including when a Bridge or Camera (Agent) device has the General affiliation mode: such a device cannot be deactivated until its cameras are removed from locations).
For more information, see General information > Validation.

JSON
{
    "message": "No informative message is provided here",
    "errors": {
        "any_key": [
            "The reason for the error is described here"
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/devices/deactivate' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "uuid": "string",
    "leave_reserved": true
}'
PHP
PHP
$data = array (
  'uuid' => 'string',
  'leave_reserved' => true,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/devices/deactivate', false, $context);