Camera groups

A camera group is a collection of cameras set up in the same location or used for similar purposes.

List camera groups

To list camera groups, use the following method:

GET /camera-groups/

The REQUEST contains the following QUERY-STRING PARAMETERS:

Name

Type

Description

created_date_gt

date-time

Select camera groups with created_date greater than the specified value.

created_date_gte

date-time

Select camera groups with created_date greater than or equal to the specified value.

created_date_last_n_days

number

Select camera groups with created_date in the last N days.

created_date_lt

date-time

Select camera groups with created_date less than the specified value.

created_date_lte

date-time

Select camera groups with created_date less than or equal to the specified value.

created_date_nth_full_week

number

Select camera groups with created_date in the last N weeks (including Sunday and Saturday).

created_date_nth_work_week

number

Select camera groups with created_date in the last N weeks (only working days, i.e. excluding Sunday and Saturday).

id_gte

integer

Select camera groups with IDs greater than or equal to the specified value.

id_in

array of integers

Select camera groups with the specified IDs.

limit

integer

Number of results to return per page.

name_contains

string

Select camera groups whose name contains the specified text, regardless of case.

ordering

string

Field for sorting the request results. Available fields: id, created_date, modified_date, name, active.

page

string

Pagination cursor value.

To find a specific camera group ID in the response, specify values for the limit and ordering parameters to narrow and organize the search results.

CURL example

curl -X GET "http://<findface-ip:port>/camera-groups/?limit=3&ordering=id" \
  -H "Authorization: Token <token>"

If the response is successful (OK: 200), it returns a JSON object that contains the following parameters:

Name

Type

Description

next_page

string┃null

Next page.

prev_page

string┃null

Previous page.

results

[{…}]

Array containing the following parameters. Example.

Note

* – means required parameters. 🆁 – read only.

Name

Type

Description

id*

integer 🆁

Camera group ID.

created_date*

date-time 🆁

Timestamp indicating when the camera group was created.

modified_date*

date-time 🆁

Timestamp indicating when the camera group was last updated.

active

boolean

true if events from this camera group must be processed.

name*

string

Name of the camera group.

Constraints: Min 1┃Max 256 chars.

comment

string

Extended description.

Constraints: Min 0┃Max 2048 chars.

deduplicate

boolean

true if events from this camera group must be deduplicated.

deduplicateDelay

integer

Event deduplication timeout.

Default: 15.

Constraints: Min 0 ┃ Max 10000.

labels

object

One or more labels used to allocate a specific findface-video-worker instance to process video streams from this camera group.

face_threshold

number┃null

Confidence threshold for face detection in the camera group.

Constraints: Min 0┃Max 1.

body_threshold

number┃null

Confidence threshold for body detection in the camera group.

Constraints: Min 0┃Max 1.

car_threshold

number┃null

Confidence threshold for vehicle detection in the camera group.

Constraints: Min 0┃Max 1.

Response example

{
 "next_page": null,
 "prev_page": null,
 "results": [
   {
     "id": -1,
     "created_date": "2025-01-16T13:44:36.531501Z",
     "modified_date": "2025-01-16T13:44:36.531519Z",
     "active": true,
     "name": "Video archive default Camera Group",
     "comment": "",
     "deduplicate": false,
     "deduplicateDelay": 15,
     "labels": {},
     "face_threshold": null,
     "body_threshold": null,
     "car_threshold": null
   }
 ]
}

Create a camera group

To add a new camera group, use the following method:

POST /camera-groups/

The REQUEST BODY is required and contains an application/json object with the following parameters:

Name

Type

Description

active

boolean

If true, events from this camera group will be processed.

name*

string

Name of the camera group.

Constraints: Min 1┃Max 256 chars.

comment

string

Extended description.

Constraints: Min 0┃Max 2048 chars.

deduplicate

boolean

If true, events from this camera group will be deduplicated.

deduplicateDelay

integer

Event deduplication timeout.

Default: 15.

Constraints: Min 0 ┃ Max 10000.

labels

object

One or more labels used to allocate a specific findface-video-worker instance to process video streams from this camera group.

face_threshold

number┃null

Confidence threshold for face detection in the camera group.

Constraints: Min 0┃Max 1.

body_threshold

number┃null

Confidence threshold for body detection in the camera group.

Constraints: Min 0┃Max 1.

car_threshold

number┃null

Confidence threshold for vehicle detection in the camera group.

Constraints: Min 0┃Max 1.

CURL example

curl -X POST "http://<findface-ip:port>/camera-groups/" \
 -H "Authorization: Token <token>" \
 -H "Content-Type: application/json" \
 -d '{"active":true,"name":"Office camera group","comment":"AAAAAA","deduplicate":false,"deduplicateDelay":0,"labels":{},"face_threshold":0,"body_threshold":0,"car_threshold":0}'

Request example

Tip

This example is provided for reference only. Substitute your own values in the corresponding fields. You only need to fill in the required fields; all other fields will use their default values.

For example, you can send these parameters:

{
 "active": false,
 "name": "Test_camera_group",
 "comment": "AAAAAA",
 "deduplicate": false,
 "deduplicateDelay": 0,
 "labels": {},
 "face_threshold": 0,
 "body_threshold": 0,
 "car_threshold": 0
}

If the response is successful (Created: 201), it returns a JSON object that contains parameters. Example.

Response example

{
 "id": 2,
 "created_date": "2025-01-23T12:14:09.885006Z",
 "modified_date": "2025-01-23T12:14:09.885030Z",
 "active": false,
 "name": "Test_camera_group",
 "comment": "AAAAAA",
 "deduplicate": false,
 "deduplicateDelay": 0,
 "labels": {},
 "face_threshold": 0,
 "body_threshold": 0,
 "car_threshold": 0
}

Use the camera group ID in the POST request to create a new camera.

Useful requests

GET /camera-groups/
POST /camera-groups/
GET /camera-groups/{id}/
DELETE /camera-groups/{id}/
PATCH /camera-groups/{id}/
GET /camera-groups/count/