Skip to main content
Skip table of contents

Renaming a camera. VMS Client API

Renaming a camera.

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

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

json

JSON
{
    "name": "new name"
}

cameraoptional

int

Camera identifier

namerequired

string

New camera name

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 POST 'https://vms.local/api/v1/cameras/{camera}/rename' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id' \
--header 'Content-Type: application/json \
--data-raw '{
    "name": "new name"
}'
JavaScript errors detected

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

If this problem persists, please contact our support.