Skip to main content
Skip table of contents

Add to favorites

Add a camera to the favorites list

POST/api/v1/cameras/{camera}/favorites

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

cameraoptional

int

Camera identifier to add to favorites

Response

200

Successful response

JSON
{
    "id": 787,
    "group_id": 100,
    "status": "inactive",
    "type": "media_server_v2",
    "start_at": "2022-03-16 17:25:44",
    "created_at": "2022-02-03 10:30:28",
    "billing_id": null,
    "pretty_name": "new name",
    "pretty_text": "Cameras",
    "short_address": "Cameras",
    "full_address": "Cameras",
    "lat": null,
    "lng": null,
    "azimuth": null,
    "streams": [
        {
            "id": 847,
            "type": "low",
            "camera_id": 787,
            "is_preview_from_server": true,
            "is_archive_from_server": null,
            "status": "inactive",
            "has_sound": false,
            "width": 320,
            "height": 240
        },
        {
            "id": 848,
            "type": "high",
            "camera_id": 787,
            "is_preview_from_server": true,
            "is_archive_from_server": null,
            "status": "inactive",
            "has_sound": false,
            "width": 1920,
            "height": 1080
        }
    ],
    "has_sound": false,
    "is_archive_recording": true,
    "is_bridge": false,
    "is_favorite": false,
    "user_status": "active",
    "name": "new name"
}
401

Authorization token not provided or invalid, see Obtaining a token

404

If the camera is already added or the user does not have access to it

Example

JSON
curl -k --location --request POST 'https://vms.local/api/v1/cameras/{camera}/favorites' \
--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.