调用ListCustomPersons列出指定⼈物库下的所有⼈物和⼈脸信息。
使用说明
本接口通过人物ID和人物库ID进行查询,如果不传入,则默认列出当前RAM用户所有人物库和人脸信息。
QPS限制
本接口的单用户QPS限制为100次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见QPS限制。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | ListCustomPersons | 操作接口名,系统规定参数。取值:ListCustomPersons。 |
| CategoryId | String | 否 | CategoryId-**** | ⼈物库ID,⽤于唯⼀标识⼀个⾃定义⼈物库,由调⽤者⽣成,调⽤者⾃⼰保证唯⼀性。若不填写,将列出所有⾃定义⼈物库。最⻓⽀持120字符,不区分⼤⼩写 说明 不能与系统⼈物库ID相同。 |
| PersonId | String | 否 | PersonId-**** | ⼈物ID。⽤于唯⼀标识⼀个⾃定义⼈物,由调⽤者⽣成,调⽤者⾃⼰保证唯⼀性。若不填写,将列出CategoryId下所有⼈物。 |
返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| RequestId | String | FD4DED6B-0C26-5A8B-A6BE-4FA542AE4D57 | 请求ID。 |
| Categories | Array of Category | ⼈物库数组。 |
|
| Category | |||
| Persons | Array of Person | ⼈物数组。 |
|
| Person | |||
| PersonName | String | PersonName-**** | ⼈物名称。 |
| PersonDescription | String | PersonDescription-**** | ⼈物描述。 |
| Faces | Array of Face | ⼈脸数组。 |
|
| Face | |||
| ImageUrl | String | http://example-****.jpeg | 注册时的⼈脸图⽚URL。 |
| FaceId | String | 15**** | ⼈脸ID。 |
| PersonId | String | PersonId-**** | ⼈物ID。 |
| CategoryId | String | CategoryId-**** | ⼈物库ID。 |
| CategoryName | String | CategoryName-**** | ⼈物库名称。 |
| CategoryDescription | String | CategoryDescription-**** | ⼈物库描述。 |
示例
请求示例
http(s)://mts.cn-shanghai.aliyuncs.com/?Action=ListCustomPersons
&CategoryId=CategoryId-****
&PersonId=PersonId-****
&<公共请求参数>
正常返回示例
XML格式
HTTP/1.1 200 OK
Content-Type:application/xml
<ListCustomPersonsResponse>
<RequestId>FD4DED6B-0C26-5A8B-A6BE-4FA542AE4D57</RequestId>
<Categories>
<Persons>
<PersonName>PersonName-****</PersonName>
<PersonDescription>PersonDescription-****</PersonDescription>
<Faces>
<ImageUrl>http://example-****.jpeg</ImageUrl>
<FaceId>15****</FaceId>
</Faces>
<PersonId>PersonId-****</PersonId>
</Persons>
<CategoryId>CategoryId-****</CategoryId>
<CategoryName>CategoryName-****</CategoryName>
<CategoryDescription>CategoryDescription-****</CategoryDescription>
</Categories>
</ListCustomPersonsResponse>
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "FD4DED6B-0C26-5A8B-A6BE-4FA542AE4D57",
"Categories" : [ {
"Persons" : [ {
"PersonName" : "PersonName-****",
"PersonDescription" : "PersonDescription-****",
"Faces" : [ {
"ImageUrl" : "http://example-****.jpeg",
"FaceId" : "15****"
} ],
"PersonId" : "PersonId-****"
} ],
"CategoryId" : "CategoryId-****",
"CategoryName" : "CategoryName-****",
"CategoryDescription" : "CategoryDescription-****"
} ]
}
错误码
| HttpCode | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 500 | InternalError | errorMsg:%s | 内部错误,偶发请重试。 |
访问错误中心查看更多错误码。