Skip to main content
Skip table of contents

Updating a resource group

Updating a resource group

PATCH/api/v1/analytics/groups/{analytic_group}

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": "name",
    "resources": [
        1,
        2
    ],
    "type": "face_resource"
}

analytic_groupoptional

int

Unique identifier of the resource group

namerequired

string

Name of the resource group

typerequired

string

Type of the resource group, see Basic Configurations

resourcesrequired

array

Array of resource IDs. IDs must be unique, and in the case of plate_resource, license plates should not be duplicated in the resources, see Creating a resource

Response

200

Returns the resource group object

JSON
{
    "id": 1,
    "name": "group",
    "type": "type",
    "type_pretty": "type_pretty",
    "uuid": "1251b744-b73c-11ec-8995-a3b0e5228375",
    "created_at": "2022-04-08 16:01:57",
    "updated_at": "2022-04-08 16:01:57",
    "files_count": 2
}
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 PATCH 'https://vms.local/api/v1/analytics/groups/{analytic_group}' \
--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": "name",
    "resources": [
        1,
        2
    ],
    "type": "face_resource"
}'
JavaScript errors detected

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

If this problem persists, please contact our support.