Skip to main content
Skip table of contents

Updating a mark

After updating a mark, a push notification with the type mark_updated will be sent to user.ID channel.

PUT/api/v1/cameras/{camera}/marks/{mark}

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

json

JSON
{
    "title": "My mark",
    "form": "2000-01-01T00:00:00Z"
}

cameraoptional

int

Camera identifier to which the mark belongs

markoptional

int

Mark identifier that needs to be updated

titlerequired

string

Mark name

fromrequired

date

Start date of the mark

torequired

date

End date of the mark

Response

200

Successful response

JSON
{
    "id": 1779416,
    "type": "mark",
    "type_pretty": "Mark",
    "title": "My mark",
    "can_delete": false,
    "from": "2020-00-00T00:00:00Z",
    "to": null,
    "camera_id": 894,
    "created_at": "2020-00-00T00:00:00Z",
    "updated_at": "2020-00-00 00:00:003"
}
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 PUT 'https://vms.local/api/v1/cameras/{camera}/marks/{mark}' \
--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 '{
    "title": "Моя метка",
    "form": "2000-01-01T00:00:00Z"
}'
JavaScript errors detected

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

If this problem persists, please contact our support.