26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Update edge device

PATCH  /api/v1/billing/devices/update

JSON
{
    "uuid": "uuid",
    "name": "name",
    "streams": [
        {
            "id": 1,
            "is_cloud_archive_enabled": true,
            "cloud_archive_storage_days": 5
        },
        {
            "id": 2,
            "is_cloud_archive_enabled": false
        }
    ]
}

Method parameters

string uuid  required , Device identifier


string name, Device name


int max_cameras, Maximum number of cameras that can be added (Bridge devices only)


array streams, Camera video streams

object array

int streams.id, Stream identifier to update


201  Created

Successful response

JSON
{
    "id": 25,
    "serial_number": "sn",
    "type": "mediabridge",
    "mac": "mac",
    "name": "name",
    "version": "1.1.1.1",
    "created_at": "2000-00-00T00:00:00.000000Z",
    "last_updated_at": null,
    "is_online": true
}

422  Unprocessable Entity

Returns a JSON error object.

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 PATCH \
	--url 'https://your-domain/api/v1/billing/devices/update' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "uuid": "string",
    "name": "string",
    "max_cameras": 0,
    "streams": {
        "id": 0
    },
    "streams.id": "void",
    "stream.is_cloud_archive_enabled": "void",
    "stream": {
        "is_cloud_archive_enabled": true,
        "cloud_archive_storage_days": 0
    },
    "stream.cloud_archive_storage_days": "void"
}'
PHP
PHP
$data = array (
  'uuid' => 'string',
  'name' => 'string',
  'max_cameras' => 0,
  'streams' => 
  array (
    'id' => 0,
  ),
  'streams.id' => 'void',
  'stream.is_cloud_archive_enabled' => 'void',
  'stream' => 
  array (
    'is_cloud_archive_enabled' => true,
    'cloud_archive_storage_days' => 0,
  ),
  'stream.cloud_archive_storage_days' => 'void',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'PATCH',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/devices/update', false, $context);