REST API: data sources

Create a data source group

Create a group for data sources.

Purpose

Data sources are organized in groups. Create a group first, then add sources to it with create data source.

Request

POST <API_BASE_URL>/source/group/create. 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.

FieldTypeRequiredDescription
tokenstring (uuid)if no headerYour permanent API token. Required unless you send a user token in the token header.
namestringyesThe name of the new group.

Response

HTTP 201. The group was created.

FieldTypeDescription
statusstringAlways ok on this body.
group_idstring (uuid)The identifier of the group just created.

Errors

  • 400: The body failed validation. The answer has status of error and a details list 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/group/create" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "<your permanent API token>",
    "name": "Main entrance"
  }'

Response:

{
  "status": "ok",
  "group_id": "<group id>"
}

Questions about the face API?

Write to us and we will help.

Talk to us