Call the getPersonFacesInfo operation to retrieve the face information associated with an individual, including face image IDs and URLs.
Request syntax
POST /green/sface/faces HTTP/1.1Request headers
This operation uses only common request headers. For more information, see Common request headers.
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| clientInfo | JSON object | No | {"userId":"120234234","userNick":"Mike","userType":"others"} | The client information serialized from the ClientInfo structure. Includes the UMID (unique machine identifier) and IMEI (International Mobile Equipment Identity) of the client. For more information, see ClientInfo. |
Request body
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| personId | String | Yes | person1 | The ID of the individual to query. |
| faceIds | Array | No | ["11111","2222"] | The face image IDs to query. If not specified, all face image IDs under the specified personId are returned. |
Response parameters
All responses are returned as JSON. For common response parameters, see Common response parameters. Business data is returned in the data field as a JSON object or JSON array.
The data field may be empty if an error occurs.The following table describes the fields returned in data.
| Parameter | Type | Example | Description |
|---|---|---|---|
| code | Integer | 200 | The HTTP status code. For more information, see Common error codes. |
| faceImageItems | JSON array | — | The face objects for the specified individual. Each element in the array contains the following fields: success, faceId, and url. |
| success | Boolean | true | Indicates whether the query succeeded. Valid values: true (query succeeded) and false (query failed). |
| faceId | Long | 2****************6 | The ID of the face image. |
| url | String | http://www.aliyundoc.com/aaa.jpg | The URL of the face image. |
Examples
Sample request
POST /green/sface/faces HTTP/1.1
Common request headers
{
"personId": "person1",
"faceIds": ["1111", "22222"]
}Sample response
{
"code": 200,
"requestId": "82E9202A-183F-4DDE-A45E-D554F8FA8D7B",
"data": {
"code": 200,
"faceImageItems": [
{
"success": true,
"faceId": 2****************6,
"url": "http://www.aliyundoc.com/aaa.jpg"
}
]
}
}Error codes
For a list of error codes, see Service error codes.
该文章对您有帮助吗?