Skip to main content
Skip table of contents

Preview from multiple cameras

The logic for obtaining previews is exactly the same as in the request described, see Camera preview

If it fails or it's not possible to provide a preview, there will be no preview information in the response for that camera.

GET/api/v1/cameras/previews

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

idsrequired

array

List of camera IDs for which previews are needed

daterequired

datetime

Date for archive preview

downloadrequired

string

Flag to add the «Content-Disposition» header

Response

200

The preview link is available in the «preview» field, and the «is_need_token» field is used for Flussonic to add the user's bearer token (only used in web)

JSON
{"preview" : "http://domain.com/somepreview?token=sometoken", "is_need_token": false}
401

Authorization token not provided or invalid, see Obtaining a token

403

If access to a camera is temporarily blocked, a 403 error will be returned with the same response body as a 422 error

422

Returns a JSON object with an error, see Validation

JSON
{
    "message": "There won't be any informative message here",
    "errors": {
        "any_key": [
            "Here the error cause will be described"
        ]
    }
}

Example

JSON
curl -k --location --request GET 'https://vms.local/api/v1/cameras/previews?ids=array&date=datetime&download=string' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id'
JavaScript errors detected

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

If this problem persists, please contact our support.