Skip to main content
Skip table of contents

Archive download. VMS Admin API

Archive download

The download link for the archive will be sent via Websockets push with the type archive_generated

GET /api/admin/v1/cameras/{camera}/archive/link

Method parameters

int camera, unique identifier of the camera


string from, date from which the archive will be generated


string to, date until which the archive will be generated

200 OK

Successful response

JSON
{
    "preview": "rtsp://labMS3.vms.local:5554/live/4e577e3c-449c-420d-b6b1-42d842edc0e8/?token=token",
    "is_need_token": true
}

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-domain/api/admin/v1/cameras/{camera}/archive/link' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "camera": 0,
    "from": "string",
    "to": "string"
}'
PHP
PHP
$data = array (
  'camera' => 0,
  'from' => 'string',
  'to' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/cameras/{camera}/archive/link', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.