Skip to main content
Skip table of contents

Creating a private folder

Private folders can only be created for the camera tree.

They are needed to restrict access to cameras within a single element of the tree.

Folders can only be created in the leaf element of the tree.

The key for a folder must be unique within a single tree leaf.

POST/api/v1/billing/tree/folders/private

Headers

Accept

application/json

Body

json

JSON
{
    "key": "random_key",
    "external_id": "external_id_of_tree_element",
    "id": null
}

keyrequired

string

The key for the folder, which can be sent instead of id when creating a camera, if you need to add a camera to a folder

external_idrequired

string|int

The key for the tree element in which to create the folder

idrequired

int

ID of the tree element in which to create the folder

Response

201

Successful response

JSON
{
                "id": 15,
                "key": "random_key"
            }
422

Returns a JSON object with an error. Validation

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The reason for the error will be described here."
        ]
    }
}

Example

JSON
curl -k --location --request POST 'https://vms.local/api/v1/billing/tree/folders/private' \
--header 'Accept:application/json' \
--header 'Content-Type: application/json \
--data-raw '{
    "key": "random_key",
    "external_id": "external_id_of_tree_element",
    "id": null
}'
JavaScript errors detected

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

If this problem persists, please contact our support.