Skip to main content
Skip table of contents

Create a resource group

Creating resource groups. Resource groups can have 2 types:

face_resource - Used for analytics cases with the «Face Recognition» type

plate_resource - Used for analytics cases with the «License Plate Recognition» type

POST/api/v1/analytics/groups

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"
}

namerequired

string

Group resource name

typerequired

string

Type of 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

201

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 POST 'https://vms.local/api/v1/analytics/groups' \
--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.