26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Get camera archive URLs

POST  /api/v1/billing/cameras/archive

Theexpired_atfield indicates when the link token expires.

This request can include a user's integration token. If the user has access to the camera, a link is generated.

JSON
{
    "cameras": [
        {
            "uuid": "uuid",
            "stream_type": "high",
            "from": "2000-01-01T00:00:00Z",
            "to": "2000-01-01T00:10:00Z"
        }
    ],
    "ttl": "100",
    "audio_only": true
}

Method parameters

array cameras  required , an array of camera UUIDs for which links are requested. Each camera object has the following properties:

  • uuid– UUID of the camera for which to generate a link. This field is required

  • stream_type– video stream type. If omitted or set to camera the link is generated for the camera; if a stream type is provided, the link is generated for that specific camera stream.

  • from– archive start date

  • to– archive end date


int ttl, Link lifetime in seconds


bool audio_only, Include an audio track in the archive (optional). If omitted, the archive has no audio track.

200  OK

Successful response with all parameters

[
    {
        "uuid": "uuid",
        "url": "http://127.0.0.1/test",
        "expired_at": "2000-01-01T00:00:00.000000Z"
    }
]

401  Unauthorized

If an authorization token is provided and is invalid

cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/cameras/archive' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "cameras": [],
    "ttl": 0,
    "audio_only": true
}'
PHP
PHP
$data = array (
  'cameras' => 
  array (
  ),
  'ttl' => 0,
  'audio_only' => 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/cameras/archive', false, $context);