Update a data source

Description

This method updates the parameters of an existing data source. A JWT token in the header is required for access.

Request Format

  • HTTP Method: POST
  • URL: /source/update
  • Content-Type: application/json
  • Authorization: required

Request Parameters

ParameterTypeLocationRequiredDescription
tokenstringHeaderUser JWT token

Request Body (JSON)

FieldTypeRequiredDescription
tokenstringUser JWT token
source_idstringData source identifier
group_idstringGroup identifier
namestringNew name for the data source
feature_checkstring[]List of feature checks (e.g., «race», «age», …)
new_person_thresholdstringThreshold for new face detection
new_person_square_minstringMinimum face area
new_person_yaw_maxstringMaximum face yaw angle
new_person_pitch_maxnumberMaximum face pitch angle
person_list_addstring[]List of person identifiers to add

Example Request (cURL)

curl -X POST "https://api.enface.ai/source/update" 
  -H "Content-Type: application/json" 
  -H "Authorization: Bearer jwt.temporary.token" 
  -d '{
    "token": "jwt.temporary.token",
    "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"]
  }'

Response Examples

Success (200 OK)
{
  "code": 0,
  "message": "source updated",
  "status": "ok"
}
Error (400 Bad Request)
{
  "message": "invalid schema",
  "status": "error"
}