Record
Create a new record
To create a new human record, use the following method:
POST /cards/humans/
Tip
For vehicle records instead humans
use cars
.
The REQUEST BODY is required and contains application/json object with the following parameters.
Tip
* – means required parameters. 🆁 – read only.
Name |
Schema |
Description |
---|---|---|
|
boolean |
|
|
string |
Record name, up to 256 characters. |
|
string |
Extended description, up to 2048 characters. |
|
[integer] |
Array of the related Watch lists ID. |
|
<any-key> |
Meta data. |
|
date-time┃null |
Date-time information. |
|
date-time┃null |
Date-time information. |
|
{…} |
Serializer mixin that raises ValidationError if excess fields are presented. Can be used in nested serializers. |
Request example
Tip
This example is given for reference only, substitute your values in the corresponding fields. You may fill in only the required fields, and the others will be by default.
{
"active": false,
"name": "A",
"comment": "AAAAAA",
"watch_lists": [
0
],
"meta": {},
"active_after": "1970-01-01T00:00:00.000Z",
"active_before": "1970-01-01T00:00:00.000Z",
"disable_schedule": {
"monday": [
[
"A"
]
],
"tuesday": [
[
"A"
]
],
"wednesday": [
[
"A"
]
],
"thursday": [
[
"A"
]
],
"friday": [
[
"A"
]
],
"saturday": [
[
"A"
]
],
"sunday": [
[
"A"
]
]
}
}
For example, you may send these parameters:
{
"active": true,
"name": "Angelina Jolie",
"comment": "Миссис Смит",
"watch_lists": [
2
]
}
CURL example
curl -X POST "http://<findface-ip:port>/cards/humans/" \
-H "Accept: application/json" \
-H "Content-Language: ru" \
-H "Accept-Language: ru" \
-H "Authorization: Token <token>" \
-H "Content-Type: application/json" \
-d '{"active":true,"name":"Angelina Jolie","comment":"Миссис Смит","watch_lists":[2]}' \
If the response is successful (Created:201), it returns an object that contains the following parameters. Example.
Name |
Schema |
Description |
---|---|---|
|
integer 🆁 |
Record ID. |
|
boolean |
|
|
boolean 🆁 |
|
|
date-time 🆁 |
Object creation date. |
|
date-time 🆁 |
Object modification date. |
|
string |
Record name, up to 256 characters. |
|
string |
Extended description, up to 2048 characters. |
|
[integer] |
Array of the related Watch lists ID. |
|
|
|
|
<any-key> |
Meta data. |
|
number 🆁 |
Looks like confidence. |
|
date-time┃null |
Data-time information. |
|
date-time┃null |
Data-time information. |
|
array |
Serializer mixin that raises ValidationError if excess fields are presented. Can be used in nested serializers. |
|
date-time 🆁 |
Data-time information. |
|
integer 🆁 |
Linked face objects counter. |
|
integer 🆁 |
Linked body objects counter. |
|
integer 🆁 |
Face claster. |
|
integer 🆁 |
Body cluster. |
|
|
|
Note
Relations are not supported in FindFace Multi 2.1.3 and are kept in API only.
Response example
{
"id": 1,
"active": true,
"filled": true,
"created_date": "2023-01-17T07:43:56.363330Z",
"modified_date": "2023-01-17T07:43:56.363354Z",
"name": "Angelina Jolie",
"comment": "Миссис Смит",
"watch_lists": [
2
],
"meta": {},
"active_after": null,
"active_before": null,
"disable_schedule": {},
"recount_schedule_on": null,
"face_objects": 0,
"body_objects": 0,
"face_cluster": null,
"body_cluster": null,
"links_to_relations": []
}
List records
To list human records, use this method:
GET /cards/humans/
The REQUEST contains the QUERY-STRING PARAMETERS. All parameters you can see in http://<findface-ip:port>/api-docs
.
You may use this method to search faces in the system. Specify the value of detection:<detection id>
, received by detection of objects on a photo, in the field looks_like
.
CURL example
curl -X GET "http://<findface-ip:port>/cards/humans/?looks_like=detection%3Acf4ffvmv54rotim9jt60" \
-H "Accept: application/json" \
-H "Content-Language: ru" \
-H "Accept-Language: ru" \
-H "Authorization: Token <token>" \
If the response is successful (OK: 200), it returns an object that contains the following parameters:
Name |
Schema |
Description |
---|---|---|
|
string┃null |
Next page. |
|
string┃null |
Previous page. |
|
[{…}] |
Contain the following parameters. |
Response example
{
"next_page": null,
"prev_page": null,
"results": [
{
"id": 1,
"active": true,
"filled": true,
"created_date": "2023-01-17T07:43:56.363330Z",
"modified_date": "2023-01-17T11:56:42.496871Z",
"name": "Angelina Jolie",
"comment": "Миссис Смит",
"watch_lists": [
2
],
"looks_like": {
"confidence": 0.8078,
"collection": "face_objects",
"matched_object": "4493493039043981648"
},
"meta": {},
"looks_like_confidence": 0.8078,
"active_after": null,
"active_before": null,
"disable_schedule": {},
"recount_schedule_on": null,
"face_objects": 1,
"body_objects": 0,
"face_cluster": 11,
"body_cluster": null,
"links_to_relations": []
}
]
}
Useful requests
GET /cards/cars/
POST /cards/cars/
GET /cards/cars/{id}/
DELETE /cards/cars/{id}/
PATCH /cards/cars/{id}/
GET /cards/cars/count/
GET /cards/humans/
POST /cards/humans/
GET /cards/humans/{id}/
DELETE /cards/humans/{id}/
PATCH /cards/humans/{id}/
GET /cards/humans/count/