Bulk Enroll or Update Persons
Bulk Enroll or Update Persons
PUT /persons
This endpoint is to enroll or update persons in bulk.
Headers
Content-Type
application/json
x-api-key
<your-api-key>
Body
collection_name
Required: Yes
Type: string
Example:
"collection_name": "MyCollection"Please create a collection first before enrolling person(s). Else an error "The requested entity could not be found." will return
face_storage_type
Required: Yes
Type: string
Accepted values: "NoStorage", "StoreThumbnails", "StoreFullImage"
Example:
"face_storage_type": "StoreThumbnails""NoStorage" = do not store any face image "StoreThumbnails" = store only thumbnails (cropped face from the given image) "StoreFullImage" = store full base64 image
Persons
Required: Yes
Type: dict Example: To enroll multiple persons in a specified collection:
{
  "collection_name": "MyCollection",
  "face_storage_type": "StoreThumbnails",
  "persons": [
 {
      "face_base_64": "U2Vjb25kIGltYWdl",
      "metadata": {
        "DOB": "2000-01-01"
      },
      "person_id": "JD1",
      "person_name": "John Doe1"
    }, 
    {
      "face_base_64": "U2Vjb25kIGltYWdl",
      "metadata": {
        "DOB": "2001-01-01"
      },
      "person_id": "JD2",
      "person_name": "John Doe2"
    }
  ]
}
Enrolling or updating multiple persons in one collection is allowed. Each Base64 image should have only one face. Not supporting multiple persons enrollment/update to multiple collections.
Response
[
  {
    "code": "string",
    "message": "string",
    "metadata": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    }
  }
]The collection name specified is not valid
{
  "code": "ERR_INVALID_COLLECTION_NAME",
  "message": "Collection names can only contain alphanumeric characters, underscores, hyphens, and periods."
}Please use an API Key to access this endpoint
{
  "code": "ERR_API_KEY_NOT_PRESENT",
  "message": "The API key is missing from the request."
}API Key is invalid. Please provide a valid API Key
{
  "code": "ERR_API_KEY_NOT_VALID",
  "message": "The API key is not valid."
}The collection with the specified name does not exist
{
  "code": "ERR_NOT_FOUND",
  "message": "The requested entity could not be found."
}The posted JSON is malformed or contains fields that are not of the correct type
{
  "code": "ERR_UNPROCESSABLE_CONTENT",
  "message": "The posted JSON is malformed or contains fields that are not of the correct type."
}An error occurred while connecting with the database, please retry your request later
{
  "code": "ERR_DATABASE_ERROR",
  "message": "An error occurred while connecting with the database, please retry your request later."
}Last updated

