From v5.1 to v5.2
This migration guide outlines the recent changes made in the Face SDK v5.2. Please refer to the following information to ensure a smooth transition and update your implementation accordingly.
Mobile API
Android
Values in the LivenessSkipStep
enum have been renamed:
START_STEP
→ONBOARDING_STEP
DONE_STEP
→SUCCESS_STEP
Web Service
Identification (aka Search)
1. When creating a new person
, you can now specify the groups they should belong to using the groups
field. If no groups
are specified, the person
will be added to the default
group.
2. The /api/persons
endpoint has been removed. To retrieve a list of persons, you can now fetch it from the group
endpoint using the following URL format:
/api/groups/{group_id}/persons
3. A new field, groups
, has been added to the person
object. It represents the list of groups to which the person belongs. Ensure that your code handles this array appropriately and incorporates it into your data models.
4. All id
fields have been transformed from int
to guid
format. Ensure that your codebase accommodates this change and update any references to id
fields accordingly.
For this matter, if you use a database PostgreSQL v13 and older, you need to add an extension by invoking the following script:
CREATE EXTENSION pgcrypto;
5. The naming convention has been standardized to follow camelCase. Please update your code accordingly to align with the following modifications:
- For all requests:
- changed
group_id
togroupId
- changed
person_id
topersonId
- changed
image_id
toimageId
- changed
- For all responses:
- changed
created_at
tocreatedAt
- changed
updated_at
toupdatedAt
- changed
total_pages
tototalPages
- changed
content_type
tocontentType
- changed
- In the Search functionality:
- changed
group_ids
togroupIds
- changed
resize_options
toresizeOptions
- сhanged
image_url
toimageUrl
- changed
create_person
tocreatePerson
- changed
6. As we added support for new database types (Oracle, MySQL, MariaDB, SQLite), the way of setting up the database has changed.
The following environment variables are deprecated:
FACEAPI_SQL_HOST
FACEAPI_SQL_DB
FACEAPI_SQL_USER
FACEAPI_SQL_PASSWORD
Now, the only variable you need is FACEAPI_SQL_URL
. Detailed information can be found on the Configuration page.
7. The list of supported storage types has been extended, now you can use Google Cloud Storage, Azure Blob Storage, File Storage, and AWS S3. Please refer to the guide on setting up storage.
Please review your API integration and make the necessary updates to ensure compatibility with the latest changes. If you have any questions or require further assistance, feel free to reach out to our support team.
Liveness
1. As we added support for new database types (Oracle, MySQL, MariaDB, SQLite), the way of setting up the database has changed.
The following environment variables are deprecated:
FACEAPI_SQL_HOST
FACEAPI_SQL_DB
FACEAPI_SQL_USER
FACEAPI_SQL_PASSWORD
Now, the only variable you need is FACEAPI_SQL_URL
. Detailed information can be found on the Configuration page.
2. The list of supported storage types has been extended, now you can use Google Cloud Storage, Azure Blob Storage, File Storage, and AWS S3. Please refer to the guide on setting up storage.
Web Components
This guide is intended primarily for those who already use the face-liveness, face-capture component version 2.0.X and below and serves to upgrade to the new version 3.0.X.
1. We have renamed the sessionId
field of the response object to tag
.
2. We have removed separate getters and setters for headers
and sessionId
. Instead, you can set headers
and tag
in the settings
object.
How it was before (several different setters):
const component = document.querySelector('face-liveness');
component.headers = {
Authorization: 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='
};
component.sessionId = "ID"
How it is now (a single setter that includes all the necessary parameters):
const component = document.querySelector('face-liveness');
component.settings = {
headers: {
Authorization: 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='
},
tag: ‘ID’
};
3. We have removed customization via css styles. Instead, you can set these parameters in the settings
object. We have significantly expanded the list of customized elements (see the Settings section).
How it was before (css customization from styles), CSS and HTML:
.my-custom-style {
--font-family: Arial, sans-serif;
--main-color: green;
--hover-color: red;
}
<face-liveness class="my-custom-style"></face-liveness>
How it is now (a single setter that includes all the necessary parameters):
const component = document.querySelector('face-liveness');
component.settings = {
customization: {
fontSize: ‘Noto Sans, sans-serif’,
}
};