POST /source/create
Description
The method creates a new data source in the selected group. A token is required, see Authorization.
Request format
- HTTP method:
POST - URL:
/source/create - Content Type:
application/json
Authorization
Pass the token in one of two ways:
- the
token: <jwt-token>header — a temporary JWT token obtained withuser/login; - the
tokenfield in the request body — a permanent API token (UUID) from your account.
Without a token the request returns 401 access denied.
Request Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| token | string | — | Permanent API token (UUID), if the token header is not sent |
| group_id | string | ✅ | Group identifier |
| name | string | ✅ | Data source name |
| feature_check | string[] | ❌ | List of feature checks (e.g., “race”, “age”, …) |
| new_person_threshold | string | ❌ | New person detection threshold (e.g., “0.7”) |
| new_person_square_min | string | ❌ | Minimum face area |
| new_person_yaw_max | string | ❌ | Maximum face rotation angle on the YAW axis |
| new_person_pitch_max | number | ❌ | Maximum face rotation angle on the PITCH axis |
| person_list_add | string[] | ❌ | List of face identifiers to add |
| person_list_search | object[] | ❌ | List of face search settings |
Example Request (cURL)
curl -X POST "https://api.neuro-vision.ru/v1/source/create" -H "Content-Type: application/json" -H "token: <jwt-token>" -d '{"group_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "New Source", "feature_check": ["race", "age"], "new_person_threshold": "0.7", "new_person_square_min": "50", "new_person_yaw_max": "1.5", "new_person_pitch_max": 1, "person_list_add": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"], "person_list_search": []}' Example Answers
Success (200 OK)
{
"message": "source created",
"source_id": "c2a61a30-8986-11ea-98f0-de0b10ae4112",
"status": "ok"
} Error (400 Bad Request)
{
"message": "invalid schema",
"status": "error"
} Error (401 Unauthorized)
{
"message": "access denied",
"status": "error"
}