Face List Operations - Get Large Face List Faces

List faces' persistedFaceId and userData in a specified Large Face List.
Faces are stored in alphabetical order of persistedFaceId created in "Add Large Face List Face".

    • "start" parameter (string, optional) specifies an ID value from which returned entries will have larger IDs based on string comparison. Setting "start" to an empty value indicates that entries should be returned starting from the first item.
    • "top" parameter (int, optional) determines the maximum number of entries to be returned, with a limit of up to 1000 entries per call. To retrieve additional entries beyond this limit, specify "start" with the personId of the last entry returned in the current call.

Tip

  • For example, there are total 5 items with their IDs: "itemId1", ..., "itemId5".
    • "start=&top=" will return all 5 items.
    • "start=&top=2" will return "itemId1", "itemId2".
    • "start=itemId2&top=3" will return "itemId3", "itemId4", "itemId5".
GET {endpoint}/face/{apiVersion}/largefacelists/{largeFaceListId}/persistedfaces
GET {endpoint}/face/{apiVersion}/largefacelists/{largeFaceListId}/persistedfaces?start={start}&top={top}

URI Parameters

Name In Required Type Description
apiVersion
path True

string

API Version

endpoint
path True

string

uri

Supported Cognitive Services endpoints (protocol and hostname, for example: https://{resource-name}.cognitiveservices.azure.com).

largeFaceListId
path True

string

Valid character is letter in lower case or digit or '-' or '_', maximum length is 64.

Regex pattern: ^[a-z0-9-_]+$

start
query

string

List resources greater than the "start". It contains no more than 64 characters. Default is empty.

top
query

integer

int32

The number of items to list, ranging in [1, 1000]. Default is 1000.

Responses

Name Type Description
200 OK

LargeFaceListFace[]

A successful call returns an array of persisted faces and their information (persistedFaceId and userData).

Other Status Codes

FaceErrorResponse

An unexpected error response.

Headers

x-ms-error-code: string

Security

Ocp-Apim-Subscription-Key

The secret key for your Azure AI Face subscription.

Type: apiKey
In: header

AADToken

The Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: accessCode
Authorization URL: https://api.example.com/oauth2/authorize
Token URL: https://api.example.com/oauth2/token

Scopes

Name Description
https://cognitiveservices.azure.com/.default

Examples

Get Faces from LargeFaceList

Sample request

GET {endpoint}/face/v1.2-preview.1/largefacelists/your_large_face_list_id/persistedfaces?start=00000000-0000-0000-0000-000000000000&top=20

Sample response

[
  {
    "persistedFaceId": "43897a75-8d6f-42cf-885e-74832febb055",
    "userData": "your_user_data"
  }
]

Definitions

Name Description
FaceError

The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages.

FaceErrorResponse

A response containing error details.

LargeFaceListFace

Face resource for large face list.

FaceError

The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages.

Name Type Description
code

string

One of a server-defined set of error codes.

message

string

A human-readable representation of the error.

FaceErrorResponse

A response containing error details.

Name Type Description
error

FaceError

The error object.

LargeFaceListFace

Face resource for large face list.

Name Type Description
persistedFaceId

string

Face ID of the face.

userData

string

User-provided data attached to the face. The length limit is 1K.