How to update face image for a person by API
If you want to update (replace) face image (which also updates the biometric signature) of a person by API, use the following with the post /people API
API Parameters
- update=true
- insert=false
- update-person-id=
- update-if-lower-quality=true (optional, when false, if source image is lower quality will not be updated)
Example:
curl -k -X POST curl ""https://127.0.0.1:8081/people?update=true&insert=false&update-if-lower-quality=true&update-person-id=0c4e0e57-7edf-4ffb-a122-660da7fe13a1"" -H ""accept: application/json;charset=UTF-8"" -H ""X-RPC-DIRECTORY: main"" -H ""X-RPC-AUTHORIZATION: $USER:$PASS"" -H ""Content-Type: image/jpeg"" --data-binary @new_face.jpg
The API should return the following in JSON response on success.
""accountUpdated"": true
You may also need to set min-cpq, min-fcq, min-fsq, max-occlusion, and insert-profile parameters to prevent image from being rejected due to quality, though it is recommended to maintain minimum quality of face images added to SAFR to avoid increasing false match rate.
Tip:
SAFR supports a property ""externalId"" on a person record. You may set this at the time you create a record. Generally this would be set to the unique id that your system uses to identify a person. The GET /people/external/
For more information, please refer to the SAFR REST APIs at https://covi.real.com/docs/index.html