Skip to main content
Skip table of contents

Create a resource

Creat a resource

Creating a resource. face_resource - Used for analytics cases with the type "Face recognition" (face-recognition) plate_resource - Used for analytics cases with the type "License plate recognition" (licplate-recognition) Resources, in turn, belong to resource groups VMS Admin/Admin Analytics/Resource Groups/Create Resource Group, which are already added to specific analytics cases

JSON
{
    "name": "name",
    "image": "binary",
    "type": "face_resource",
    "analytic_case_event_uuid": "a535e9ff-8f37-4da7-bcec-0760190c0f86",
    "properties": [
        {
            "type": "full_name",
            "value": "Ivanov Ivan"
        }
    ]
}

POST /api/admin/v1/analytics/files

Parameters

string name, Name of the resource


binary image, Resource image.


string type, Resource group type

201 Created

Returns a resource object

JSON
null

401 Unauthorized

Authorization token not sent or not valid

422 Unprocessable Entity

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"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/analytics/files' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "name": "string",
    "image": "binary",
    "type": "string"
}'
PHP
PHP
$data = array (
  'name' => 'string',
  'image' => 'binary',
  'type' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/analytics/files', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.