LogoLogo
  • Introduction
  • Use Cases
  • Getting Started
    • Starting the server
    • Configuration
    • Licensing and Authorization
    • Using the Swagger Docs page
    • Authorization
  • OpenCV FR Server
    • Collection Management
    • Person Management
      • Bulk Enroll or Update Persons
    • Face Search
    • Face Compare
    • Liveness Detection
Powered by GitBook
On this page
Export as PDF
  1. OpenCV FR Server
  2. Person Management

Bulk Enroll or Update Persons

PreviousPerson ManagementNextFace Search

Last updated 2 months ago

Bulk Enroll or Update Persons

PUT /persons

This endpoint is to enroll or update persons in bulk.

Headers

Body

Name
Description

collection_name

Required: Yes

Type: string

Example:

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:

"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:

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."
}
"collection_name": "MyCollection"
"face_storage_type": "StoreThumbnails"
{
  "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"
    }
  ]
}
Name
Value

Content-Type

application/json

x-api-key

<your-api-key>