Skip to main content
Skip table of contents

Camera update

The camera is searched by mac or by external_id.

PATCH/api/v1/billing/cameras

Headers

Accept

application/json

Body

json

JSON
{
    "external_id": "bd0a951f-40a2-4edf-b213-bcd90ff5273d",
    "mac": "12:12:12:12:12:11",
    "new_mac": "12:12:12:12:12:12",
    "serial_number": "111111111111",
    "service": "8MP",
    "profile": "[1,0]",
    "name": "Camera 1",
    "group_type": "private",
    "group_id": 16,
    "group_external_id": 16,
    "folder_key": 123,
    "folder_id": 3,
    "is_user_owner": false,
    "latitude": -28.776933731993793,
    "longitude": 76.65771489519997,
    "archive_storage_days": 5,
    "onvif_credentials": {
        "login": "login",
        "password": "password"
    }
}

external_idrequired

string

current external_id of the camera

macrequired

string

current mac address of the camera

new_macrequired

string

new mac address of the camera

serial_numberrequired

string

new camera serial number

servicerequired

string

camera profile, used for applying templates

profilerequired

array

add

namerequired

string

camera name

group_typerequired

string

camera group type

group_idrequired

int

id of the tree element in which to create the camera

group_external_idrequired

string|int

key of the tree element in which to create the camera

folder_idrequired

int

id of the private folder where the camera should be placed

folder_keyrequired

string|int

the key of the private folder in which the camera should be placed

is_user_ownerrequired

boolean

flag that determines whether the camera belongs to the userй

latituderequired

double

latitude at which the camera is located

longituderequired

double

longitude at which the camera is located

archive_storage_daysrequired

int

number of days the archive is stored on the camera

onvif_credentialsrequired

array

cedentials for accessing the camera via onvif

Response

201

Successful response

JSON
{
    "id": 26,
    "status": "empty",
    "name": "Camera 1",
    "is_archive_recording": true,
    "archive_storage_days": 5,
    "group_type": "private",
    "is_user_owner": false,
    "is_need_replace": false,
    "latitude": -28.776933731993793,
    "longitude": 76.65771489519997,
    "network_device": {
        "mac": "11:11:11:11:11:11",
        "serial_number": "12345678"
    },
    "folder": {
        "id": 3,
        "key": "123"
    }
}
422

Returns a JSON object with an error.

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

Example

JSON
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/cameras' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "external_id": "string",
    "mac": "string",
    "new_mac": "string",
    "serial_number": "string",
    "service": "string",
    "profile": [],
    "name": "string",
    "group_type": "string",
    "group_id": 0,
    "group_external_id": "string|int",
    "folder_id": 0,
    "folder_key": "string|int",
    "is_user_owner": true,
    "latitude": 0,
    "longitude": 0,
    "archive_storage_days": 0,
    "onvif_credentials": []
}'
JavaScript errors detected

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

If this problem persists, please contact our support.