Share via


Person Directory - Get Persons

Retrieve list of person information in person directory.

GET {Endpoint}/face/v1.0-preview/persons
GET {Endpoint}/face/v1.0-preview/persons?start={start}&top={top}

URI Parameters

Name In Required Type Description
Endpoint
path True

string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).

start
query

string (uuid)

List persons from the least personId greater than the "start". It contains no more than 64 characters. Default is empty.

top
query

string

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

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Responses

Name Type Description
200 OK

EnrollmentResponse[]

Success

Other Status Codes

Error

Response entity accompanying non-successful responses containing additional details about the error.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Get person directory persons example

Sample request

GET {Endpoint}/face/v1.0-preview/persons

Sample response

[
  {
    "personId": "25985303-c537-4467-b41d-bdb45cd95ca1",
    "name": "Ryan",
    "userData": "User-provided data attached to the person."
  },
  {
    "personId": "2ae4935b-9659-44c3-977f-61fac20d0538",
    "name": "David",
    "userData": "User-provided data attached to the person."
  }
]

Definitions

Name Description
EnrollmentResponse
Error

Error body.

EnrollmentResponse

Name Type Description
name

string

personId

string (uuid)

userData

string

Error

Error body.

Name Type Description
code

string

message

string