ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
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." } } ~~~