-
Notifications
You must be signed in to change notification settings - Fork 0
/
liveness.yml
81 lines (70 loc) · 3.87 KB
/
liveness.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
openapi: 3.0.3
paths:
/v2/liveness:
parameters:
- $ref: './common.yml#/components/parameters/transactionId'
get:
tags:
- liveness 2.0
summary: 'liveness check'
description: "To verify the presence of a real person in front of a camera, use the GET `/api/v2/liveness` endpoint. When starting, you can specify `tag` which all attempts to read liveness will be bound to. If left unspecified, the application automatically generates one. The calling application returns `tag` and `transactionId`. One session may include many transactions, and from a transaction ID it is clear which session it belongs to.
When specifying `tag`, note that only Latin uppercase and lowercase letters, digits, and symbols `-` and `_` are allowed. The maximum supported number of characters is 127.
The metadata (device model, screen data, frame size, app ID and version, OS version, platform, SDK version, etc.), a person's selfie and video of the liveness detection session are stored on the backend at:
`faceapi-session/year={year}/month={month}/day={day}/hour={hour}/minute={minute}/{tag}/transactionId`
By default, liveness checks operate with eventual consistency. This means that when you submit a request and receive a response, the associated data (like the selfie and session video) may be saved after the response is sent. If this doesn't meet your requirements, you can switch to strong consistency; refer to the [Architecture page](https://docs.regulaforensics.com/develop/face-sdk/overview/architecture/#consistency-models) for details.
To access the liveness transaction data, use GET `/api/v2/liveness?transactionId={transactionId}`.
"
operationId: get_liveness_transaction_info
responses:
200:
description: Get liveness transaction info
content:
application/json:
schema:
$ref: "#/components/schemas/TransactionInfo"
components:
schemas:
TransactionInfo:
type: object
properties:
code:
type: integer
description: "Result code, see the [FaceSDKResultCode enum](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/enums/face-sdk-result-code/)."
status:
type: integer
default: null
description: "Whether the liveness detection is confirmed `0` or not `1`."
tag:
type: string
description: "Session identificator, should be unique for each session."
transactionId:
type: string
description: "Transaction ID, there can be several transactions within one session."
video:
type: string
description: "Link to the session video, depends on the selected storage type. [Learn more](https://docs.regulaforensics.com/develop/face-sdk/web-service/administration/storage/)"
age:
type: array
description: "Approximate age with an accuracy of +/-3 years."
items:
type: object
additionalProperties: true
portrait:
type: string
description: "Link to the portrait, depends on the selected storage type. [Learn more](https://docs.regulaforensics.com/develop/face-sdk/web-service/administration/storage/)"
metadata:
type: object
additionalProperties: true
description: "A free-form object containing person's extended attributes."
type:
$ref: "#/components/schemas/LivenessType"
LivenessType:
type: integer
description: "Liveness detection can be performed in two modes: active `0` and passive `1`. [Learn more](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/liveness/#active-and-passive-modes)"
default: 0
enum:
- 0
- 1
x-enum-varnames:
- ACTIVE
- PASSIVE