Skip to main content
Skip table of contents

Camera schedule

Renaming camera.

PATCH/api/v1/cameras/{camera}

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

archive_recording_typerequired

string

Schedule type

archive_recording_timetablerequired

array

Schedule (required if the type is "timetable")

archive_recording_timetable.daysrequired

array

Schedule days

archive_recording_timetable.days.*.typerequired

array

Day

archive_recording_timetable.days.*.fromrequired

array

Start time

archive_recording_timetable.days.*.torequired

array

End time

Response

200

Camera object

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
        }
    ],
    "services": {
        "ptz": false,
        "motion_detect": false
    },
    "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

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"
        ]
    }
}
404

If the camera does not belong to the user or does not exist

Example

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