Skip to main content
Skip table of contents

Tag update

Tag update

PUT api/admin/v1/tags/{tag}

Method parameters

int tag, unique identifier of the tag


string name, tag name


array attached_cameras, array of camera IDs to which the current tag should be added


array detached_cameras, array of camera IDs from which the current tag should be removed

200 OK

Returns the tag object

JSON
{
    "id": 59,
    "name": "1",
    "created_at": "2021-08-16 20:18:07",
    "updated_at": "2022-06-22 10:08:00"
}

401 Unauthorized

Authorization token is not provided or is invalid. Obtaining a token

402 Payment Required

License error

422 Unprocessable Entity

Returns a JSON object with an error. Validation

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The reason for the error will be described here"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domainapi/admin/v1/tags/{tag}' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "tag": 0,
    "name": "string",
    "attached_cameras": [],
    "detached_cameras": []
}'
PHP
PHP
$data = array (
  'tag' => 0,
  'name' => 'string',
  'attached_cameras' => 
  array (
  ),
  'detached_cameras' => 
  array (
  ),
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'PUT',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domainapi/admin/v1/tags/{tag}', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.