Skip to main content
Skip table of contents

Getting multiple cameras

This request is used in widgets on mobile devices to retrieve camera objects based on a list of IDs.

If IDs are sent that do not belong to the user, no error will occur, and those IDs will be excluded from the response.

GET/api/v1/cameras/shows

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

idsrequired

array

Array of camera IDs, maximum of 25 IDs can be sent

Response

200

Returns cameras on the i-th pagination page

JSON
[
    {
        "id": 894,
        "group_id": 190,
        "status": "inactive",
        "type": "media_server_v2",
        "start_at": "",
        "created_at": "2022-04-05 12:34:38",
        "billing_id": null,
        "pretty_name": "Camera 1",
        "pretty_text": "Cameras",
        "short_address": "Cameras",
        "full_address": "Cameras",
        "lat": null,
        "lng": null,
        "azimuth": null,
        "streams": [
            {
                "id": 923,
                "type": "high",
                "camera_id": 894,
                "is_preview_from_server": true,
                "is_archive_from_server": null,
                "status": "inactive",
                "has_sound": false,
                "width": null,
                "height": null
            }
        ],
        "services": {
            "ptz": false,
            "motion_detect": true
        },
        "has_sound": false,
        "archive_ranges": [],
        "is_archive_recording": true,
        "is_bridge": false,
        "is_favorite": true,
        "user_status": "active",
        "name": "Camera 1"
    }
]
401

Authorization token not provided or invalid, see Obtaining a token

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/shows?ids=array' \
--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.