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=<target person id>
Headers
- X-RPC-FACES-GROUPING-THRESHOLD=4
Value of 4 forces SAFR to assume face is a match.
Example:
curl -k -X POST curl "https://127.0.0.1:8081/people?update=true&insert=false&update-person-id=0c4e0e57-7edf-4ffb-a122-660da7fe13a1" -H "accept: application/json;charset=UTF-8" -H "X-RPC-DIRECTORY: main" -H "X-RPC-FACES-GROUPING-THRESHOLD: 4" -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
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/<externalId> API may be used then to retrieve the SAFR person id of a person record which can then be used during the update calls described above.
For more information, please refer to the SAFR REST APIs at https://covi.real.com/docs/index.html