Person - List Persons in a Person Group
列出人物組中的所有人物,并檢索人物信息(包括該人物注冊過的人臉的personId,name,userData和persistedFaceIds)
* 可選的字符串參數“start”和int參數“top”用于指定返回的起始點和總人數。所有的人物都按照personId的字母順序存儲。列表起始點被定義為personId大于“start”的第一個人。從這個起點開始,API返回第一個“top”人物
* 默認返回“start”值為空且“top”為1000的 前1000人。如果沒有personId比“start”更大的人,則返回空數組。例如,給定兩個人:“first_person”和“second_person”,用默認參數返回這兩個人,如果指定“first_person”為“start”,則返回“second_person”,并且如果指定“second_person”為“start”則返回空數組
* 由當前響應返回的最后一個personId可以被用作下一次響應的“start”以連續性的列出人物
Http Method
`GET `
Request URL
`https://api.cognitive.azure.cn/face/v1.0/persongroups/{personGroupId}/persons[?start][&top] `
Request parameters
| 參數 |類型 |描述 |
| --- | --- | --- |
| personGroupId | string | 目標人物組的personGroupId|
| start (可選) | string | 列出personId最小的但比“start”大的人物。大小不超過64個字符。默認為空 |
| top (可選) | integer |列出的人數,范圍[1,1000]。默認值是1000。 |
Request headers
| 請求頭 |類型 |描述 |
| --- | --- | --- |
| Ocp-Apim-Subscription-Key | string | Subscription key which provides access to this API. Found in your Cognitive Services accounts. |
Request body
請求豬頭
Response 200
一個成功的調用返回屬于該人物組的人物信息的數組
JSON fields in response body
| Fields | Type | Description |
| --- | --- | --- |
| personId | String| 人物組中人物的personId |
| name | String | 人物的顯示名稱|
| userData | String | 用戶提供的附加到該人物的數據|
| persistedFaceIds | Array | 已注冊的該人物的連續人臉的persistedFaceId數組
~~~
[
{
"personId":"25985303-c537-4467-b41d-bdb45cd95ca1",
"name":"Ryan",
"userData":"User-provided data attached to the person",
"persistedFaceIds":[
"015839fb-fbd9-4f79-ace9-7675fc2f1dd9",
"fce92aed-d578-4d2e-8114-068f8af4492e",
"b64d5e15-8257-4af2-b20a-5a750f8940e7"
]
},
{
"personId":"2ae4935b-9659-44c3-977f-61fac20d0538",
"name":"David",
"userData":"User-provided data attached to the person",
"persistedFaceIds":[
"30ea1073-cc9e-4652-b1e3-d08fb7b95315",
"fbd2a038-dbff-452c-8e79-2ee81b1aa84e"
]
}
]
~~~
Response 401
| Error Code | Error Message Description |
| --- | --- |
| Unspecified | 無效的subscription Key 或user/plan 被凍結 |
~~~
{
"error":{
"code": "Unspecified",
"message": "Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key."
}
}
~~~
Response 403
~~~
{
"error":{
"statusCode": 403,
"message": "Out of call volume quota. Quota will be replenished in 2.12 days."
}
}
~~~
Response 404
Error code and message returned in JSON
| Error Code | Error Message Description |
| --- | --- |
| PersonGroupNotFound | 人物組ID無效。有效的格式應該是由數字組成的字符串,英文字母小寫,' - ','_',且不超過64個字符 |
| PersonGroupNotFound | 未找到人物組|
~~~
{
"error":{
"code":"PersonGroupNotFound",
"message":"Person group 'sample_group' is not found."
}
}
~~~
Response 409
~~~
{
"error":{
"code": ConcurrentOperationConflict,
"message": "There is a conflict operation on resource 'sample_group', please try later."
}
}
~~~
Response 429
~~~
{
"error":{
"statusCode": 429,
"message": "Rate limit is exceeded. Try again in 26 seconds."
}
}
~~~
- 空白目錄
- Face
- Detect
- Find Similar
- Group
- Identify
- Verify
- Face List
- Add a Face to a Face List
- Create a Face List
- Delete a Face from a Face List
- Delete a Face List
- Get a Face List
- List Face Lists
- Update a Face List
- Person
- Add a Person Face
- Create a Person
- Delete a Person
- Delete a Person Face
- Get a Person
- Get a Person Face
- List Persons in a Person Group
- Update a Person
- Update a Person Face
- Person Group
- Create a Person Group
- Delete a Person Group
- Get a Person Group
- Get Person Group Training Status
- List Person Groups
- Train Person Group
- Update a Person Group