Creating a resource
Resource creation. Resources can be of two types:
face_resource - Used for analytics cases with the «Face recognition» type (face)
plate_resource - Used for analytics cases with the «License plate recognition» type (license_plate)
Resources, in turn, belong to resource groups (see Create a resource group), which are then added to specific analytics cases.
POST/api/v1/analytics/filesHeaders | |||||||||
Authorization | Bearer token | ||||||||
Accept | application/json | ||||||||
X-Client | ios-cctv|android-cctv|thick-legal|web | ||||||||
X-UUID | unique device id |
Body | |||||||||
json |
JSON
| ||||||||
namerequired | string | Resource name | |||||||
imagerequired | binary | Resource image. Required when creating a resource of type «face_resource» | |||||||
bodyrequired | string | License plate number. Required when creating a resource of type «plate_resource» | |||||||
typerequired | string | Resource group type |
Response | |||||||||
201 | Returns the resource object | ||||||||
JSON
| |||||||||
401 | Authorization token not provided or invalid, see Obtaining a token | ||||||||
422 | Returns a JSON object with an error, see Validation | ||||||||
JSON
|
Example | |||||||||
JSON
|