Update data source

POST /source/update


Description

The method updates the parameters of an existing data source. A token is required, see Authorization.


Request format

  • HTTP method: POST
  • URL: /source/update
  • Content type: application/json

Authorization

Pass the token in one of two ways:

  • the token: <jwt-token> header — a temporary JWT token obtained with user/login;
  • the token field in the request body — a permanent API token (UUID) from your account.

Without a token the request returns 401 access denied.


Request Body (JSON)

FieldTypeRequiredDescription
tokenstring—Permanent API token (UUID), if the token header is not sent
source_idstring✅Data source identifier
group_idstring✅Group identifier
namestring❌New data source name
feature_checkstring[]❌List of feature checks (e.g., “race”, “age”, …)
new_person_thresholdstring❌New person detection threshold (e.g., “0.7”)
new_person_square_minstring❌Minimum face area
new_person_yaw_maxstring❌Maximum face rotation angle on the YAW axis
new_person_pitch_maxnumber❌Maximum face rotation angle on the PITCH axis
person_list_addstring[]❌List of face identifiers to add

Example Request (cURL)

curl -X POST "https://api.neuro-vision.ru/v1/source/update" -H "Content-Type: application/json" -H "token: <jwt-token>" -d '{"source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "group_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "Updated Source", "feature_check": ["age", "race"], "new_person_threshold": "0.8", "new_person_square_min": "60", "new_person_yaw_max": "1.3", "new_person_pitch_max": 2, "person_list_add": ["a2bf7811-1234-11ea-96e9-dba8e17ed531"]}'

Example Answers

Success (200 OK)

{
  "message": "source updated",
  "status": "ok"
}

Error (400 Bad Request)

{
  "message": "invalid schema",
  "status": "error"
}