Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.
- What's New
- Service Overview
- Getting Started
- SDK Reference
- API Reference
-
FAQs
-
General Consulting
- How Can Multiple Faces Be Recognized in an Image with Multiple Faces?
- Can Certificate Photos Be Used for Facial Recognition?
- How Do I Deal with Unauthorization Issues?
- Why Do Recognition Errors Occur?
- What Causes the Low Pass Rate in Face Recognition?
- Why Is the Request Response so Slow?
- What Is the Limit for Free Calls to the Face Detection API?
- How Do I Disable a Service?
- Are There SDKs Available for Mobile Phones (Android and iOS) in FRS?
-
APIs
- How Can I Use FRS APIs?
- What Do I Do If Error FRS.0022 Is Reported When Images Are Accessed on OBS?
- How Do I Obtain the Correct Endpoint?
- How Do I Obtain the Base64 Code of an Image?
- How Do I Set the top_n Parameter in the Face Retrieval API?
- Why Is the Data Returned by FRS Empty?
- What Is the Minimum Bandwidth Needed for FRS?
- How Do I Obtain the URL of the Most Recent Image in an OBS Bucket?
- Can I Query Facial Images Uploaded for Face Recognition?
- Error Codes
- Region and AZ FAQs
- Permissions
- Data Security
-
General Consulting
- Glossary
- General Reference
Copied.
Updating a Face
Function
This API is used to update a single face based on its face ID (face_id).
Prerequisites:
Ensure that you have enabled FRS. For detailed operations, see Applying for FRS.
Use standard JSON format in the body of the application/json request.
URI
PUT /v2/{project_id}/face-sets/{face_set_name}/faces
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the ID, see Obtaining the Project ID/Account Name/AK/SK. |
face_set_name |
String |
Yes |
Name of a facial image library. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. During API authentication using a token, the token is added to requests to obtain permissions for calling the API. The value of X-Subject-Token in the response header is the obtained token. |
Content-Type |
Yes |
String |
MIME type of the request body. The value is application/json. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
face_id |
String |
Yes |
Face ID, which is a unique ID generated by the system |
external_image_id |
String |
No |
External image ID specified by the user. It is bound to the current image. If the user does not provide one, it is generated by the system. The ID contains 1 to 36 characters, including letters, digits, hyphens (-), and underscores (_). Other special characters are not allowed. Either parameter external_image_id or external_fields is modified. |
external_fields |
Object |
No |
The value of a custom field can contain 1 to 36 characters, while the value of a string field can contain 1 to 256 characters. For details, see Customized Fields. Either parameter external_image_id or external_fields is modified. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
face_number |
Integer |
Number of updated faces. This parameter is not included when the API fails to be called. |
face_set_id |
String |
ID of the facial image library. This parameter is not included when the API fails to be called. |
face_set_name |
String |
Name of the facial image library. This parameter is not included when the API fails to be called. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code when calling the API failed. This parameter is not included when the API is successfully called. |
error_msg |
String |
Error message returned after the API fails to be called. This parameter is not included when the API is successfully called. |
Example Requests
For details about how to obtain the value of X-Auth-Token, see Authentication.
- Example request
PUT https://{endpoint}/v2/{project_id}/face-sets/showFaceSet/faces Request Header: Content-Type: application/json X-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDT... Request Body: { "face_id": "iexEBb6t", "external_image_id": "imageID", "external_fields": { "timestamp": 12, "id": "300018629384756" } }
Example Responses
Status code: 200
{ "face_number": 1, "face_set_id": "T785tx1N", "face_set_name": "showFaceSet" }
Status code: 400
{ "error_code": "FRS.0303", "error_msg": "The face id is not exist, checkout your input." }
Status Code
For details about the status code, see Status Codes.
Error Code
For details about the error code, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot