Collection Management
Before performing Face Search (1:N, N:N), you first need to create a collection and enroll the persons in a specific collection.
Each collection is a table, collection name should be unique, it’s not allowed to create two collections with the same name.
Upon a collection being created, the collection name is not allowed to change. you can delete a collection, in this case, all enrolled persons within the collection will be deleted as well, so please be careful.
Create collection
POST /collection
This endpoint is to create a collection
Headers
Content-Type
application/json
x-api-key
<your-api-key>
Body
name
Required: Yes
Type: string
Example:
Each collection is like a table, the name of the collection is the unique identifier.
Once created, no modification of the name is allowed.
Response
{
"name": "MyCollection",
"num_persons": 0
}{
"code": "ERR_INVALID_COLLECTION_NAME",
"message": "Collection names can only contain alphanumeric characters, underscores, hyphens, and periods."
}{
"code": "ERR_API_KEY_NOT_PRESENT",
"message": "The API key is missing from the request."
}{
"code": "ERR_API_KEY_NOT_VALID",
"message": "The API key is not valid."
}{
"code": "ERR_ALREADY_EXISTS",
"message": "Another entity already exists with the same ID."
}{
"code": "ERR_DATABASE_ERROR",
"message": "An error occurred while connecting with the database, please retry your request later."
}Delete a collection
DELETE /collection
This endpoint is to delete a collection.
Headers
Content-Type
application/json
x-api-key
<your-api-key>
Body
name
Required: Yes
Type: string
Example:
Each collection is like a table, upon deletion of a collection, all enrolled person within the collection will be deleted.
Response
Last updated

