Person Group - List Person Groups
可選字符串參數“start”和int參數“top”用于指定返回的person group的起點和總數。所有person group按照personGroupId的字母順序存儲。并且列表起始點被定義為personGroupId大于“start”的第一個person group。從這個起點開始,這個API返回第一個“top”person groups。
默認返回前1000個person groups,其中“start”的值為空,“top”的值為1,000。返回空數組表示沒有personGroupId大于“start”的person group。例如,給定兩個組:“first_group”和“second_group”,這兩個組返回默認參數,如果指定“first_group”為“start”,則返回“second_group”;如果指定“second_group”為“start”返回空數組。
由當前呼叫返回的最后一個personGroupId可以用作下一次呼叫的“開始”以連續列出person groups。
Http Method
`GET `
Request URL
https://api.cognitive.azure.cn/face/v1.0/persongroups[?start][&top]
Request parameters
| 參數名|參數類型 |描述 |
| --- | --- | --- |
| start (可選) |string | 從最小的personGroupId列出大于“開始”的person groups。它包含不超過64個字符。默認是空的|
| top (可選) |integer | 列出的person groups數量,范圍[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
成功的調用返回一組人員及其信息(personGroupId,name和userData)。
| Fields | Type | Description |
| --- | --- | --- |
| personGroupId | String| 在人員組中創建的現有人員組的personGroupId - 創建人員組 |
| name | String | personGroup的顯示名稱|
| userData | String | 附加到此personGroup的用戶提供的數據 |
~~~
[
{
"personGroupId":"sample_group",
"name":"group1",
"userData":"User-provided data attached to the person group"
},
{
"personGroupId":"sample_group2",
"name":"group2",
"userData":"User-provided data attached to the person group"
}
]
~~~
Response 400
Error code and message returned in JSON
| Error Code | Error Message Description |
| --- | --- |
| BadArgument | 有效范圍是[1,1000]|
~~~
{
"error":{
"statusCode": 400,
"message": "Parameter top is invalid."
}
}
~~~
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 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