GET /api/admin/v1/cameras/{camera}/preview
int camera, unique camera identifier
int
boolean download, whether to download the preview
boolean
string date, start of the archive
string
boolean type, stream type
200 OK
OK
Successful response
{ "preview": "rtsp://labMS3.vms.local:5554/live/4e577e3c-449c-420d-b6b1-42d842edc0e8/?token=token", "is_need_token": true }
401 Unauthorized
Unauthorized
Authorization token is not provided or is invalid. Obtaining a token
402 Payment Required
Payment Required
License error
422 Unprocessable Entity
Unprocessable Entity
Returns a JSON object with an error. Validation
{ "message": "There will be no informative message here", "errors": { "any_key": [ "The reason for the error will be described here" ] } }
curl -k --request POST \ --url 'https://your-domain/api/admin/v1/cameras/{camera}/preview' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "camera": 0, "download": "boolean", "date": "string", "type": "boolean" }'
$data = array ( 'camera' => 0, 'download' => 'boolean', 'date' => 'string', 'type' => 'boolean', ); $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}/preview', false, $context);
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.