REST API: data sources
Update a data source
Change how the images of a source are handled.
Purpose
Use this call to rename a source or to change its settings. Send the fields you want to change together with source_id and group_id.
Request
POST <API_BASE_URL>/source/update. All calls are POST under your API address. Replace <API_BASE_URL> with the API address provided with your access.
Send a permanent API token in the token field of the body, or a user token in the token header. See authentication.
Content type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
token | string (uuid) | if no header | Your permanent API token. Required unless you send a user token in the token header. |
source_id | string (uuid) | yes | The source to update. |
group_id | string (uuid) | yes | The group the source belongs to. |
name | string | no | The new name of the source. |
feature_check | array of object or string | no | Features to detect on every image of the source: a name or an array of names such as age, gender, mood, glasses or mask. |
new_person_threshold | value | no | The match threshold below which a new person is created automatically. The value never creates no person; no_match uses the platform default, which is recommended. |
new_person_square_min | value | no | The smallest face side, in pixels, from which a person is created automatically. |
new_person_yaw_max | value | no | The largest left or right rotation, in degrees, at which a person is created automatically. |
new_person_pitch_max | value | no | The largest up or down tilt, in degrees, at which a person is created automatically. |
person_list_add | array of string | no | An array of person list identifiers. Persons created automatically are added to each of them. |
Response
HTTP 200. The source was updated.
| Field | Type | Description |
|---|---|---|
status | string | Always ok on this body. |
Errors
400: The body failed validation. The answer hasstatusoferrorand adetailslist with one entry per offending field (path,expected,actual).401: The token is missing, expired or unknown.
A refusal can also come before the operation runs: an address outside your IP allowlist, a token bound to another address, or a body that is not valid JSON. See response format and errors.
Example
Request:
curl -X POST "<API_BASE_URL>/source/update" \
-H "Content-Type: application/json" \
-d '{
"token": "<your permanent API token>",
"source_id": "<source id>",
"group_id": "<group id>",
"name": "Front door, north"
}'
Response:
{
"status": "ok",
"message": "<detail>"
}