Skip to main content
Skip table of contents

Creating a mark. VMS Client API

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

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

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 for which the mark should be created

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 POST 'https://vms.local/api/v1/cameras/{camera}/marks' \
--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": "My mark",
    "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.