Facial Recognition Terminal HTTP Integration

Download as pdf or txt
Download as pdf or txt
You are on page 1of 244

Facial Recognition Terminal

HTTP Integration
CONTENTS

1. Overview................................................................ 6
2. Interface principle ..................................................... 6
2.1 Request method ....................................................... 6
2.2 Data types and formats ............................................... 6
2.3 grammar.............................................................. 6
2.4 Authentication....................................................... 7
3. Specific functional interface ............................................. 8
3.1 Sound settings ....................................................... 8
3.1.1 Get audio settings parameters .................................. 9
3.1.2 Set audio parameters .......................................... 10
3.1.3 Get the number and file name of files played .................. 11
3.1.4 Play the specified file sound ................................. 12
3.2 Door opening conditions ............................................. 13
3.2.1 Get the door opening condition setting parameters ............. 14
3.2.2 Set the door opening conditions parameters .................... 16
3.3 Set username and password ........................................... 18
3.4 Network parameters .................................................. 19
3.4.1 Get network parameters ........................................ 19
3.4.2 Set network parameters ........................................ 20
3.5 Time parameter ...................................................... 21
3.5.1 Get system time ............................................... 21
3.5.2 Set the system time ........................................... 22
3.6 ntp parameter....................................................... 22
3.5.1 Get ntp parameters ............................................ 24
3.5.2 Setting ntp parameters ........................................ 25
3.7 Central connection .................................................. 26
3.5.1 Get central connection parameters ............................. 26
3.5.2 Set center connection parameters .............................. 27
3.8 Restore Factory..................................................... 28
3.9 Device Information .................................................. 30
3.9.1 Get device information ........................................ 31
3.9.2 Set device information ........................................ 31
3.10 Add, edit and modify the list ...................................... 32
3.10.1 Single list add .............................................. 38
3.10.2 Multiple lists added ......................................... 41
3.10.3 List edit .................................................... 44
3.10.4 Get new and old database version ............................. 46
3.10.5 Wigan access card number and built-in swipe id card number ... 47
3.11 Delete list ........................................................ 48
3.11.1 Single or multiple list deletion ............................. 48

2
3.11.2 All personnel list deleted ................................... 50
3.12 Data subscription .................................................. 51
3.12.1 Pushed information does not require authentication ........... 54
3.12.2 Provide username and password when subscribing ............... 56
3.12.3 Strangers report ............................................. 59
3.12.4 Reporting of certification results ........................... 60
3.12.5 QR code reporting ............................................ 67
3.12.6 Report of ID information ..................................... 68
3.12.7 Report the IC card number authentication result (access control
machine) ..................................................... 69
3.12.8 Report password authentication result (access control machine) 70
3.12.9 Querying Subscribed Information .............................. 71
3.13 unsubscribe ........................................................ 73
3.14 Subscription Heartbeat ............................................. 76
3.15 Access camera parameters ........................................... 77
3.15.1 Get camera parameters ........................................ 78
3.15.2 Set access camera parameters ................................. 79
3.16 Face capture comparison server parameters .......................... 80
3.16.1 Get server parameters ........................................ 80
3.16.2 Setting server parameters .................................... 81
3.17 Personnel type parameters .......................................... 81
3.17.1 Get Person Type Parameter .................................... 82
3.17.2 Set personnel type parameters ................................ 83
3.18 Face service function .............................................. 84
3.18.1 Picture extraction feature code .............................. 84
3.18.2 Feature code comparison similarity ........................... 85
3.18.3 Get face pictures ............................................ 86
3.19 List search query .................................................. 88
3.19.1 Single list query ............................................ 92
3.19.2 Total number of queries ...................................... 94
3.19.3 Multiple list queries ........................................ 97
3.20 Door opening control .............................................. 101
3.21 Password operation ................................................ 102
3.21.1 Get temporary password ...................................... 102
3.21.2 Password add ................................................ 103
3.21.3 Password deletion ........................................... 104
3.21.4 Clear all passwords ......................................... 104
3.22 Control record query .............................................. 105
3.22.1 Control the total number of records ......................... 107
3.22.2 Control record personnel information query .................. 108
3.23 Common configuration settings ..................................... 117
3.23.1 Get common setup parameters ................................. 118
3.23.2 Set common parameters ....................................... 118

3
3.24 Restart the device ................................................ 119
3.25 Picture service function .......................................... 119
3.25.1 Picture comparison similarity ............................... 119
3.25.2 Search the local face database by map ....................... 121
3.25.3 Detect picture faces ........................................ 123
3.26 Snapshot query .................................................... 125
3.26.1 Query the total number of snapshot records .................. 125
3.26.2 Snapshot recorder information query ......................... 127
3.27 Temperature parameter ............................................. 132
3.27.1 Get temperature parameters .................................. 134
3.27.2 Set temperature parameters .................................. 134
Appendix a: revision history ............................................... 136
Appendix b: Message reply for authentication failure or interface setting .. 141
B.1 Authentication failed .............................................. 141
B.2 Set message reply .................................................. 141
Appendix c: Capturing packets for specific functional interfaces ........... 142
C.1 Sound settings..................................................... 142
C.1.1 Get audio settings parameters ................................ 142
C.1.2 Set audio parameters ......................................... 143
C.1.3 Get the number and file name of files played ................. 144
C.1.4 Play the specified file sound ................................ 145
C.2 Door opening conditions ............................................ 146
C.2.1 Get the door opening condition setting parameters ............ 146
C.2.2 Set the door opening conditions parameters ................... 148
C.3 Set username and password .......................................... 149
C.4 Network parameters ................................................. 150
C.4.1 Get network parameters ....................................... 150
C.4.2 Set network parameters ....................................... 151
C.5 Time parameter..................................................... 152
C.5.1 Get system time .............................................. 152
C.5.2 Set the system time .......................................... 153
C.6 ntp parameter...................................................... 154
C.6.1 Get ntp parameters ........................................... 154
C.6.2 Setting ntp parameters ....................................... 155
C.7 Central connection ................................................. 156
C.7.1 Get central connection parameters ............................ 156
C.7.2 Set center connection parameters ............................. 157
C.8 Restore Factory .................................................... 158
C.9 Setting information ................................................ 159
C.9.1 Get device information ....................................... 159
C.9.2 Set device information ....................................... 160
C.10 Add, edit and modify the list ..................................... 161
C.10.1 Single list add ............................................. 161

4
C.10.2 Multiple lists added ........................................ 162
C.10.3 List edit ................................................... 163
C.10.4 Get new and old database version ............................ 164
C.11 Delete list ....................................................... 165
C.12 Data subscription ................................................. 166
C.12.1 No authentication required for push messages ................ 166
C.12.2 Provide a username and password when subscribing, and submitting
requires authentication ..................................... 167
C.12.3 Strangers report ............................................ 168
C.12.4 Reporting of certification results .......................... 169
C.12.5 Report of ID information .................................... 170
C.12.6 Query for subscribed messages ............................... 170
C.13 unsubscribe ....................................................... 171
C.14 Subscription Heartbeat ............................................ 172
C.19 List search query ................................................. 173
C.19.1 Single list query ........................................... 173
C.19.2 Total number of queries ..................................... 174
C.19.3 Multiple list queries ....................................... 175
C.20 Door opening control .............................................. 177
C.20.1 Door opening control......................................... 177
C.22 Control record query .............................................. 177
C.23 Common setting parameter settings ................................. 180
C.23.1 Get common setup parameters ................................. 180
C.23.2 Set common parameters ....................................... 181
C.24 Restart the device ................................................ 182
C.24.1 Restart the device........................................... 182
C.25 Picture service function .......................................... 183
C.25.1 Picture comparison similarity ............................... 183
C.25.2 Search the local face database by map ....................... 184
C.25.3 Detect picture faces ........................................ 185

5
1. Overview
This document is mainly used for HTTP connection of the face
recognition integrated machine, and is suitable for system
development and maintenance personnel.

2. Interface principle
This data interface specification uses the standard http protocol for
communication, and requires the following:

2.1 Request method

The request method uses the POST method, and the data sent and
uploaded is placed in the entity-body.

2.2 Data types and formats

2.2.1 All strings should be encoded in the UTF-8 character set.

2.2.2 The data exchanged by both parties are uniformly packaged


in json format, the basic format is as follows:
{
"operator": "<Operator>",
"info": {<Info>},
……
}
For more details, please see 3. Specific functional interfaceThe specific
data format of each interface.
2.2.3 All image data uses base64 encoding or image URI.

2.3 grammar

Requested URI format: http: // <server ipaddr> / action / <Operator>.


Where
<server ipaddr>: the requested IP address of the face recognition
machine; <Operator>: the operation content, please see details 3.
Specific functional interface。
6
2.4 Authentication

To ensure the security of data transmission, authentication is


performed when the data is officially transmitted, and the basic
method is temporarily used. The typical data of the Authorization
header is "Authorization: Basic jdhaHY 0 =", where Basic means basic
authentication, and jdhaHY0 = is base64 encoded "user: passwd" string.
For example, the all-in-one user name is "admin" and the password is
"admin", then the base64 encoding of "admin: admin" in the header of
the sent data is "YWRtaW46YWRtaW4 =" The certifications are as
follows:

If it is a postman debugging interface, select Basic Auth under


Authorization, enter the user name and password, and click Update
Request. Postman will automatically encrypt the user name and
password and add it to the Headers, as shown in the figure:

7
After setting, select the POST request method, enter the corresponding
functional interface URL, and click Send.

3. Specific functional interface

3.1 Sound settings

Gets or sets the parameters of


the system audio settings.
Key information Type
Parameter (Note: Values Description
optional is optional):
operator char GetSound or GetSound: Get
SetSound parameters of audio
settings
SetSound: set audio
Data parameter
info json object specific contents

VerifySuccAudio int 0~1 Whether the


(optional) authentication
succeeds
0: Do not broadcast
1: broadcast
VerifyFailAudio int 0~1 Whether
(optional) authentication
fails
0: Do not broadcast
1: broadcast
RemoteCtrlAudio int 0~1 Remote control
(optional) sound playback
0: Non-remote
1: remote playback
Volume int 5 ~ 100 Volume value
(optional) Increasing
every 5
values
VerifySuccGuiTip int 0~1 Whether the
(optional) authentication
success interface
prompts
0: no prompt
1: tip
VerifyFailGuiTip int 0~18 Whether the
(optional) authentication
failure interface
prompts
UnregisteredGuiT int 0~1 Is the list
ip (optional) unregistered prompt
0: no prompt
1: tip
IPHide int 0~1 Whether the
(optional) interface ip is
hidden 0: not
hidden
1: hide
IsShowName int 0~1 If the comparison
(optional) is successful,
whether the name
prompt is displayed
0: not displayed
1: display
IsShowTitle int 0~1 Whether the
(optional) interface title
prompt is displayed
0: Not displayed
(default)
1: display
IsShowVersion int 0~1 Whether the
(optional) interface version
number prompt is
displayed
0: Not displayed
(default)
1: display
IsShowDate int 0~1 Whether the date
(optional) prompt is displayed
on the interface
0: not displayed
1: display
IDCardNumHide int 0~1 Whether the
(optional) interface card
number is hidden
(built-in card
type) 0: not hidden
1: hide
ICCardNumHide int 0~1 Whether the
(optional) interface ic card
number is hidden
0: not hidden
1: hide
9
3.1.1 Get audio settings parameters

Operator: GetSound
URI: http://<server ipaddr>/action/GetSound

e.g.,

10
http://172.168.2.10/action/GetSound
Reply body:
{
"operator": "GetSound",
"info": {
"VerifySuccAudio": 1,
"VerifyFailAudio": 1,
"RemoteCtrlAudio": 0,
"Volume": 80,
"VerifySuccGuiTip": 1,
"VerifyFailGuiTip": 1,
"UnregisteredGuiTip": 1,
"IPHide": 0,
"IsShowName": 1,
"IsShowTitle": 0,
"IsShowVersion": 0,
"IsShowDate": 1,
"IsShowTime": 1,
"ICCardNumHide": 0
}
}

3.1.2 Set audio parameters

Operator: SetSound
URI: http://<server ipaddr>/action/SetSound

e.g.,
http://172.168.2.10/action/SetSound
Send the body:
{
"operator": "SetSound",
"info":
{
"VerifySuccAudio":1,
"VerifyFailAudio":1,
"RemoteCtrlAudio":1,
"Volume":50,
"VerifySuccGuiTip":1,
"VerifyFailGuiTip":1,
11
"UnregisteredGuiTip":1,
"IPHide": 0,
"IsShowName": 1,
"IsShowTitle": 0,
"IsShowVersion": 0,
"IsShowDate": 1,
"IsShowTime": 1,
"ICCardNumHide": 0
}
}

3.1.3 Get the number and file name of files played

Parameter information:
Key Type Values Description
operator char GetAudio SetAudio: Get
Playable
Audio file
info json object specific contents
AudioNum int Number of audio files
AudioName json array
A collection of
single or multiple
audio file names in
the format of a Json
array of audio file
names

Operator: GetAudio
URI: http://<server ipaddr>/action/GetAudio

e.g.,
http://172.168.2.10/action/GetAudio
Reply body:
{
"operator": "GetAudio",
"info": {
"AudioNum": 1, 12
"AudioName":
[ "welcome.wav",.
..
}
}

3.1.4 Play the specified file sound

Parameter information (Note: optional is optional):


Key Type Values Description
operator char SetAudio SetAudio: Set
playback finger
Audio file
info json object specific contents
DeviceID int Device id
AudioType int 0~1 Type of play file
0: Play local files
on the machine
1: play custom file
AudioName char
The name of the
(optional)
audio file to be
played (must be a
wav file, the
sampling rate:
16000Hz, the number
of sampling bits: 16
bits, mono. The file
name is up to 64
bytes)

Operator: SetAudio
URI: http://<server ipaddr>/action/SetAudio

e.g.,
http://172.168.2.10/action/SetAudio
Send the body:
{
"operator": "SetAudio",
13
"info":
{ "DeviceID":1300001,
"AudioType":0,
"AudioName":"welcome.wav"
3.2 Door opening conditions

Get or set the door opening condition parameters.


Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetDoorCondition GetDoorCondition: Get
or the door opening
SetDoorCondition condition setting
parameter
SetDoorCondition: Set
Door opening condition
parameters
info json object specific contents
FaceThreshold int 50 ~ 100 Black and white list
(optional) comparison threshold
IDCardThreshold int 50 ~ 100 ID card comparison
(optional) threshold
OpendoorWay int 0~2 0: Face opening mode,
(optional) 1: Remote door opening
mode, 2: Remote door
opening or
Face mode

14
VerifyMode int 1~4 or 21~26 Ways of identifying.
(optional) 1: whitelist
verification
2: ID verification
3: Whitelist + ID
4: Whitelist or ID
21: rf card
verification (built-in
card swipe model)
22: rf card
verification + white
list verification
(built-in card type)
23: rf card
verification or white
list verification
(built-in card type)
24: Wegenka
verification
25: Wiganka +
whitelist verification
26: Wiganka or
whitelist verification
Wiegand int 0~1 Wigan protocol type.
(optional) 0: 26 bits
1: 34 bits

15
4:26 digits (8 + 16):
facility code + userid
(equipment code + card
number);
5:34 bits (8 + 24);
6:26 (fill in 8 + 16
separately);
7:34 digits (8 + 24
divided separately
write);
PublicMjCardNo unsigned Public access card
int number
(optional)
AutoMjCardBgnNo unsigned Automatically generate
int the start card number
(optional)
of the access card
number
AutoMjCardEndNo unsigned Automatically generate
int the end card number of
(optional)
the access card number
ControlType int 0~2 Control door
(optional) opening interface
mode. 0: Wiegand
interface
1: switching value
2: Wiegand interface +
switch
IOType int 0~1 Door opening action
(optional) when controlling the
door opening interface
mode.
0: closed
1: disconnect
IOStayTime int Hold time (ms)
(optional)

16
Endian int 0~1 Card number big
(optional) and small end
reading mode 0:
big endian mode
1: little-endian mode
CardMode int 0~1 Card
(optional) number
mode 0:
decimal
1: hex

3.2.1 Get the door opening condition setting parameters

Operator: GetDoorCondition
URI:http://<server ipaddr>/action/GetDoorCondition

17
e.g.,
http://172.168.2.10/action/GetDoorCondition
Reply body:
3.2.1.1. The door opening interface mode is switching value:
{
"operator": "GetDoorCondition",
"info": {
"FaceThreshold": 80,
"IDCardThreshold": 50,
"OpendoorWay": 0,
"VerifyMode": 1,
"ControlType": 1,
"IOType": 0,
"IOStayTime": 6,
"Endian": 0,
"CardMode": 0
}
}

3.2.1.1. The door opening interface method is Wiegand interface:


{
"operator": "GetDoorCondition",
"info": {
"FaceThreshold": 80,
"IDCardThreshold": 50,
"OpendoorWay": 0,
"VerifyMode": 1,
"Wiegand": 0,
"ControlType": 0,
"PublicMjCardNo": 2,
"AutoMjCardBgnNo": 2,
"AutoMjCardEndNo": 4,
"IOStayTime": 6,
"Endian": 0,

18
"CardMode": 0
}
}

3.2.1.2. Door opening interface method is Wiegand interface + switch value:


{
"operator": "GetDoorCondition",
"info": {
"FaceThreshold": 80,
"IDCardThreshold": 50,
"OpendoorWay": 0,
"VerifyMode": 1,
"Wiegand": 0,
"ControlType": 0,
"PublicMjCardNo": 2,
"AutoMjCardBgnNo": 2,
"AutoMjCardEndNo": 4,
"IOStayTime": 6,
"Endian": 0,
"CardMode": 0

}
}

3.2.2 Set the door opening conditions parameters

Operator: SetDoorCondition
URI:http://<server ipaddr>/action/SetDoorCondition

e.g.,
http://172.168.2.68/action/SetDoorCondition
Send the body:
3.2.2.1. The door opening interface mode is switching value:
{
"operator": "SetDoorCondition",
19
"info": {
"FaceThreshold": 90,
"IDCardThreshold": 50,
"OpendoorWay": 0,
"VerifyMode": 1,
"ControlType": 1,
"IOType": 0,
"IOStayTime": 5,
"Endian": 0,
"CardMode": 1
}
}

3.2.2.2. The door opening interface method is Wiegand interface:


{
"operator": "SetDoorCondition",
"info": {
"FaceThreshold": 90,
"IDCardThreshold": 50,
"OpendoorWay": 0,
"VerifyMode": 1,
"ControlType": 0,
"Wiegand": 0,
"PublicMjCardNo": 2,
"AutoMjCardBgnNo": 2,
"AutoMjCardEndNo": 4,
"IOStayTime": 5,
"Endian": 0,
"CardMode": 1
}
}
3.2.2.3. Door opening interface method is Wiegand interface + switch value:
{
"operator": "SetDoorCondition",
"info": {

20
"FaceThreshold": 90,
"IDCardThreshold": 50,
"OpendoorWay": 0,
"VerifyMode": 1,
"ControlType": 0,
"Wiegand": 0,
"PublicMjCardNo": 2,
"AutoMjCardBgnNo": 2,
"AutoMjCardEndNo": 4,
"IOStayTime": 5,
"Endian": 0,
"CardMode": 1
}
}

3.3 Set username and password

Set the user name and password of the


face recognition machine. Parameter
information
Key (Note: optional is
Type Values Description
optional):
operator char SetUserPwd Set the use of face
recognition machine
Username and password
info json object specific contents
User char User name User name, up to 64
characters
Character length
(including terminator)
Pwd char Password Password, maximum 64
characters
Operator: SetUserPwd Length (with
URI:http://<server ipaddr>/action/SetUserPwd terminator)

e.g.,
http: // <server ipaddr> / action /
SetUserPwd Send the body

21
{
"operator": "SetUserPwd",
"info": {
"User": "admin",
"Pwd": "admin"
}
}

3.4 Network parameters

Get or set network parameters.


Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetNetParam GetNetParam: Get the
or door opening condition
SetNetParam setting parameters
SetNetParam: Set the
door opening
Condition parameter
info json object specific contents
IPAddr char Device IP address (up
(optional) to 64 words
Section)
Submask char Device ip subnet mask
(optional) (max. 32
byte)
Gateway char Device ip gateway (max.
(optional) 32 words
Section)
ListenPort int Data service port
(optional)
WebPort int Web service port
(optional)

22
3.4.1 Get network parameters

Operator: GetNetParam
URI:http://<server ipaddr>/action/GetNetParam

23
e.g.,
http://192.168.2.10/action/GetNetParam
Reply body
{
"operator": "GetNetParam",
"info": {
"IPAddr": "192.168.2.10",
"Submask": "255.255.255.0",
"Gateway": "192.168.2.1",
"ListenPort": 5000,
"WebPort": 80
}
}

3.4.2 Set network parameters

Operator: SetNetParam
URI:http://<server ipaddr>/action/SetNetParam

e.g.,
http://192.168.2.10/action/SetNetParam
Issued body
{
"operator": "SetNetParam",
"info": {
"IPAddr": "192.168.2.10",
"Submask": "255.255.255.0",
"Gateway": "192.168.2.1",
"ListenPort": 5000,
"WebPort": 80
}
}

24
3.5 Time parameter

Gets or sets the time parameter.


Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetSysTime GetSysTime: Get time
or parameters
SetSysTime SetSysTime: Set the
time parameter
number
info Json object specific contents
Year unsigned short 1900~ year
(optional)
Month unsigned short 1~12 month
(optional)
Day unsigned short 1~31 day
(optional)
Hour unsigned short 0~23 Time
(optional)
Minute unsigned short 0~59 Minute
(optional)
Second unsigned short 0~59 second
(optional)

3.5.1 Get system time

Operator: GetSysTime
URI:http://<server ipaddr>/action/GetSysTime

e.g.,
http://192.168.2.10/action/GetSysTime
Reply body
{
"operator": "GetSysTime",
"info": {
25
"Year": 2018,
"Month": 3,
"Day": 25,
"Hour": 20,
"Minute": 30,
"Second": 50
}
}

3.5.2 Set the system time

Operator: SetSysTime
URI:http://<server ipaddr>/action/SetSysTime

e.g.,
http://192.168.2.10/action/SetSysTime
Send body
{
"operator": "SetSysTime",
"info": {
"Year": 2018,
"Month": 3,
"Day": 25,
"Hour": 20,
"Minute": 30,
"Second": 50
}
}

3.6 ntp parameter

Gets or sets the ntp parameter.


Parameter information (Note: optional is optional):
Key Type Values Description
26
operator char GetSysNTP GetSysNTP: Get NTP
or parameters SetSysNTP:
SetSysNTP
Set NTP parameters
info json object specific contents
NtpEnable int 0~1 Whether to
(optional) enable ntp time
0: do not enable
1: enable
NtpUrl char NTP server IP address (up to
(optional) 64 bytes)
NtpPort int ntp server port
(optional)

27
NtpTimeZone int 1~30 Time zone
(optional) 1: (gmt-12: 00) Sun Line West
2: (gmt-11: 00) Midway, Samoa
3: (gmt-10: 00) Hawaii
4: (gmt-09: 00) Alaska
5: (gmt-08: 00) Pacific Time
(US and Canada)
6: (gmt-07: 00) Mountain Time
(US and Canada)
7: (gmt-06: 00) Central Time
(US and Canada)
8: (gmt-05: 00) Eastern Time
(US and Canada)
9: (gmt-04: 00) Atlantic Time
(Canada)
10: (gmt-03: 30) Newfoundland
11: (gmt-03: 00) Georgetown,
Brasilia
12: (gmt-02: 00) Mid-Atlantic
13: (gmt-01: 00) Cape Verde
Islands, Azores
14: (gmt + 00: 00) Dublin,
Edinburgh, London
15: (gmt + 01: 00) Amsterdam,
Park

28
Lin, Rome, Paris
16: (gmt + 02: 00) Athens,
Jerusalem, Istanbul
17: (gmt + 03: 00) Baghdad,
Kuwait, Moscow
18: (gmt + 03: 30) Tehran
19: (gmt + 04: 00) Caucasus
Standard Time
20: (gmt + 04: 30) Kabul
21: (gmt + 05: 00) Islamabad,
Karachi, Tashkent
22: (gmt + 05: 30) Madras,
Mumbai, New Delhi
23: (gmt + 06: 00) Almaty,
Novosibirsk, Dhaka
24: (gmt + 07: 00) Bangkok,
Hanoi, Jakarta
25: (gmt + 08: 00) Beijing,
Urumqi, Singapore
26: (gmt + 09: 00) Seoul,
Tokyo, Osaka, Sapporo
27: (gmt + 09: 30) Adelaide,
Darwin
28: (gmt + 10: 00) Melbourne,
Sydney, Canberra
29: (gmt + 11: 00) Magadan,
Solomon Islands
30: (gmt + 12: 00) Auckland,
Wellington
NtpInterval unsigned int ntp time interval in hours

3.5.1 Get ntp parameters

Operator: GetSysNTP
URI:http://<server ipaddr>/action/GetSysNTP
29
e.g.,
http://192.168.2.10/action/GetSysNTP
Reply body
{
"operator": "GetSysNTP",
"info": {
"NtpEnable": 0,
"NtpUrl": "time.windows.com",
"NtpPort": 123,
"NtpTimeZone": 25,
"NtpInterval": 1
}
}

3.5.2 Setting ntp parameters

Operator: SetSysNTP
URI:http://<server ipaddr>/action SetSysNTP

e.g.,
http://192.168.2.10/action/SetSysNTP
Send body
{
"operator": "SetSysNTP",
"info": {
"NtpEnable": 0,
"NtpUrl": "time.windows.com",
"NtpPort": 123,
"NtpTimeZone": 14,
"NtpInterval": 1
}
}

30
3.7 Central connection

Gets or sets the central connection parameters.


Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetCenter GetCenter: Get center
or connection parameters
SetCenter SetCenter: Set the
center connection
Connection parameters
info json object specific contents
ConnectCenter int 0~1 Whether to
(optional) enable center
connection 0:
Not enabled
1: enable
CenterUrl char Central server IP
(optional) address (max.
(64 bytes)
CenterPort int Hub server port
(optional)
CenterUser char User name, maximum
(optional) length 30
Character length
(including terminator)
CenterPwd char Password, maximum 30
(optional) characters
Character length
(including terminator)
SendSnapImage int 0~1 Whether to send
(optional) real-time
pictures 0: Do
not send
1: send
SendVerifyResult int 0~1 Whether to send
(optional) authentication

31
results 0: Do
not send
1: send

3.5.1 Get central connection parameters

Operator: GetCenter
URI: http://<server ipaddr>/action/GetCenter

e.g.,

32
http://192.168.2.10/action/GetCenter
Reply body
{
"operator": "GetCenter",
"info": {
"ConnectCenter": 0,
"CenterUrl": "192.168.2.10",
"CenterPort": 6666,
"CenterUser": "admin",
"CenterPwd": "admin",
"SendSnapImage": 1,
"SendVerifyResult": 1
}
}

3.5.2 Set center connection parameters

Operator: SetCenter
URI:http://<server ipaddr> /action/SetCenter

e.g.,
http://192.168.2.10 / action /
SetCenter Send the body
{
"operator": "SetCenter",
"info": {
"ConnectCenter": 0,
"CenterUrl": "192.168.2.10",
"CenterPort": 6666,
"CenterUser": "admin",
"CenterPwd": "admin",
"SendSnapImage": 1,
"SendVerifyResult": 1
}

33
}

3.8 Restore Factory

Gets or sets the central connection parameters.


Parameter information (Note: optional is optional):
Key Type Values Description
operator char SetFactoryDefault Set the device to
factory reset
info json object specific contents
DefaltDoorSet unsigned 0~1 Whether the door
char opening condition is
(optional) restored to factory
0: Does not restore
to factory
1: restore factory
DefaltSoundSe unsigned 0~1 Whether the sound
t char settings are
(optional) restored to factory
0: Do not restore to
factory
1: restore factory
DefaltNetPar unsigned 0~1 Whether the network
char parameters are
(optional) restored to factory
0: Do not restore to
factory
1: restore factory
DefaltCenterP unsigned 0~1 Whether the central
ar char connection parameters
(optional) are restored to the
factory
0: No factory reset
1: restore factory

34
DefaltCapture unsigned 0~1 Whether the snapshot
char record is restored
(optional) to factory 0: Do not
restore to factory
1: restore factory
DefaltLog unsigned 0~1 Whether the log
char records are restored
(optional) to factory 0: Do not
restore to factory
1: restore factory
DefaltPerson unsigned 0~1 Whether the personnel
char list library is
(optional) restored
0: No factory reset
1: restore factory
DefaltRecord unsigned 0~1 Control whether
char records are restored
to factory
0: No factory reset

35
(optional) 1: restore factory
DefaltMaintai unsigned 0~1 Whether the system
nTime char maintenance time is
(optional) restored to the
factory
0: No factory reset
1: restore factory
DefaltSystemS unsigned 0~1 System parameters:
ettings char system language; ID
(optional) card reader type;
whether to record
snapshots, ID cards,
authentication
records, whether to
restore the factory
0: No factory reset
1: restore factory
DefaltEnterIP unsigned 0~1 (Used by the face
C char analysis server),
(optional) whether the camera
parameters are
restored to factory
settings
0: No factory reset
1: restore factory
DefaltServerB unsigned 0~1 (Used by the face
asicPara char analysis server),
(optional) basic parameter
configuration:
information release;
channel selection;
whether to clear the
interface snapshot and
comparison information
Whether to

36
restore the
factory 0: Do
not restore the
factory
1: restore factory

DefaltWorktyp unsigned 0~1 (Used by the face


e char analysis server),
(optional) whether the personnel
type parameters are
restored to the
factory
0: No factory reset
1: restore factory

Operator: SetFactoryDefault
URI: http://<server ipaddr>/action/SetFactoryDefault

e.g.,
http://192.168.2.10/action/SetFactoryDefault
Send body

37
{
"operator": "SetFactoryDefault",
"info": {
"DefaltDoorSet": 0,
"DefaltSoundSet": 0,
"DefaltNetPar": 0,
"DefaltCenterPar": 0,
"DefaltCapture": 0,
"DefaltLog": 0,
"DefaltPerson": 0,
"DefaltRecord": 0,
"DefaltMaintainTime": 0,
"DefaltSystemSettings": 0,
"DefaltEnterIPC": 0,
"DefaltServerBasicPara": 0,
"DefaltWorktype": 0

}
}

3.9 Device Information

Get or set device information.


Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetSysParam or Get or set system
SetSysParam device information

info json object specific contents


Name char Device names, up to 64
(optional) Character length
(including terminator)
DeviceID int Device id (not
(optional) settable)

Version char System version (not


(optional) settable)
38
3.9.1 Get device information

Operator: GetSysParam
URI:http://<server ipaddr>/action/GetSysParam

e.g.,
http://192.168.2.10/action/GetSysParam
Reply body
{
"operator": "GetSysParam",
"info": {
"Name": "facegate1",
"DeviceID": 1300001,
"Version": "v4.0.5-0.0.6.0"
}
}

3.9.2 Set device information

Allows setting the


name of the device.
URI:http://<server ipaddr>/action/SetSysParam

e.g.,
http://192.168.2.10/action/SetSysParam
Reply body
{
"operator": "SetSysParam",
"info": {
"Name": "facegate_test"
}
}

39
3.10 Add, edit and modify the list

Add and modify the list. Corresponding person list pictures can be
delivered with the key value of picinfo to fill in the base64 image
data, or the key value of picURI can be used to fill in the picture's
URI address. Picture data. Choose 2 of these two methods. When picinfo
Key
and picURI Type in at the same
are passed Values
time, the dataDescription
corresponding to
operator char by default.
picinfo is obtained AddPerson
Parameter information (Note:
AddPerson: add aoptional
list
is optional): or to the list library
EditPerson EditPerson: Modify List
Library
Personnel Information
info json object specific contents
DeviceID int The device id number
of the device to be
operated. 3.9
Equipment Letter
Information
acquisition.
IdType int 0~2 ID type to be
operated, 0:
CustomizeID, 1: LibID,
(modified for use)
2:PersonUUID
CustomizeID unsigned int User-defined id
(optional) Required if IdType = 0
LibID int Database id (for
(optional) modification)
Required if IdType = 1
PersonUUID char User-defined uuid
(optional) Required if IdType = 2
PersonType int 0 ~ 1 (one List Type
(optional) machine) 0:
0 ~ 11 (Analysis Whitelist
server)
40
1: blacklist
2-11: Personnel Type
(Used by Analysis
Server)
(optional) 0: male
1: female
Nation int 1~57 Nation
(optional) 1: "Han"
2: "Mongolia"
3: "Back
4: "Hidden"
5: "Uygur"
6: "Miao"
7: "Yi"
8: "Zhuang"
9: "Buy"
10: "North Korea"
11: "Full"
12:"侗"
13: "Yao"
14: "White"
15: "Tujia"
16: "Harry"
17: "Kazakh"
18:"傣"
19: "Li"
20:"傈僳"
21:"佤"
22:"畲"
23: "Alpine"
24: "Lahu"
25: "Water"
26: "Dongxiang"
27: "Naxi"
28: "Jingpo"
29: "Kirkizi"
30: "Earth"
31: "Daur"
32: "Gulao"

41
33:"羌"
34: "Brown"
35: "Sarah"
36: "Mao Nan"
37: "Gulao"
38: "Xiebo"
39: "Achang"
40: "Pumi"
41: "Tajik"
42: "Angry"
43: "Uzbekistan"
44: "Russia"
45: "Ewenki"
46: "Dang"
47: "Security"
48: "Yugu"
49: "King"
50: "Tatar"
51: "Dulong"
52: "Olunchun"
53: "Hezhe"
54: "Memba"
55:"珞巴"
56: "Keno"
57: "Other"
CardType int type of certificate
(optional) 0: ID card
IdCard char ID number, maximum
(optional) length is 32
Character length
(including terminator)
Birthday char YYYY-MM-DD Birthday, eg, 2018-1-1
(optional)
Telnum char Phone number with a
(optional) maximum length of 32
Character length
42
(including terminator)

Native char Hometown, 32 characters


(optional) maximum
Character length
(including terminator)

43
Address char Address with a maximum
(optional) length of 72 words
Character length
(including terminator)
Notes char Remarks, maximum length
(optional) is 64 words
Character length
(including terminator)
MjCardFrom int 0~3 Wigan Card
(optional) Number
Generation
Method 0: Public
Card Number
1: automatically
generated
2: manual input
3: Do not use access
card number
WiegandType int 0~1 or 6~7 Make up the Wiegand
protocol according to
(optional)
Wiegand number; when
MjCardFrom = 2 is
required; 0: 26 digits
1: 34 bits
6:26 bits (8 + 16
(facility
code + userid)
7:34 digits (8 + 24
facility code + userid
(device code + card
number) should be filled
in separately)
Default: 1 (34-bit)
WGFacilityCo int Facility code;
de (optional) required when
WiegandType = 6 or 7;
used with MjCardNo.
When WiegandType = 0
or 1, it is not
necessary to fill in
3.10.5Wigan access
card number and built-
44
in swipe card
id card number

MjCardNo unsigned int Wiegand access card


(optional) number (userid);
required when
WiegandType = 6 or 7,
used with
WGFacilityCode. When
WiegandType = 0 or 1,
it constitutes Wiegand
card number separately.
See details 3.10.5
Wigan Access Card
Number and built-in
swipe id card number
CardMode unsigned int 0~1 The access control
(optional) card number is
composed of mode 0:
Decimal card number
1: Hex form card number

45
Default 0: Decimal card
number
See details 3.10.5
Wigan Access
CardNumber and built-
in swipe id card
number
RFIDCard Char Id card number,
(optional) maximum length is 18
characters, for built-
in card swipe models
(including
terminator). 3.10.5
Wigan Access Card
Number
And built-in swipe id
card number
Tempvalid int 0~3 Whether it is a
(optional) temporary list
0: permanent
list
1: Temporary List 1
(start and end time
period)
2: Temporary List 2
(daily time period,
new database version
support) 3: Temporary
List 3 (valid times
Number, new database
version support)

46
CustomizeID unsigned int User-defined personnel
(optional) id number, you can use
this id number to
modify and delete the
corresponding personnel
information management.
Note: Do not use the
same id repeatedly to
add personnel,
otherwise it will lead
to modification and
deletion.
Make an error.
PersonUUID char User-defined personnel
(optional) uuid number, you can
use this uuid number
to modify and delete
the corresponding
personnel information
management. Note: Do
not reuse the same id
to add personnel,
otherwise it will
cause errors such as
modification and
deletion (not more
than 48).
byte)
ValidBegin char YYYY-MM-DDThh:mm If it is a temporary
(optional) :ss list1, the time when
the temporary list
takes effect, eg,
2018-03-12T09:09:20

47
If it is a temporary
list 2: eg,
2018-03-12T09:09:20
2018-03-12 is the
start time of the
temporary list;
09:09:20
The start time of the
effect is in minutes
and seconds;
ValidEnd char YYYY-MM-DDThh:mm If it is provisional
(optional) :ss list 1, the end time
of provisional list 1
entry into force, eg,
2018-03-12T09:10:00
If it is a temporary
list 2: eg,
2018-03-12T09:09:20
2018-03-12 is the end
date of the
provisional list;
09:09:20
The end time of the
effect is in minutes
and seconds;
ChannelAutho int 0~1 Xth channel authority:
rityX (optional) 0: no channel
authority 1: have
channel authority
(person
(Face multiplex server
used)
EffectNumber unsigned int 0 <EffectNumber< Valid Passes for
(optional) 2^32 Temporary List 3
Number, 1 ~ 4294967295

48
isCheckSimil int 0~1 Whether to perform
arity (optional) picture verification
(if the similarity of
the added picture is
greater than the
threshold of the black
and white list, it
indicates that the
list already exists).
1: check
IdCardId char ID card ID, the maximum
(optional) length is 32 characters
(including the
terminator).
(Only for access
control machines, other
machines
Type is invalid)
AccessId char Access card number, the
(optional) maximum length is 24
characters (including
the terminator).
(Only for access
control machines, other
machines

49
Type is invalid)
WardenId char Administrator
(optional) authorization card,
the maximum length is
32 characters
(including the
terminator). (Only for
access control
machines,
(Other models are
invalid)
RoomNum char Room number. The
(optional) maximum length is 24
characters (including
the terminator).
(Only for access
control machines, other
machines
Type is invalid)
picinfo char Face64-encoded data of
And picURI face pictures (no more
than 1M)
picURI char https://btngps.o Cloud uri address of
And picinfo ss-cn-beijing.al face image data
iyuncs.com/image
/xxx.jpg

3.10.1 Single list add

Operator: AddPerson
URI:http://<server ipaddr>/action/AddPerson

e.g.,
http://192.168.2.10/action/AddPerson
Send body
50
eg1, add permanent list + Wigan access card number 1046239 (decimal
card number, Wigan 34 digits) + picture data using base64 encoding
{
"operator": "AddPerson",
"info": {
"DeviceID":1300001,
"PersonType": 0,
"Name":"张三",

51
"Gender":0,
"Nation":0,
"CardType":0,
"IdCard":"430923199011044411",
"Birthday":"1990-11-04",
"Telnum":"18888888888",
"Native": "Guangdong",
"Address": "Shenzhen Baoan",
"Notes": "Notes",
"MjCardFrom": 2,
"WiegandType": 1,
"CardMode": 0,
"MjCardNo": 1046239,
"Tempvalid": 0,
"CustomizeID": 123456,
"PersonUUID": "4476c20c-23ce-4178-8672-b292d33a3cd8",
"isCheckSimilarity": 0
},
"picinfo":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQAB ..... "
}

Or
eg2, add temporary list 1 + Wigan access card number 9A018B2D
(hexadecimal card number, Wigan 8 + 24) + picture data using URI
{
"operator": "AddPerson",
"info": {
"DeviceID":1300001,
"PersonType": 0,
"Name":"test",
"Gender":0,
"Nation":0,
"CardType":0,
"IdCard":"430923199011044411",
"Birthday":"1990-11-04",

52
"Telnum":"18888888888",
"Native": "Guangdong",
"Address": "Shenzhen Baoan",
"Notes": "Notes",
"MjCardFrom": 2,
"WiegandType": 7,
"CardMode": 1,
"WGFacilityCode": 9A,
"MjCardNo": 018B2D,
"Tempvalid": 1,
"CustomizeID": 123456,
"PersonUUID": "4476c20c-23ce-4178-8672-b292d33a3cd8",
"isCheckSimilarity": 0,
"ValidBegin":"2018-03-12T09:09:20",
"ValidEnd":"2020-12-14T23:59:59",
},
"picURI":"https://btngps.oss-cn-beijing.aliyuncs.com/image/xxx.jp
g"
}

eg3, add temporary list 3 + Wigan access card number 9A0192B3


(hexadecimal card number, Wigan 8 + 24, Wigan output use) + ID card
number 9A0192B3 (built-in credit card model, credit card comparison
for general use) + picture data Use URI
{
"operator": "AddPerson",
"info": {
"DeviceID":1300001,
"PersonType": 0,
"Name":"test",
"Gender":0,
"Nation":0,
"CardType":0,
"IdCard":"430923199011044411",
"Birthday":"1990-11-04",

53
"Telnum":"18888888888",

54
"Native": "Guangdong",
"Address": "Shenzhen Baoan",
"Notes": "Notes",
"MjCardFrom": 2,
"WiegandType": 7,
"CardMode": 1,
"WGFacilityCode": 9A,
"MjCardNo": 0192B3,
"RFIDCard": "9A0192B3",
"Tempvalid": 3,
"CustomizeID": 123456,
"PersonUUID": "4476c20c-23ce-4178-8672-b292d33a3cd8",
"isCheckSimilarity": 0,
"EffectNumber": 5,
},
"picURI":"https://btngps.oss-cn-beijing.aliyuncs.com/image/xxx.jp
g"
}

3.10.2 Multiple lists added

Operator: AddPersons
URI:http://<server ipaddr>/action/AddPersons
e.g.
http://192.168.2.10/action/AddPersons
send body
{
"operator":"AddPersons",
"DeviceID":1310023,
"Total":3,
"Personinfo_0":{
"PersonType":0,

55
"Name":"test",
"Gender":0,
"Nation":0,
"CardType":0,
"IdCard":"430923199011044411",
"Birthday":"1990-11-04",
"Telnum":"18888888888",
"Native": "Guangdong",
"Address": "Shenzhen Baoan",
"Notes": "Notes",
"MjCardFrom": 2,
"WiegandType": 1,
"CardMode": 0,
"MjCardNo": 1046240,
"Tempvalid": 0,
"CustomizeID": 120,
"PersonUUID": "4476c20c-23ce-4178-8672-b292d33a3cd6",
"isCheckSimilarity": 0,
"ValidBegin":"2019-02-12T09:09:20",
"ValidEnd":"2019-03-12T09:09:20",
"picinfo":"data:image/jpeg;base64,/9j/4AAQSAAQAB ..... "
},
"Personinfo_1":{
......
}
......
}

Or

{
"operator":"AddPersons",
"DeviceID":1310023,
"Total":3,
"Personinfo_0":{

56
"PersonType":0,
"Name":"test",
"Gender":0,
"Nation":0,
"CardType":0,
"IdCard":"430923199011044411",
"Birthday":"1990-11-04",
"Telnum":"18888888888",
"Native": "Guangdong",
"Address": "Shenzhen Baoan",
"Notes": "Notes",
"MjCardFrom": 2,
"WiegandType": 7,
"CardMode": 1,
"WGFacilityCode": 9A,
"MjCardNo": 0192B3,
"RFIDCard": "9A0192B3",
"Tempvalid": 0,
"CustomizeID": 120,
"PersonUUID": "4476c20c-23ce-4178-8672-b292d33a3cd6",
"isCheckSimilarity": 0,
"ValidBegin":"2019-02-12T09:09:20",
"ValidEnd":"2019-03-12T09:09:20",
"picURI":"https://btngps.oss-cn-beijing.aliyuncs.com/image/xx
x.jpg"
},
"Personinfo_1":{
......
}
......
}

57
3.10.3 List edit

Edit and modify the list according to LibID (database id) or


CustomizeID or UUID. The parameters that need to be modified are
optional. If you do not need to modify, the corresponding Key should
not appear in the issued data.

Operator: EditPerson
URI:http://<server ipaddr>/action/EditPerson

e.g.,
http://192.168.2.10/action/EditPerson
Send body
{
"operator": "EditPerson",
"info": {
"DeviceID":1300001,
"IdType":0,
"CustomizeID":123,
"PersonType": 0,
"Name":"hahaha",
"Gender":0,
"Nation":0,
"CardType":0,
"IdCard":"430923199011044411",
"Birthday":"1999-11-04",
"Telnum":"19999999999",
"Native": "Mars",
"Address": "Shenzhen Baoan",
"Notes": "Notes",
"MjCardFrom": 2,
"WiegandType": 1,
"CardMode": 0,
"MjCardNo": 1046239,
"Tempvalid": 0,
"IdType": 0, 58

"ValidBegin":"2018-03-12T09:09:20",
"ValidEnd":"2018-03-12T09:09:20",
},
"picinfo": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBXgFeAABD……"
}
Or
{
"operator": "EditPerson",
"info": {
"DeviceID":1300001,
"IdType":1,
"LibID":123,
"PersonType": 0,
"Name":"hahaha",
"Gender":0,
"Nation":0,
"CardType":0,
"IdCard":"430923199011044411",
"Birthday":"1999-11-04",
"Telnum":"19999999999",
"Native": "Mars",
"Address": "Shenzhen Baoan",
"Notes": "Notes",
"MjCardFrom": 2,
"WiegandType": 7,
"CardMode": 1,
"WGFacilityCode": 9A,
"MjCardNo": 018B91,
"Tempvalid": 1,
"ValidBegin":"2018-03-12T09:09:20",
"ValidEnd":"2018-03-12T09:09:20",
" ChannelAuthority0":"1",
" ChannelAuthority1":"1",
" ChannelAuthority2":"1",
" ChannelAuthority3":"1"
},

59
"picURI":"https://btngps.oss-cn-beijing.aliyuncs.com/image/xxx.jpg"
}
Or
{
"operator": "EditPerson",
"info": {
"DeviceID":1300001,
"IdType":2,

"PersonUUID":"5763a498-2fce-4d25-aa00-45b8278d9788",

"PersonType": 0,
"Name":"hahaha",
"Gender":0,
"Nation":0,
"CardType":0,
"IdCard":"430923199011044411",
"Birthday":"1999-11-04",
"Telnum":"19999999999",
"Native": "Mars",
"Address": "Shenzhen Baoan",
"Notes": "Notes",
"MjCardFrom": 2,
"WiegandType": 7,
"CardMode": 1,
"WGFacilityCode": 9A,
"MjCardNo": 123CB3,
"RFIDCard": "9A123CB3",
"Tempvalid": 3,
"EffectNumber": 10
},
"picinfo": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBXgFeAABD……"
}

3.10.4 Get new and old database version

The new database supports temporary list 2 and temporary list 3. The old
60
database is restored to the factory in the latest version,

61
Restart the device, after the device

starts, it will be the latest database.


Key Type Values Description
Parameter information:
operator char GetDatabaseVer Get the database
version of the device
info json object specific contents
DatabaseVersio int 0~1 Database
n version 0:
old
database
1: new database
Operator: GetDatabaseVer
URI:http://<server ipaddr>/action/GetDatabaseVer

e.g.,
http://192.168.2.10/action/GetDatabaseVer
Reply body
{
"operator": "GetDatabaseVer",
"info": {
" DatabaseVersion ": 1
}
}

3.10.5 Wigan access card number and built-in swipe id


card number

The Wigan access card number is mainly for models with external
card readers, and the card number needs to be filled in for
comparison and pass under the card swipe mode; all Wigan output uses
this Wigan access card number. In the mode with the Wiegand protocol
selected as 8 + 16 or 8 + 24, the WGFacilityCode and MjCardNo fields
together form the Wigan access card number; in the mode with 26 or 34
bits, the MjCardNo field alone constitutes the Wigan access card
62
number.
The built-in credit card model of the face recognition machine
uses the RFIDCard (ID card number) field for pass comparison. This
field can be an RF card number or an ID card number; if the built-in
card model requires a Wigan card number Output, also need to follow
3.10 Adding, Editing and Modifying ListsThe rule fills in the
corresponding Wigan access card number; that is, the RFIDCard field is
used for comparison in the swipe mode, and the Wigan access card
number is the card number output by the Wigan signal.

63
Regarding 3.12.4 reporting of authentication results and 3.19 list
search query and 3.22 control record query return, Wiegand access card
number fields are all based on 3.2 Door opening condition settingThe
Wiegand and CardMode parameters are returned correspondingly. If the
system parameter Wiegand is 4 or 5 or 6 or 7, the returned
WGFacilityCode and MjCardNo fields together form the Wiegand access
card number; when Wiegand is 0 or 1, the MjCardNo field separately
forms the Wiegand Access card number; In CardMode card number mode is
0 (decimal) mode, the returned Wiegand access card number is decimal,
and in CardMode card number mode is 1 (hexadecimal) mode, Wiegand
access card number is returned in hexadecimal. RFIDCard field The
returned value is a string.It is not judged whether the decimal or
hexadecimal number.When the customer adds the list, he needs to
distinguish it by himself.

3.11 Delete list

The delete personnel list interface will also delete the control
records (authentication records) of the corresponding personnel list
and cannot be restored. Exercise caution; if the deletion of all
personnel lists is called successfully, the face recognition unit
will automatically restart.

3.11.1 Single or multiple list deletion

The deletion of the list provides the way to delete LibID or


customID. LibID or customID cannot be 0 parameter information
Key optional is
(Note: Type
optional): Values Description
operator char DeletePerson or DeletePerson: delete
DeleteAllPerson the personal
information in the
list library
DeleteAllPerson:
delete all
Personnel list
64
information
info json object specific contents
DeviceID int The device id number
of the device to be
(optional) LibID is an unsigned
int type, the format
is a Json array of
LibID
Required if IdType = 0
CustomizeI json array A collection of single
D (optional) or multiple
CustomizeIDs.
CustomizeID is of type
int and the format is
Json array of
CustomizeID
Required if IdType = 1
PersonUUID json array A collection of single
(optional) or multiple UUIDs. The
UUID is a char string
of 48 bytes or less.
The format is a Json
array of UUIDs.
Required if IdType = 2
DeleteAllP json array 1 Required if operator
ersonCheck is DeleteAllPerson

Operator: DeletePerson
URI:http://<server ipaddr>/action/DeletePerson

e.g.,
http://192.168.2.10/action/DeletePerson
Send body
{
"operator": "DeletePerson",
"info": {
"DeviceID": 1300001,
"TotalNum": N,
"IdType": 0,
"CustomizeID":[1, 2, 3, ..... ]
65
}
}
Or
"operator": "DeletePerson",
"info": {
"DeviceID": 1300001,
"TotalNum": N,
"IdType": 1,
"LibID": [1, 2, 3, ..... ]
}
}
Or
{
"operator": "DeletePerson",
"info": {
"DeviceID": 1300001,
"TotalNum": N,
"IdType": 2,
"PersonUUID": ["4476c20c-23ce-4178-8672-b292d33a3cd8", ... ]
}
}

3.11.2 All personnel list deleted

The All Person List Deletion Interface also deletes the registered
images of the control records (authentication records) of all
personnel lists and is irrecoverable. Operate with caution; if you
delete all personnel lists successfully, the face recognition unit
will automatically restart.

Operator: DeleteAllPerson
URI: http://<server ipaddr>/action/DeleteAllPerson

e.g.,
http://192.168.2.10/action/DeleteAllPerson
Send body
66
{
"operator": "DeleteAllPerson",
"info":
{
"DeleteAllPersonCheck": 1
}
}

3.12 Data Subscription

The types of data subscriptions include: subscriptions to


authentication result information, subscriptions to strangers'
snapshots, etc. When the breakpoint resume transmission function is
enabled, the pushed snapshots and authentication information of
strangers need to be returned by the server.

Parameter information (Note: optional is optional):


Key Type Values Description
operator char Subscribe News subscription
info json specific contents
object
DeviceID int The device id of the device to
be operated.
Obtained through 3.9 Device
Information Acquisition.
Num int 1~3 How many types of information
to subscribe
Topics json array "Snap", A collection of single or multiple
subscription message types (no more
"Verify",
than
"VerifyWithS
128 bytes), such as:
nap",
["Snap"]: subscribe to
"VerifyWithR
real-time snapshot
eg",
report or
"VerifyNoPic
["Verify"]: Report on
",
subscription verification
"QRCode",
results or
"Card",
["VerifyWithSnap"]: Report on
"PassWord" , subscription verification results
"IDCard" (With snap picture only)
or
["VerifyWithReg"]: Report on
subscription verification results
(With registration image only)
or
["VerifyNoPic"]: Report on
subscription verification results
(not

51
(With
pictur
e) or
["QRCode"]: Subscribe to
QR code report or
["Snap", "Verify"] Subscribe to
capture snapshots and report
verification results
or
["Card"] Subscribe access control
IC card authentication result
report or
["PassWord"] Subscribe access
control device password
authentication result report
["IDCard"] Subscribe for ID card
information report
SubscribeA char http://< Subscription address,
ddr Subscribe including ip and port, eg,
server http://192.168.2.11:8080
ip>:port
SubscribeU json A collection of single or
rl object multiple reported URLs,
including snapshots,
authentication results,
heartbeats, QR codes, IC card
number authentication results
(access control machines),
password authentication results
(access control machines), and
ID information.eg,
{"Snap":"/Subscribe/Snap",
"Verify":"/Subscribe/Verify",
"HeartBeat":"/Subscribe/heartb
eat",
"Card":"/Subscribe/Card",
"QRCode":"/Subscribe/QRCode ",
"PassWord":"/Subscribe/
PassWord ",
"IDCard":"/Subscribe/IDCard"}

BeatInterv int(optio Heartbeat interval, in seconds,


al nal) if not set, silent
Recognize 30 seconds
bTimedPush int(optio 0~1 Snapshots, authentication, QR
nal) codes, etc. are pushed to the
server at regular intervals,
and are not turned on by
default.
0: Do not enable scheduled push
52
1: turn on regular push
PushInterv int(optio Required when bTimedPush = 1,
al nal) regular push
interval
Auth char “none” Whether to authenticate when
(optional or“Basic” submitting the report
) information
None: No authentication is
required
Basic: post
User char User name, up to 64 characters
(optional in length (with terminator)
) Required if Auth = Basic
Pwd char Password with a maximum length
(optional of 64 characters (including
) terminator)
Required if Auth = Basic
Resumefrom int 0~1 Whether to enable breakpoint
Breakpoint resuming (in the stranger
snapshot subscription or
authentication subscription
mode), 0: do not enable 1:
enable. Do not enable the
breakpoint resuming function,
only to ensure that data is
pushed, and no server return
is required. If the function
is enabled, push The stranger
snapshot information and
authentication information
requires the server to return
the following json packet:
{
"code": 200,
"desc": "OK",
}
After 10 seconds, the all-in-
one does not receive the
correct data packet from the
server, then it continues to
push this information.

BeginTime char YYYY-MM-DDTh The default start time of


(optional h:mm:ss resuming a breakpoint can be
) omitted. The default is to set
the time for the stranger
snap-up subscription or
authentication subscription
and the time to resume the
breakpoint. When the push of
the stranger snapshot and
authentication snapshot
information before the
breakpoint is completed, ,
This time will become the
completion of the breakpoint
resume transmission push
Time.eg, 2018-03-12T09: 10: 00

53
3.12.1 Pushed Information Does Not Need
Authentication

Operator: Subscribe
URI:http://<server ipaddr>/action/Subscribe

e.g.,
http://192.168.2.10/action/Subscribe
Send body
{
"operator": "Subscribe",
"info": {
"DeviceID": 1300001,
"Num": 2,
"Topics":["Snap", "Verify"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"Snap":"/Subscribe/Snap",
"Verify":"/Subscribe/Verify", "HeartBeat":"/Subscribe/heartbeat"},
"BeatInterval":30,
"ResumefromBreakpoint":0,
"Auth":"none"
}
}
Or
{
"operator": "Subscribe",
"info": {
"DeviceID": 1300001,
"Num": 2,
"Topics":["Snap", "VerifyWithReg"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"Snap":"/Subscribe/Snap",
"Verify":"/Subscribe/Verify", "HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint":1,
"Auth":"none"
}

54
}
Or
{
"operator": "Subscribe",
"info": {
"DeviceID": 1300001,
"Num": 1,
"Topics":["QRCode"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"QRCode":"/Subscribe/QRCode",
"HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint":0,
"Auth":"none"
}
}
Or
{
"operator": "Subscribe",
"info": {
"DeviceID": 1300001,
"Num": 1,
"Topics":["PassWord"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"PassWord":"/Subscribe/PassWord",
"HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint":0,
"Auth":"none"
}
}
Or
{
"operator": "Subscribe",
"info": {
"DeviceID": 1300001,
"Num": 1,

55
"Topics":[" Card"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"Card":"/Subscribe/Card",
"HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint":0,
"Auth":"none"
}
}

...

3.12.2 Provide username and password when subscribing

Operator: Subscribe
URI:http://<server ipaddr>/action/Subscribe

e.g.,
http://192.168.2.10/action/Subscribe
Send body
{
"operator": "Subscribe",
"info": {
"DeviceID": 1300001,
"Num": 2,
"Topics":["Snap", "Verify"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"Snap":"/Subscribe/Snap",
"Verify":"/Subscribe/Verify", "HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint":1,
"Auth":"Basic",
"User": "admin",

1
"Pwd": "amdin"
}
}
Or
{
"operator": "Subscribe",
"info": {
"DeviceID": 1300001,
"Num": 2,
"Topics":["Snap", "VerifyWithReg"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"Snap":"/Subscribe/Snap",
"Verify":"/Subscribe/Verify", "HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint":1,
"Auth":"Basic",
"User": "admin",
"Pwd": "amdin"
}
}
Or
{
"operator": "Subscribe",
"info": {
"DeviceID": 1300001,
"Num": 1,
"Topics":["QRCode"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"QRCode":"/Subscribe/QRCode",
"HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint":0,
"Auth":"Basic",
"User": "admin",
"Pwd": "amdin"
}
}

2
Or
{
"operator": "Subscribe",
"info": {
"DeviceID": 1300001,
"Num": 1,
"Topics":["PassWord"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"PassWord":"/Subscribe/PassWord",
"HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint":0,
"Auth":"Basic",
"User": "admin",
"Pwd": "amdin"
}
}
Or
{
"operator": "Subscribe",
"info": {
"DeviceID": 1300001,
"Num": 1,
"Topics":["Card"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"Card":"/Subscribe/Card",
"HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint":0,
"Auth":"Basic",
"User": "admin",
"Pwd": "amdin"
}
}

...

3
3.12.3 Strangers report

Parameter information:
Key Type Values Description
operator char SnapPush Stranger snap shots
info json object specific contents
DeviceID int Device id
CreateTime char YYYY-MM-DD Device current time. Eg,
Thh:mm:ss 2018-03-25T21:50:05
PictureType unsigned int 0~4 Snapshot Face
Picture Type 0:
Comparison
failed
1: match successful blacklist
2: match success whitelist
3: ID card + face comparison
failed
4: ID card + face comparison
successful
Temperature double 37.20 Detect the face temperature
in real time. Only when
FaceMaskTPTMode = 1, 4, 5 in
the 3.27 temperature
parameter, the detection
temperature will be returned
(temperature detection
(Test machine version
support)
Temperature int 0~1 Detect whether face
Alarm temperature exceeds threshold
in real time
Value, 0: not exceeded; 1:
exceeded (supported by
temperature detection machine
version)
SnapChannel int 0 ~ maximum Channel number captured by
channel personnel
number Server use)
4
Sendintime int 0~1 Whether to push information
in time, 0: not pushed in
time
Send (Push time is 10
seconds longer than the snap
time) 1: Push in time
SanpPic char Face64 of a face picture
taken by a stranger
Encoded data

e.g.,Raw:
-- HEADERS --
POST /Subscribe/Snap HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=UTF-8
Content-Length: 77181
Accept-Encoding: gzip, deflate

5
User-Agent: FaceGate-HttpClient/0.0.1
Host:192.168.2.10
Connection: Keep-Alive

-- BODY --
{
"operator": "SnapPush",
"info": {
"DeviceID":1300001,
"CreateTime":"2018-03-12T09:09:20",
"PictureType":0,
"Sendintime":1
},
"SanpPic": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEB……"
}

3.12.4 Reporting of certification results

Parameter information:
Key Type Values Description
operator char VerifyPush Authentication result push
info json object specific contents
DeviceID int Device id
PersonID int The ID number of the
person stored in the
device. If the CustomizeID
and PersonUUID are
invalid, the person can be
identified by this ID.
Modification of roster
information
CreateTime char YYYY-MM-DDThh Device current time. Eg,
:mm:ss 2018-03-25T21:50:05
Similarity float 0.0~100.0 Black and white list
1 comparison similarity

6
Similarity float 0.0~100.0 ID card comparison
2 similarity
VerifyStat int 0~3 Certification results

7
us 0: None
1: allow
2: reject
3: not yet registered
VerfyType int 1~3 or 21~22 Verification type.
1: whitelist verification
or 24~25 or 27
2: ID verification
3: white list + ID verification
21: rf card verification
(built-in credit card model)
22: rf card verification +
white list verification
(built-in card type)
24: Wegenka verification
25: Wiganka + whitelist
verification
27: http Open the door remotely
PersonType int 0~1 List Type
0:
Whitelist
1: blacklist
Name char Name (up to 32 bytes)
Gender int 0~2 Sex
0:
Male
1: female
2: other
Nation int 1~57 Nation
1: "Han"
2: "Mongolia"
3: "Back
4: "Hidden"
5: "Uygur"
6: "Miao"
7: "Yi"
8: "Zhuang"
9: "Buy"
10: "North Korea"
11: "Full"
12:"侗"
13: "Yao"
14: "White"

61
15: "Tujia"
16: "Harry"
17: "Kazakh"
18:"傣"
19: "Li"
20:"傈僳"
21:"佤"
22:"畲"
23: "Alpine"
24: "Lahu"
25: "Water"
26: "Dongxiang"
27: "Naxi"
28: "Jingpo"
29: "Kirkizi"
30: "Earth"
31: "Daur"
32: "Gulao"
33:"羌"
34: "Brown"
35: "Sarah"
36: "Mao Nan"
37: "Gulao"
38: "Xiebo"
39: "Achang"
40: "Pumi"
41: "Tajik"
42: "Angry"
43: "Uzbekistan"
44: "Russia"
45: "Ewenki"
46: "Dang"
47: "Security"
48: "Yugu"
49: "King"

62
50: "Tatar"
51: "Dulong"
52: "Olunchun"
53: "Hezhe"
54: "Memba"
55:"珞巴"
56: "Keno"
57: "Other"
CardType int type of certificate
0: ID card
IdCard char ID number, maximum length
is 32 characters
Length (with terminator)
Birthday char YYYY-MM-DD Birthday, eg, 2018-1-1
Telnum char Phone number, up to 32
characters
Character length (including
terminator)
Native char Hometown, maximum length is
32 characters
Degree (with terminator)
Address char Address with a maximum
length of 72 characters
Degree (with terminator)
Notes char Remarks, the maximum length
is 64 characters long
Degree (with terminator)
MjCardFrom int 0~3 Wigan Card
Number
Generation
Method 0: Public
Card Number
1: automatically generated
2: manual input
3: Do not use access card
number
WGFacility int Facility code; when
Code (optional) Wiegand = 4 or 5 or 6 or 7
in 3.2 door opening
conditions, it forms a
Wiegand card number with
the MjCardNo field; when
Wiegand = 0 or 1, this
parameter has no practical
significance. For details,
see 3.10. 5 Wigan Gate
Prohibited card number and
built-in swipe id card
number
MjCardNo unsigned int Wigan access card number
(userid). When Wiegand = 4
in 3.2 opening conditions
or 5 or 6 or 7 Time
and

63
The WGFacilityCode fields
together form the Wigan
card number; when Wiegand
= 0 or 1, they form the
Wigan card number
separately. For details,
see 3.10.5 Wigan Access
Card Number and Built-in
Brush.
Card id card number
RFIDCard Char Id card number, the
(optional) maximum length is 18
characters. For built-in
card swipe models
(including end
characters), see 3.10.5
Wigan Access Control.
Card number and built-in
swipe id card number
Tempvalid int 0~1 Whether it is a
temporary list
0: permanent
list
1: temporary list
2: provisional list 2
3: provisional list 3
CustomizeI unsigned int User-defined personnel id
D number, you can use this
id number to modify and
delete the corresponding
personnel information
management. Note: Do not
use the same id repeatedly
to add personnel,
otherwise it will cause
modification and deletion.
Make a mistake
PersonUUID char User-defined personnel
uuid number (no more than
48 bytes), which can be
modified and deleted to
manage the corresponding
personnel information
through this id number.
Note: You cannot use the
same uuid to add personnel
repeatedly, no
Will lead to errors such as
modify and delete
ValidBegin char YYYY-MM-DDThh If it is a temporary list,
:mm:ss the temporary list
Effective start time, eg,
2018-03-12T09: 09: 20
ValidEnd char YYYY-MM-DDThh If it is a temporary list,
:mm:ss the end time of the
temporary list, eg,
2018-03-12T09:10:00
AccessChan int 0 ~ maximum Channel number of personnel
nel channel number entry (multiple faces
Server use)
Temperatur double 37.20 Real-time detection of face
temperature, when 3.27
temperature
64
e Among parameters,
FaceMaskTPTMode = 1, 4, and
5 return to the detection
temperature (temperature
(Detect machine version
support)
Temperatur int 0~1 Detect whether face
eAlarm temperature exceeds
threshold in real time
Value, 0: not exceeded; 1:
exceeded (supported by
temperature detection
machine version)
Sendintime int 0~1 Whether to push information
in time, 0: not in time
Push (push time is 10
seconds longer than
authentication time) 1:
Push in time
SanpPic char Base64 real-time snapshots
of face pictures
Encoded data
Registered char Match face images
Pic registered in the list
library
Base64 encoded data
e.g.,Raw:

-- HEADERS --
POST /Subscribe/Verify HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=UTF-8
Content-Length: 155265
Accept-Encoding: gzip, deflate
User-Agent: FaceGate-HttpClient/0.0.1
Host:192.168.2.10
Connection: Keep-Alive

-- BODY --
{
"operator": "VerifyPush",
"info": {
"DeviceID":1300001,
"PersonID":1300001,
"CreateTime":"2018-03-12T09:09:20",
"Similarity1": 90,
"Similarity2": 90,
"VerifyStatus":0,
"VerfyType":0,
65
"PersonType": 0,
"Name":"hahaha",
"Gender":0,
"Nation":0,
"CardType":0,
"IdCard":"430923199011044411",
"Birthday":"1999-11-04",
"Telnum":"19999999999",
"Native": "Mars",
"Address": "Shenzhen Baoan",
"Notes": "Notes",
"MjCardFrom": 2,
"WGFacilityCode": 9A,
"MjCardNo": 1923B,
"RFIDCard": "9A01923B",
"Tempvalid": 0,
"CustomizeID": 123456,
"PersonUUID": "4476c20c-23ce-4178-8672-b292d33a3cd8",
"ValidBegin":"2018-03-12T09:09:20",
"ValidEnd":"2018-03-12T09:09:20",
"Sendintime":0
},
"SanpPic": "data:image/jpeg;base64,...... ",
"RegisteredPic": "data:image/jpeg;base64,...... "
}
or
{
"operator": "VerifyPush",
"info": {
"DeviceID":1300001,
"PersonID":1300001,
"CreateTime":"2018-03-12T09:09:20",
"Similarity1": 90,
"Similarity2": 90,
"VerifyStatus":0,

1
"VerfyType":0,
"PersonType": 0,
"Name":"hahaha",
"Gender":0,
"Nation":0,
"CardType":0,
"IdCard":"430923199011044411",
"Birthday":"1999-11-04",
"Telnum":"19999999999",
"Native": "Mars",
"Address": "Shenzhen Baoan",
"Notes": "Notes",
"MjCardFrom": 2,
"WGFacilityCode": 9A,
"MjCardNo": 1923B,
"RFIDCard": "9A01923B",
"Tempvalid": 0,
"CustomizeID": 123456,
"PersonUUID": "4476c20c-23ce-4178-8672-b292d33a3cd8",
"ValidBegin":"2018-03-12T09:09:20",
"ValidEnd":"2018-03-12T09:09:20",
"Sendintime":1

},
"RegisteredPic": "data:image/jpeg;base64, ...... "
}

Or
...

3.12.5 QR code reporting

Parameter information:
Key Type Values Description

2
operator char QRCodePush QR code push
info json object specific contents
DeviceID int Device id
QRcodeInfo char QR code content

e.g.,Raw:
{
"operator": "QRCodePush",
"info": {
"DeviceID":1300001,
"QRcodeInfo":"...."
}
}

3.12.6 Report of ID information

Parameter information:
Key Type Values Description
operator char IDCardInfoPus ID information push
h
info json object specific contents
DeviceID int Device id
IDCard_Idno char identification number
IDCard_Name Name
IDCard_Gend int gender
er
IDCard_Nati int Ethnicity: same as in the
on personnel information

IDCard_Birt char Birthday: year-month-day


hday
IDCard_Addr char address
ess
IDCard_Idis Issuing authority
sue
IDCard_Idpe Validity: YYYY-YYYY

3
riod
IDCard_phot ID photo
o

e.g.,Raw:
{
"operator": "IDCardInfoPush",
"info": {
"DeviceID": 1300001,
"IDCard_Idno": "1234567890",
"IDCard_Name": "Zhang
San", "IDCard_Gender":
1,
"IDCard_Nation": 1,
"IDCard_Birthday":"2016-05-06",
"IDCard_Address": "xxxxx",
"IDCard_Idissue": "xxxxxx",
"IDCard_Idperiod": "20190203-20190304"
},
"IDCard_photo": "data:image/jpeg;base64,....."
}
3.12.7 Report the IC card number authentication
result (access control machine)

Parameter information:
Key Type Values Description
operator char CardVerify ic card number authentication
result push
info json object specific contents
DeviceID int Device id
CreateTime char Certification pass time
CardNo char IC card number (up to 24
bytes)
HasPic int 0~1 Whether there is a face
picture, 0: no face picture,
1: someone face picture

4
SanpPic char Base64 encoding of snapped
pictures

e.g.,Raw:

5
{
"operator": " CardVerify",
"info": {
"DeviceID":1300001,
"CreateTime ":"2018-01-01T00:00:00",
"CardNo ": "……",
"HasPic ":1,
"SanpPic": "data:image/jpeg;base64,……"
}
}

3.12.8 Report password authentication result (access


control machine)

Parameter information:
Key Type Values Description
operator char PwdVerify Push password authentication
result
info json object specific contents
DeviceID int Device id
CreateTime char Certification pass time
HasPic int 0~1 Whether there is a face
picture, 0: no face picture,
1: someone face picture
SanpPic char Base64 encoding of snapped
pictures

e.g.,Raw:
{
"operator": " PwdVerify ",
"info": {
"DeviceID":1300001,
"CreateTime ":"2018-01-01T00:00:00",
"HasPic ":1,
"SanpPic": "data:image/jpeg;base64,……"
}
}
6
3.12.9 Querying Subscribed Information

Operator: GetSubscribe
URI:http://<server ipaddr>/action/GetSubscribe

e.g.,
http://192.168.2.10/action/GetSubscribe
Reply body
{
"operator": "GetSubscribe",
"info": {
"Num": 2,
"Topics":["Snap", "Verify"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"Snap":"/Subscribe/Snap",
"Verify":"/Subscribe/Verify", "HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint": 0,
"BeginTime": "2019-11-05T11:44:29",
"Auth":"none"
}
}
or
{
"operator": "GetSubscribe",
"info": {
"Num": 1,
"Topics":["Verify"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"Verify":"/Subscribe/Verify",
"HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint": 1,
"BeginTime": "2019-11-05T11:44:29",
"Auth":"Basic",
"User":"admin",
"Pwd":"admin"

71
}
}
or
{
"operator": "GetSubscribe",
"info": {
"Num": 1,
"Topics":["QRCode"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"QRCode":"/Subscribe/QRCode","HeartBeat":"/Su
bscribe/heartbeat"},
"ResumefromBreakpoint": 0,
"BeginTime": "2019-11-05T11:44:29",
"Auth":"Basic",
"User":"admin",
"Pwd":"admin"
}
}
or
{
"operator": "GetSubscribe",
"info": {
"Num": 0
}
}
Or
{
"operator": "GetSubscribe",
"info": {
"Num": 2,
"Topics":["Card", "PassWord"],
"SubscribeAddr":"http://192.168.2.11:8080",
"SubscribeUrl":{"Card":"/Subscribe/Card","PassWord
":"/Subscribe/ PassWord", "HeartBeat":"/Subscribe/heartbeat"},
"ResumefromBreakpoint": 0,

72
"BeginTime": "2019-11-05T11:44:29",
"Auth":"none"
}
}

or
……

3.13 Cancel subscription

Cancel data subscription, the types include: subscription of


real-time snapshot information and subscription parameter
Key
information ofType Values
authentication result information Description
(Note:
optional ischar
operator optional): Unsubscribe unsubscribe
info json object specific contents
DeviceID int The device id of the device to
be operated.
Obtained through 3.9 Device
Information Acquisition.
Num int 1~2 How many types of information
to unsubscribe
Topics json array "Snap", A collection of single or
multiple subscription message
types,
"Verify", Such as:
"VerifyWithSna ["Snap"]: Unsubscribe from
live snapshots
p", Report
"VerifyWithReg or
", ["Verify"]: Unsubscribe from
verification results
"VerifyNoPic", Report
"QRCode", or
"PassWord", ["VerifyWithSnap"]: Cancel
subscription
"Card" Reporting of certification
results
or
["VerifyWithReg"]: Cancel
73
subscription
Report
results
or
["QRCode"]: Cancel reporting
of QR code results
or
["Snap", "Verify"] Cancel
subscription to capture
snapshots and report
verification results
or
["Snap", "VerifyWithSnap"]
Cancel subscription to capture
snapshots and report
verification results
or
["Snap", "VerifyWithReg"]
Unsubscribe from snapshot and
report verification results
or
["Snap", "VerifyNoPic"]
Unsubscribe from snapshot and
report verification results
or
["PassWord", "Card"]
Unsubscribe from IC card
number authentication result
and password authentication
result report (access control)

Operator: Unsubscribe
URI:http://<server ipaddr>/action/Unsubscribe

e.g.,
http://192.168.2.10/action/Unsubscribe
Send body
{
"operator": "Unsubscribe",
"info": {
74
}
Or
{
"operator": "Unsubscribe",
"info": {
"DeviceID": 1300001,
"Num": 2,
"Topics":["Snap", "VerifyWithReg"]
}
}
Or
{
"operator": "Unsubscribe",
"info": {
"DeviceID": 1300001,
"Num": 1,
"Topics":["QRCode"]
}
}
Or
{
"operator": "Unsubscribe",
"info": {
"DeviceID": 1300001,
"Num": 1,
"Topics":["PassWord"]
}
}
Or
{
"operator": "Unsubscribe",
"info": {
"DeviceID": 1300001,
"Num": 1,
"Topics":["Card"]

75
}
}
Or
...

3.14 Subscription Heartbeat

The device obtains the address, port, and url of the heartbeat of
the subscription from the data subscription information.The device
sends heartbeat information to the subscription address during the
entire subscription validity period. After receiving the heartbeat of
the device, the subscription server must also reply to the heartbeat
to maintain a valid connection between the two parties Once the
heartbeat handshake fails, the device will close the connection and
try to connect to the subscription address again.The heartbeat
interval is set at 30 seconds.
Parameter information (Note: optional is optional):
Key Type Values Description
operator char HeartBeat unsubscribe
info json object specific contents
DeviceID int Device id of the device to be
operated
Time char YYYY-MM-DDThh:m Assume Prepare when before
m:ss Time between 。
e.g.,2018-03-25T21:50:05

1
e.g.,Raw
-- HEADERS --
POST /Subscribe/heartbeat HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=UTF-8
Content-Length: 128
Accept-Encoding: gzip, deflate
User-Agent: FaceGate-HttpClient/0.0.1
Host:192.168.2.10
Connection: Keep-Alive

-- BODY --
{
"operator": "HeartBeat",
"info":{
"DeviceID": 1300001,

2
"Time": "2018-03-12T09:09:20"
}
}

3.15 Access camera parameters

This function is for face capture comparison server devices, and the
facial recognition all-in-one device does not support this service
function.
Get or set camera parameters, and check how many cameras can be
connected according to different device models.
Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetEnterIPC GetEnterIPC: Get
or access camera setting
SetEnterIPC parameters
SetEnterIPC: Set
access
Camera parameters
info json object specific contents
TotalNum int Total number of cameras
(optional) to be set or
Total number of cameras
returned
IPC_Info json array Set camera parameter
(optional) list, number
Group members are json
objects
IPC_Channel int Camera channel, set
camera
Required for parameters
IPC_Enable int Camera enable
(optional)
IPC_URL char IP of access camera
(optional) (not more than
(64 bytes)
3
IPC_Port int Port for accessing the
(optional) camera
IPC_Usernam char User name for accessing
e (optional) the camera (not
(More than 32 bytes)
IPC_Passwor char Password for accessing
d (optional) the camera (not
exceeding
(Over 32 bytes)
IPC_Name char Name of the connected
camera (not exceeding

4
(optional) (Over 32 bytes)

3.15.1 Get camera parameters

Operator: GetEnterIPC
URI:http://<server ipaddr>/action/GetEnterIPC

e.g.,
http://192.168.2.10/action/GetEnterIPC
Reply body
{
"operator": "GetEnterIPC",
"info": {
"TotalNum": 1,
"IPC_Info": [
{
"IPC_Channel": 0,
"IPC_Enable": 1,
"IPC_URL": "192.168.1.1",
"IPC_Port":5000,
"IPC_Username": "admin",
"IPC_Password": "admin",
"IPC_Name": "ipc1"
},
{
"IPC_Channel": 1,
"IPC_Enable1": 1,
"IPC_URL1": "192.168.1.2",
"IPC_Port1":5000,
"IPC_Username1": "admin",
"IPC_Password1": "admin",
"IPC_Name1": "ipc2"
},
……

5
]
}
}

3.15.2 Set access camera parameters

Operator: SetEnterIPC
URI:http://<server ipaddr>/action/SetEnterIPC

e.g.,
http://192.168.2.10/action/SetEnterIPC
Issued body
{
"operator": "SetEnterIPC",
"info": {
"TotalNum": 4,
"IPC_Info": [
{
"IPC_Channel": 0,
"IPC_Enable": 1,
"IPC_URL": "192.168.1.1",
"IPC_Port":5000,
"IPC_Username": "admin",
"IPC_Password": "admin",
"IPC_Name": "ipc1"
},
{
"IPC_Channel": 1,
"IPC_Enable": 1,
"IPC_URL": "192.168.1.1",
"IPC_Port":5000,
"IPC_Username": "admin",
"IPC_Password": "admin",
"IPC_Name": "ipc2"

6
},
……
]
}
}

3.16 Face capture comparison server parameters

This function is for face capture comparison server devices, and the
facial recognition all-in-one device does not support this service
function.
Get or set the face capture
comparison server parameters.
Parameter information (Note:
optional is optional):
Key Type Values Description
operator char GetServerBasicPara GetServerBasicPara:
or Get server
SetServerBasicPara parameters
SetServerBasicPara:
Setting server
parameters
info json object specific contents
InformationR char Information release,
elease (optional) up to 128
Chinese character
Channelselec int 0,1,2,4,9 Maximum number of
tion (optional) channels and
adaptive selection,
0: adaptive; 1, 2,
4, 9 correspond to
maximum 1, 2, 4, 9
respectively
road
DisplaySnapV int 0~1 Periodically clear
erify (optional) snapshots and ratios

7
Yes, 0: do not clear,
1: clear.

3.16.1 Get server parameters

Operator: GetServerBasicPara
URI:http://<server ipaddr>/action/GetServerBasicPara

e.g.,
http://192.168.2.10/action/GetServerBasicPara

8
Reply body
{
"operator": "GetServerBasicPara",
"info": {
"InformationRelease": "Information Release",
"Channelselection": 0,
"DisplaySnapVerify": 0
}
}

3.16.2 Setting server parameters

Operator: SetServerBasicPara
URI:http://<server ipaddr>/action/SetServerBasicPara

e.g.,
http://192.168.2.10/action/SetServerBasicPara
Issued body
{
"operator": "SetServerBasicPara",
"info": {
"InformationRelease": "Information Release",
"Channelselection": 0,
"DisplaySnapVerify": 0
}
}

3.17 Personnel type parameters

This function is for face capture comparison server devices, and the
facial recognition all-in-one device does not support this service
function.
Get or set personnel type parameters, up to 10
1
types of personnel are supported. Parameter
information (Note: optional is optional):

2
Key Type Values Description
operator char GetWorktype GetWorktype: Get the
orSetWorktype personnel type
parameter
SetWorktype: Set the
person
Staff type parameters
info json object specific contents
TotalNum int Total number of
(optional) personnel types to
be set or returned
total
WorkTypeInfo json array Set personnel type
list, number
Group members are
json objects
WorkTypeIndex int Represented as the
(optional) type of person
WorktypeEnable int WorktypeEnable means
(optional) person
Member type enable
Worktype char Personnel type name
(optional) (not more than
(32 bytes)
Num int Personnel Type
(optional)

3.17.1 Get Person Type Parameter

Operator: GetWorktype
URI:http://<server ipaddr>/action/GetWorktype

e.g.,
http://192.168.2.10/action/GetWorktype
Reply body
{
3
"operator": "GetWorktype",
"info": {
"TotalNum":10,
"WorkTypeIndex": 0,
"WorktypeEnable":
1, "Worktype":
"Manager", "Num": 0
},
{
"WorkTypeIndex": 1,
"WorktypeEnable":
1, "Worktype":
"Employee", "Num":
1
},
……
]
}
}
3.17.2 Set personnel type parameters

Operator: SetWorktype
URI:http://<server ipaddr>/action/SetWorktype

e.g.,
http://192.168.2.10/action/SetWorktype
Issued body
{
"operator": "SetWorktype",
"info": {
"TotalNum":10,
"WorkTypeInfo":[
{
"WorkTypeIndex": 0,
"WorktypeEnable":
1, "Worktype":
"Manager", "Num": 0
},

4
{
"WorkTypeIndex": 1,
"WorktypeEnable1":
1, "Worktype1":
"Employee", "Num1":
0
},
……
]
}
}

3.18 Face service function

This function is for face capture comparison server devices, and the
facial recognition all-in-one device does not support this service
function.
Face service functions include: picture extraction feature code,
feature code comparison similarity, and obtaining face pictures.

3.18.1 Picture extraction

feature code Operator:

HttpGetFaceSignature
URI:http://<server ipaddr>/action/GetFaceSignature

e.g.,
http://192.168.2.10/action/GetFaceSignature
Issued body
Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetFaceSignature Get face picture
feature code
picinfo char Face64 encoding of
face pictures
Data (less than 1m)
5
{
"operator": "GetFaceSignature",
"picinfo":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQAB ..... "

6
}
Reply the correct body
Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetFaceSignature Get face picture feature
code
info json object specific contents
FeatureData char Face feature base64
encoding number
according to
FeatureLen int Face feature base64
encoding number
Data length
Gender int Gender, 0: male; 1: not
sure
Fixed; 2: female
Age int age

{
"operator": "GetFaceSignature",
"info": {
"FeatureData":"4AAQSkZJRgABAQAAAQAB ..... ",
"FeatureLen": "6144",
"Gender": 0,
"Age":21
}
}

3.18.2 Feature code comparison similarity

Operator: GetSignatureSimilarity
URI:http://<server ipaddr>/action/GetSignatureSimilarity

e.g., http://192.168.2.10/action/GetSignatureSimilarity
Issued body
Parameter information (Note: optional is optional):
Key Type Values Description

7
operator char GetSignatureSimilarity Comparison of
similarity between
feature codes
Signature1 char Base64 encoding
number
According to (not
exceeding 1m)
Signature2 char Base64 encoding
number
According to (not
exceeding 1m)

{
"operator": "GetSignatureSimilarity",
"Signature1":"d4AAQSkZJRgABAQAAAQAB ..... ",
"Signature2":"4AAQSkZJRgABAQAAAQAB ..... "
}
Reply the correct body
Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetSignatureSimilarity Get feature code
comparison similarity
info json object specific contents
Similarity float Feature code
similarity

{
"operator": "GetSignatureSimilarity",
"info": {
"Similarity":80
}
}

3.18.3 Obtaining Face Pictures

Operator: GetImage
URI:http://<server ipaddr>/action/GetImage

eg, get the face picture according to the returned file


type, file index, file
locationhttp://192.168.2.10/action/GetImage
Issued body
Parameter information (Note: optional is optional):
86
Key Type Values Description
operator char GetImage Search the local face
database by map
info json object specific contents
Filetype unsigned int 0~2 File type 0: Black
and white list chart
Movie file 1: ID
picture file 2: Real-
time snapshot picture
file
Fileindex unsigned int File index reference
3.25.2
Search the local face
database by map
Filepos unsigned int File location
reference 3.25.2
Search the local face
database by map

{
"operator": "GetImage",
"info": {
"Filetype":1,
"Fileindex":0,
"Filepos":0
},
"picinfo":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQAB ..... "
}
Reply the correct body
Parameter information: face feature length + face feature data + face
feature length + face feature data ...
Key Type Values Description
operator char HttpGetImage HttpGetImage: Get
People
Face picture
info json object specific contents
FeatureData1 char Face image data

{ "4AAQSkZJRgABAQAAAQAB.....
."
}
87
3.19 List search query

Query the list that meets the search

conditions according to the corresponding


Key Type Values Description
operator char Return the
search conditions. SearchPerson
body parameter SearchPerson: single
or list query
information of the list: SearchPersonList SearchPersonList:
multiple
List query
info json object specific contents
DeviceID int The device id number
of the device to be
operated.
Information
acquisition.
LibID int List database id
PersonType int 0~1 List Type
0:
Whitelist
1: blacklist
Name char Name, up to 32
characters long
Degree (with
terminator)
Gender int 0~1 Sex
0:
Male
1: female
Nation int 1~57 Nation
1: "Han"
2: "Mongolia"
3: "Back
4: "Hidden"
5: "Uygur"
6: "Miao"
7: "Yi"
8: "Zhuang"
9: "Buy"
88
12:"侗"
13: "Yao"
14: "White"
15: "Tujia"
16: "Harry"
17: "Kazakh"
18:"傣"
19: "Li"
20:"傈僳"
21:"佤"
22:"畲"
23: "Alpine"
24: "Lahu"
25: "Water"
26: "Dongxiang"
27: "Naxi"
28: "Jingpo"
29: "Kirkizi"
30: "Earth"
31: "Daur"
32: "Gulao"
33:"羌"
34: "Brown"
35: "Sarah"
36: "Mao Nan"
37: "Gulao"
38: "Xiebo"
39: "Achang"
40: "Pumi"
41: "Tajik"
42: "Angry"
43: "Uzbekistan"
44: "Russia"
45: "Ewenki"
46: "Dang"

89
47: "Security"
48: "Yugu"
49: "King"
50: "Tatar"
51: "Dulong"
52: "Olunchun"
53: "Hezhe"
54: "Memba"
55:"珞巴"
56: "Keno"
57: "Other"
CardType int type of certificate
0: ID card
IdCard char ID number, maximum
length is 32
Character length
(including terminator)
Birthday char YYYY-MM-DD Birthday, eg, 2018-1-1
Telnum char Phone number with a
maximum length of 32
Character length
(including terminator)
Native char Hometown, 32 characters
maximum
Character length
(including terminator)
Address char Address with a maximum
length of 72 words
Character length
(including terminator)
Notes char Remarks, maximum length
is 64 words
Character length
(including terminator)
MjCardFrom int 0~3 Wigan Card
Number
Generation
Method 0: Public
Card Number
1: automatically
generated
2: manual input
3: Do not use access
card number

WGFacility int Facility code; when


Code (optional) 3.2 door open
condition
When Wiegand = 4 or 5
or 6 or 7 together
with the MjCardNo
field to form a
Wiegand card number;
when Wiegand = 0 or 1,
this parameter
The number has no
practical
significance. For
details, see 3.10.5
Wigan Access Card
Number and
90
Built-in swipe id card
number
MjCardNo unsigned int Wigan access card
number (userid). When
3.2 opening conditions
When
Wiegand = 4 or 5 or 6
or 7 together with the
WGFacilityCode field,
the Wiegand number is
formed; when Wiegand =
0 or 1, the Wiegand
number is formed
separately. For
details, see 3.10.5
Wiegand Access Card
Number and
Built-in swipe id card
number
RFIDCard Char Id card number, the
(optional) maximum length is 18
characters. For built-
in card swipe models
(including end
characters), see
3.10.5 Wigan Access
Card Number and
Built-in swipe id card
number
Tempvalid int 0~3 Whether it is a
temporary list
0: permanent
list
1: temporary list
2: provisional list 2
3: provisional list 3

1
CustomizeI unsigned int User-defined personnel
D id number, you can use
this id number to
modify and delete the
corresponding personnel
information management.
Note: Do not use the
same id repeatedly to
add personnel,
otherwise it will lead
to modification and
deletion.
Make an error.
PersonUUID char User-defined personnel
uuid number (not more
than 48 bytes), you can
use this id number to
modify and delete the
corresponding personnel
information management.
Note: Do not reuse the
same uuid to add
personnel, otherwise it
will cause modification
and deletion
Make an error.

2
EffectNumb int Valid times for
er provisional list 3
Number, when list type
is temporary list 3
returns valid times
ValidBegin char YYYY-MM-DDThh:mm:s If it is a temporary
s list, the time when
the temporary list
takes effect, eg,
2018-03-12T09:09:20
ValidEnd char YYYY-MM-DDThh:mm:s If it is a temporary
s list, the end time of
the temporary list,
eg,
2018-03-12T09:10:00
picinfo char Face64 encoding of face
pictures
data

3.19.1 Single list query

Operator: SearchPerson
URI: http://<server ipaddr>/action/SearchPerson

eg, query the list according to the CustomizeID, UUID or


database ID you are looking
forhttp://192.168.2.10/action/SearchPerson
Issued body
Parameter information (Note: optional is optional):
Key Type Values Description
operator char SearchPerson SearchPerson: List
by CustomizeID, UUID
or Database ID
search for
info json object specific contents
3
DeviceID int Device id
SearchType int 0~2 0:CustomizeID 1:UUID
(optional) 2: database id
SearchID char SearchID, UUID
content, or
Database id
Picture int Whether to include
picture information

4
{
"operator": "SearchPerson",
"info": {
"DeviceID":1300001,
"SearchType":0,
"SearchID":"1234",
"Picture":1
}
}
Or
{
"operator": "SearchPerson",
"info": {
"DeviceID":1300001,
"SearchType":1,

"SearchID":"5763a498-2fce-4d25-aa00-45b8278d9788",

"Picture":1
}
}
Or
{
"operator": "SearchPerson",
"info": {
"DeviceID":1300001,
"SearchType":2,

"SearchID":"1",

"Picture":1
}
}

Reply the correct body


{
"operator": "SearchPerson",

5
"info": {
"DeviceID": 1300001,
"LibID": 1,
"PersonType": 0,
"Name": "test",
"Gender": 0,
"Nation": 1,
"CardType": 0,
"IdCard": " ",
"Birthday": "2000-01-01",
"Telnum": " ",
"Native": " ",
"Address": " ",
"Notes": " ",
"MjCardFrom": 2,
"WGFacilityCode": 9A,
"MjCardNo": 1923B,
"RFIDCard": "9A01923B",
"Tempvalid": 0,
"CustomizeID": -2,
"PersonUUID": " ",
"ValidBegin": "1970-01-01T08:00:00",
"ValidEnd": "1970-01-01T08:00:00"
}
},
" picinfo ": "data:image/jpeg;base64, ...... "
}
Or
....

3.19.2 Total number of queries

Operator: SearchPersonNum

6
URI: http: // <server ipaddr> / action /

SearchPersonNum eg, returns the total number of

eligible lists according to the query conditions

Search description:
1.Find by time: Set the start time and end time of the search, and the
name is empty
2.Search by name or fuzzy name: Set the search start time and search
end time to empty, and the name is not empty
http://192.168.2.10/action/SearchPersonNum
Issued body
Parameter information (Note: optional is optional):
Key Type Values Description
operator char SearchPersonNum SearchPersonNum:
according to
The query condition
returns the total
number of eligible
lists
info json object specific contents
DeviceID int Device id
PersonType int 0~2 List Type 0: White
(optional) List 1: Black
List 2: all
BeginTime char Start point of search
(optional)
EndTime char End time of search
(optional)
Gender int Gender 0: Male 1:
(optional) Female
Age char Age range: such as 1-
(optional) 100
MjCardNo unsigned int Access card number 0:
(optional) This condition is
7
invalid

Name char Name (up to 32 bytes)


(optional)

{
"operator": "SearchPersonNum",
"info": {

8
"DeviceID":1300196,
"PersonType":0,
"BeginTime":"2018-06-01T00:00:00",
"EndTime":"2018-06-19T23:59:59",
"Gender":2,
"Age":"0-100",
"MjCardNo":0,
"Name":""
}
}
Or
{
"operator": "SearchPersonNum",
"info": {
"DeviceID":1300196,
"PersonType":0,
"BeginTime":"",
"EndTime":"",
"Gender":2,
"Age":"0-100",
"MjCardNo":0,
"Name":"test"
}
}
Or
....

Reply the correct body


{
"operator": "SearchPersonNum",
"info": {
"DeviceID":1300001,
"PersonNum":8
}
}

1
3.19.3 Multiple List Query

Operator: SearchPersonList
URI: http://<server ipaddr>/action/SearchPersonList

eg, according to the query conditions and the starting position

to be searched and the number of the list of queries to search

the list search instructions:


1.Find by time: Set the start time and end time of the search, and the
name is empty
2.Search by name or fuzzy name: Set the search start time and search
end time to empty, and the name is not empty
http://192.168.2.10/action/SearchPersonList
Issued body
Parameter information (Note: optional is optional):
Key Type Values Description
operator char SearchPersonList SearchPersonList:
based on starting
position and number
of queries
Back to list
info json object specific contents
DeviceID int Device id
PersonType int 0~2 List Type 0: White
(optional) List 1:
Blacklist 2: all
BeginTime char Start point of search
(optional)
EndTime char End time of search
(optional)

2
Gender int 0~2 Gender 0: Male 1:
(optional) Female 2: All
Age char Age range: such as 1-
(optional) 100

MjCardNo unsigned int Access card number 0:


(optional) None of this
condition
effect

3
Name char Name
(optional)
BeginNO int The starting position
(optional) of the query list,
Starting with the
first few people
RequestCount int The total number of
(optional) messages returned by
the query list, up to
100,
Set more than 100 and
only
Returns 100.
Picture int Whether to include
(optional) picture information

{
"operator": "SearchPersonList",
"info": {
"DeviceID":1300001,
"PersonType":0,
"BeginTime":"2018-06-01T00:00:00",
"EndTime":"2018-06-19T23:59:59",
"Gender":2,
"Age":"0-100",
"MjCardNo":0,
"Name":"",
"BeginNO":0,
"RequestCount":1,
"Picture":1
}
}
Or
{
"operator": "SearchPersonList",
"info": {
"DeviceID":1300001,
"PersonType":0, 4

"BeginTime":"",
"EndTime":"",
"Gender":2,
"Age":"0-100",
"MjCardNo":0,
"Name":"test",
"BeginNO":0,
"RequestCount":10,
"Picture":1
}
}

Reply to SearchPersonList's body format:


{
"operator": "SearchPersonList",
"info": {
"DeviceID":1300001,
"Listnum":100,
"List":[
{
PersonInfo
},
{
PersonInfo
},

]
}
}

Reply the correct body


{
"operator": "SearchPersonList",
"info": {
"DeviceID":1300001,
"Listnum":100,

5
"List":[
{
"DeviceID": 1300001,
"LibID": 1,
"PersonType": 0,
"Name": "test",
"Gender": 0,
"Nation": 1,
"CardType": 0,
"IdCard": " ",
"Birthday": "2000-01-01",
"Telnum": " ",
"Native": " ",
"Address": " ",
"Notes": " ",
"MjCardFrom":
2,
"WGFacilityCode": 9A,
"MjCardNo": 1923B,
"RFIDCard": "9A01923B",
"Tempvalid": 0,
"CustomizeID": -2,
"PersonUUID": " ",
"ValidBegin": "1970-01-01T08:00:00",
"ValidEnd": "1970-01-01T08:00:00"
"Picinfo": "data:image/jpeg;base64, ...... "
},
{
PersonInfo...
},

]
}
}

6
3.20 Door opening control

Control the door opening.


Parameter information (Note: optional is optional):
Key Type Values Description
operator char OpenDoor Open the door
directly. For the
specific control
whether the switch or
Wiegand can be viewed
in 3.2 Opening
conditions, Wigan uses
Public card number
info json object specific contents
DeviceID int The device id number
of the device to be
operated.
Information
acquisition.
Chn int 0~9 Control which door is
opened. This parameter
is for the face
capture comparison
server.
Invalid number
status int If the value is
greater than 0, the
door will be opened.
Parameter, used with
msg.

1
msg char Set the content that
the device currently
needs to display, such
as: please pass, no
access, etc., the
content is in utf-8
format. This parameter
is not required to
display the content.
status used.

Operator: OpenDoor
URI:http://<server ipaddr>/action/OpenDoor

e.g.,
http: // <server ipaddr> / action /
OpenDoor

2
{
"operator": "OpenDoor",
"info": {
"DeviceID": "1300001",
"Chn": 0,
"status": 0,
"msg": "Please pass"
}
}

Or:
{
"operator": "OpenDoor",
"info": {
"DeviceID": "1300001",
"Chn": 0,
}
}

3.21 Password operation

This function is for access control equipment.

3.21.1 Get temporary password

Parameter information:
Key Type Values Description
operator char GetAccessTempPwd GetAccessTempPwd:
get
Get temporary door
opening password
info json object specific contents

3
TempPwd char Temporary password
(8 bytes)
ValidPeriod char Validity period of
the temporary
password

4
Operator: SearchPerson
URI: http://<server ipaddr>/action/GetAccessTempPwd

e.g.,
http://192.168.2.10/action/ GetAccessTempPwd
reply body
{
"operator": "GetTempPwd",
"info": {
"TempPwd": "195723",
"ValidPeriod": "2018-11-16 17:00:00 ~ 2018-11-16 17:59:59"
}
}

3.21.2 Password add

Parameter information (Note: optional is optional):


Key Type Values Description
operator char AddAccessPwd AddAccessPwd: add
new
Password
info json object specific contents
AccessPwd json array Password set

Operator: SearchPerson
URI: http://<server ipaddr>/action/AddAccessPwd

e.g.,
http://192.168.2.10/action/AddAccessPwd
Send body
{
"operator": "AddAccessPwd",
"info": {
"AccessPwd": ["123465","521423","565424","456826","95468"]
}
5
}

3.21.3 Password deletion

Parameter information (Note: optional is optional):


Key Type Values Description
operator char DelAccessPwd DelAccessPwd:
Deleted
Added password
info json object specific contents
AccessPwd json array One or more cipher
sets

Operator: SearchPerson
URI: http://<server ipaddr>/action/DelAccessPwd

e.g.,
http://192.168.2.10/action/DelAccessPwd
Send body
{
"operator": "DelAccessPwd",
"info": {
"AccessPwd": ["123465","521423"]
}
}

3.21.4 Clear all passwords

Parameter information (Note: optional is optional):


Key Type Values Description
operator char ClearAccessPwd ClearAccessPwd:
delete
Added password
info json object specific contents

6
DeviceID int Device id

Operator: SearchPerson

7
URI: http://<server ipaddr>/action/ClearAccessPwd

e.g.,
http://192.168.2.10/action/ClearAccessPwd
Send body
{
"operator": "ClearAccessPwd",
"info": {
"DeviceID": 1300000
}
}

3.22 Control record query

The control record query mainly includes the query of the


total number of control records and the control record
personnel information. Parameter information (Note: optional
is optional):

Key Type Values Description


operator char SearchControlNum SearchControlNum:
or query the total
SearchControl number of control
records based on
conditions
SearchControl:
according to
Conditional query
control records
info json object specific contents
DeviceID int Device id

8
SearchType int 0~1 Search type, 0:
(optional) search by conditions
(name, time, etc.)
1: search by
database id + time,
without setting this
field, it defaults
to
Search
IdType int 0~2 If SearchType is 1,
that is, ID + time
search, this item is
required.
0:CustomizeID

9
1:LibID
2:PersonUUID
CustomizeID unsigned int User-defined id
(optional)
LibID unsigned int List database id
(optional)
PersonUUID char Uuid of list database
(optional) (not
(Over 48 bytes)
Name char Name (find by name,
(optional) the conditions of
condition search are
not judged by
default); if you are
looking for remote
door opening control
records,
Please enter "Remote
Door Opening"
MjCardNo unsigned int Access card number,
(optional) default is 0
Gender int 0~2 Gender 0: Male 1:
(optional) Female 2: All, if
this field is not
set, the default is
all
Have
OpenDoor int 0~2 0: all 1: open
(optional) the door
2: Reject, do not
set this field by
default
Channel int 0~8 Analysis server
(optional) channel number, no
Set the field to
default to all-in-
one
10
BeginTime char Search start time,
required
EndTime char Search end time,
required
Age char Age range, such as 1-
(optional) 100,
Do not set this
field by default 0-
200
BeginNO int Start sequence number
(optional) returned, not set
Set to start from 0
by default
RequestCount int 0~100 The number of
(optional) records returned,
the maximum is 100,
no default is set
Maximum return 20
Picture int 0~3 Whether to include
pictures

11
(optional) 0: No picture
1: Include registered
image
2: Contains snapped
pictures
3: Include
registration +
snapshot pictures
RemoteOpenDo int 1 If it is called 3.20
or (optional) open the door
Controlled door
opening control
records, return this
identifier.

3.22.1 Control the total number of records

Query the total number of

control records according to

the time condition.


URI: http://<server ipaddr>/action/SearchControlNum

http://192.168.2.10/action/SearchControlNum
Issued body
{
"operator": "SearchControlNum",
"info": {
"DeviceID": 1305433,
"BeginTime": "2020-01-01T00:00:00",
"EndTime": "2020-12-13T23:09:00"

}
}

12
Parameter information returned:
Key Type Values Description
operator char SearchControlNum SearchControlNum:
root
Query the total
number of control
records according to
conditions
info json object specific contents

13
DeviceID int Device id
ControlNum int Return control
records according to
time conditions
Total number of
records

Returned body:
Total number of control records returned based on conditions

{
"operator": "SearchControlNum",
"info": {
"DeviceID": 1305433,
"ControlNum": 23
}
}

3.22.2 Control record personnel information query

Query query control record

personnel information according

to conditions.
URI: http://<server ipaddr>/action/SearchControl

http://192.168.2.10/action/SearchControl
Issued body

14
e.g.,
http: // <server ipaddr> / action /
SearchControl sends the body:
Search by time:
{
"operator": "SearchControl",
"info": {
"DeviceID": 1300001,
"BeginTime": "2018-11-13T00:00:00",
"EndTime": "2018-11-13T23:59:59",
"Picture": 2
}
}
Or
Limit the number of lists returned:
{
"operator": "SearchControl",
"info": {
"DeviceID": 1300001,
"BeginTime": "2018-11-13T00:00:00",
"EndTime": "2018-11-13T23:59:59",
"RequestCount": 10,
"Picture": 2
}
}
Or
Limit the number of lists returned and where they start:
{
"operator": "SearchControl",
"info": {
"DeviceID": 1300001,
"BeginTime": "2018-11-13T00:00:00",
"EndTime": "2018-11-13T23:59:59",
"BeginNO": 5,
"RequestCount": 10,

15
"Picture": 2
}
}
Or
Search by name, fuzzy search:
{
"operator": "SearchControl",
"info": {
"DeviceID": 1300122,
"Name": "Zhang San",
"BeginTime": "2018-11-13T00:00:00",
"EndTime": "2018-11-13T23:59:59",
"Picture": 3
}
}
Or
Search based on the id of the list (0: CustomizeID, 1: LibID, 2: PersonUUID):
{
"operator": "SearchControl",
"info": {
"DeviceID": 1300122,
"SearchType": 1,
"IdType": 1,
"LibID":1,
"BeginTime": "2018-11-13T00:00:00",
"EndTime": "2018-11-13T23:59:59",
"Picture": 0
}
}
Or
{
"operator": "SearchControl",
"info": {
"DeviceID": 1300122,
"SearchType": 1,

16
"IdType": 0,
"CustomizeID":1234,
"BeginTime": "2018-11-13T00:00:00",
"EndTime": "2018-11-13T23:59:59",
"Picture": 0
}
}
or
{
"operator": "SearchControl",
"info": {
"DeviceID": 1300122,
"SearchType": 1,
"IdType": 2,
"PersonUUID": " .... ",
"BeginTime": "2018-11-13T00:00:00",
"EndTime": "2018-11-13T23:59:59",
"Picture": 0
}
}
Or
The server searches by channel:
{
"operator": "SearchControl",
"info": {
"DeviceID": 1300122,
"BeginTime": "2018-11-13T00:00:00",
"EndTime": "2018-11-13T23:59:59",
"Channel": 1,
"Picture": 0
}
}

......

17
Parameter information returned:
Key Type Values Description
operator char SearchControl SearchControl:
according to
Conditional query
control records
info json object specific contents
DeviceID int Device id
TotalNum int 0~100 Returns the number of
control records,
Default returns up to
100
SearchInfo Back to search
results list
LibID int Database ID of the
control record
VerfyType int 1~3 or 21~22 or Verification type.
1: whitelist
24~25 or 27
verification
2: ID verification
3: white list + ID
verification

21: rf card
verification (built-in
credit card model)
22: rf card
verification + white
list verification
(built-in card type)
24: Wegenka verification
25: Wiganka + whitelist
verification
27: http Open the door
remotely
Time char Certification pass
time
VerifyStatus char 0~2 Personnel traffic
0: None 1: Allow 2:
Deny
Similarity float Similarity
18
PersonType int List Type 0: White
List 1:
blacklist
Name char Name (up to 32 bytes)
WGFacilityCod int Facility code; when
e (optional) Wiegand = 4 or 5 or
6 or 7 in 3.2 door
opening conditions,
together with the
MjCardNo field to
form a Wiegand card
number; when Wiegand
= 0 or 1
This parameter has no
practical meaning.
For details, see
3.10.5 Wigan Access
Card Number and
Built-in Swipe ID
Card Number.

19
MjCardNo unsigned int Wigan Access Card
(userid). When
Wiegand = 4 or 5 or
6 or
At 7 o'clock,
together with the
WGFacilityCode field,
the Wiegand card
number is formed;
when Wiegand = 0 or
1, the Wiegand card
number is formed
separately. For
details, see 3.10.5
Wigan Access Control
Card Number and
Built-in ID Card
number
RFIDCard Char Id card number, the
(optional) maximum length is 18
characters, for
built-in card swipe
models (including
terminator). For
details, see 3.10.5
Wigan access card
number and built-in
card swipe.
id card number
Gender int 0~2 Gender 0: Male 1:
Female 2: All
Nation int Nation
IdCard char ID card number
Birthday char date of birth
Telnum char telephone number

20
Native char Hometown
Address char address
CustomizeID unsigned int User-defined id
PersonUUID char User-defined Uuid
RegPicinfo Char Base64 registration
of registered
pictures
code
SnapPicinfo Char Snapshot of the
base64 series
code

Returned body:

21
Search results based on search criteria:
{
"operator": "SearchControl",
"info": {
"DeviceID": 1300122,
"TotalNum": 1,
"SearchInfo": [
{
"LibID": 12,
"Time": "2018-11-13T16:13:06",
"VerifyStatus": 1,
"Similarity": 96.6,
"PersonType": 0,
"Name": "test",
"MjCardFrom": 2,
"WGFacilityCode": 9A,
"MjCardNo": 1923B,
"RFIDCard": "9A01923B",
"Gender": 0,
"Nation": 1,
"IdCard": " ",
"Birthday": "1973-11-13",
"Telnum": " ",
"Native": " ",
"Address": " ",
"SnapPicinfo": " ... ",
"RegPicinfo": " ... "
},
{
......
},
......
]
}
}

22
Or
Search by list id:
{
"operator": "SearchControl",
"info": {
"DeviceID": 1305969,
"LibID": 9,
"VerifyStatus": 1,
"Similarity": 88.3,
"PersonType": 0,
"Name": "1537494887517",
"MjCardFrom": 2,
"WGFacilityCode": 9A,
"MjCardNo": 1923B,
"RFIDCard": "9A01923B",
"Gender": 0,
"Nation": 1,
"IdCard": " ",
"Birthday": "1985-11-16",
"Telnum": " ",
"Native": " ",
"Address": " ",
"CustomizeID": 0,
"PersonUUID": " ",
"TotalNum": 2,
"SearchInfo": [
{
"Time": "2018-11-16T15:56:50",
"SnapPicinfo": " ..... ",
"RegPicinfo": " ..... "
},
{
"Time": "2018-11-16T15:56:43",
"SnapPicinfo": " ..... ",
"RegPicinfo": " ..... "

23
}
]
}
}

24
3.23 Common configuration settings

Get or set common parameter configuration information.


Parameter information (Note: optional is optional):
Key Type Values Description
operator char SetGeneralParam SetGeneralParam: Set
or common configuration
GetGeneralParam parameters
GetGeneralParam: Get
general
With configuration
parameters
DeviceID int Device id
info json object specific contents
FaceThreshold int 50 ~ 100 Black and white list
(optional) comparison threshold
IDCardThresho int 50 ~ 100 ID card comparison
ld (optional) threshold
ControlType: int 0~2 0: switch value; 1:
(optional) Wiegand interface
26; 2: Wiegand
interface 34
LiveThreshold double 0~1 Live detection
(optional) threshold (live version
(Exclusive)
LiveFrameNum int Number of consecutive
(optional) frames for live
detection (live
(Version-specific)
AutoRebootDay int 0~8 Device automatic
(optional) restart setting date
0: no restart; 1:
restart every day;
2~8:
Week AutoRebootDay-1
reboot

25
AutoRebootHou int 0~23 Device restart time
r (optional)
IPAddr char Device IP address (64
(optional) bytes)

Submask char Device subnet mask (32


(optional) bytes)
Gateway char Device gateway (32
(optional) bytes)

DNS char Device dns (32 bytes)


(optional)

26
3.23.1 Get common setup parameters

Operator: GetGeneralParam
URI: http://<server ipaddr>/action/GetGeneralParam

e.g.,
http://172.168.2.10/action/GetGeneralParam
Reply body:
{
"operator": "GetGeneralParam",
"DeviceID": 1305269,
"info":
{ "FaceThreshold":
75,
"IDCardThreshold": 50,
"ControlType": 0,
"AutoRebootDay": 0,
"AutoRebootHour": 0,
"IPAddr": "172.168.2.130",
"Submask": "255.255.255.0",
"Gateway": "172.168.2.1",
"DNS": "202.96.134.33"
}
3.23.2
}
Set common parameters

Operator: SetGeneralParam
URI: http://<server ipaddr>/action/SetGeneralParam

e.g.,
http://172.168.2.10/action/GetGeneralParam
Send the body:
{
"operator": "GetGeneralParam",
"DeviceID": 1305269,
"info":
{ "FaceThreshold": 75,
"IDCardThreshold": 50,
"ControlType": 0,
"AutoRebootDay": 0,
"AutoRebootHour": 0,

27
"IPAddr": "172.168.2.130",
"Submask": "255.255.255.0",
"Gateway": "172.168.2.1",
"DNS": "202.96.134.33"
}
}

3.24 Restart the device

Get or set common parameter configuration information.


Parameter information (Note: optional is optional):
Key Type Values Description
operator char RebootDevice RebootDevice: Restart the
device
info json object specific contents
DeviceID int Device id
IsRebootDevic int 0~1 0: Do not restart the
e (optional) device
1: restart the device
Operator: RebootDevice
URI: http://<server ipaddr>/action/RebootDevice
e.g.,
http://172.168.2.10/action/RebootDevice
body:
{
"operator": "RebootDevice",
"info": {
"DeviceID": 1305269,
"IsRebootDevice": 1
}
}

3.25 Picture service function

Picture service functions include: compare similarity of pictures, search local


face database with pictures, and detect picture faces

3.25.1 Picture comparison similarity

Operator: GetPictureSimilarity

28
URI:http://<server ipaddr>/action/GetPictureSimilarity

e.g.,
http://192.168.2.10/action/GetPictureSimilarity
Issued body
Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetPictureSimilarity Get the similarity of
people's pictures
picinfo1 char Face64 encoded data of
face pictures
(Not exceeding 1m)
picinfo2 char Face64 encoded data of
face pictures
(Not exceeding 1m)

{
"operator":"GetPictureSimilarity",
"picinfo1":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQAB ..... ",
"picinfo2":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQAB ..... "
}
Reply the correct body
Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetPictureSimilarity Get the similarity of
people's pictures
info json object specific contents
Similarity float Face image similarity

{
"operator": "GetPictureSimilarity",
"info": {
"Similarity":80
}
}

29
3.25.2 Search the local face database by map

Operator: GetPictureSearch
URI:http://<server ipaddr>/action/GetPictureSearch

e.g.,
http://192.168.2.10/action/GetPictureSearch
Issued body
Parameter information (Note: optional is optional):
Key Type Values Description
operator char GetPictureSearch Search the local face
database by map
info json object specific contents
MaxSimilarity float Similarity threshold
MaxNum int Maximum number
picinfo char Face64 encoding of
face pictures
Data (less than 1m)

{
"operator": "GetPictureSearch",
"info": {
"MaxSimilarity":80,
"MaxNum":5
},
"picinfo":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQAB ..... "
}
Reply the correct body
Parameter information: personnel information + personnel information +
personnel information + personnel information ...
(For detailed description of the fields, please refer to 3.10 Add, edit
and modify the list)
Key Type Values Description
operator char GetPictureSearch Get face picture
satisfaction bar
Information and
30
pictures

info json object specific contents


TotalNum int List returned by
search results
total
SearchInfo List returned

31
Uid unsigned int Database id
Type int 0~1 List Type 0:
Whitelist
1: blacklist
Name char Name (up to 64
bytes)
Cardtype int Enter card number
type
MjCardNo unsigned int Access card number
Sex int gender
Nation int Nation
Certype int type of certificate
Cernumber char ID number (not more
than 32
byte)
Birth char Date of birth
Phone char telephone number
Place char Hometown (32 bytes
or less)
Addr char Address (up to 72
bytes)
Notes char Remarks (up to 64
bytes)
Filetype int file type
Fileindex unsigned int File number
Filepos unsigned int position
CustomizeID unsigned int User-defined
personnel id
number, you can use
this id number to
modify and delete
the corresponding
personnel
information. Note:
Do not use the same
id repeatedly to
add personnel,
32
otherwise it will
cause modification
and deletion
Wait for an error.

PersonUUID char User-defined


personnel uuid
number (no more than
48 bytes), you can
use this id number
to modify and delete
the corresponding
personnel
information
management. Note:
You can not use the
same uuid repeatedly
to add personnel,
Otherwise it will
cause modification
and deletion

33
Wait for an error.
Time char Creation time

{
"operator": "GetPictureSearch",
"info": {
"TotalNum":1,
"SearchInfo":[
{
"Uid":0,
"Type": 0,
"Name":"test",
"Cardtype":0,
"MjCardNo":0,
"Sex":0,
"Nation":0,
"Certype":0,
"Cernumber":"421128188905061144",
"Phone":"13691111112",
"Place": "Shenzhen Baoan",
"Addr": "Shenzhen Baoan",
"Notes": "Notes",
"Filetype": 0,
"Fileindex": 0,
"Filepos": 0,
"Time":"2018-03-12/09:09:20"
}
]
}
}

3.25.3 Detect picture faces

Operator: DetectFaceFromPic
URI:http://<server ipaddr>/action/DetectFaceFromPic
34
e.g.,
http://192.168.2.10/action/DetectFaceFromPic
Issued body
Parameter information (Note: optional is optional):
Key Type Values Description
operator char DetectFaceFromPic Detect picture faces
info json object specific contents
picinfo char Face64 encoding of
face pictures
Data (less than 1m)

{
"operator": "DetectFaceFromPic",
"info": {
},
"picinfo":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQAB ..... "
}
Reply the correct body
Parameter information: whether a face is detected
Key Type Values Description
operator char DetectFaceFromPic Detect picture faces
info json object specific contents
DetectFace int 0~1 Face detection
result: 0: No face
detected
1: Face detected

{
"operator": "DetectFaceFromPic",
"info": {
"DetectFace":1,
}
}

35
3.26 Snapshot query

Snapshot record query is about stranger's snap record query. If


it is a pass-by comparison, the information of the person is not
stored in the snap record; the snap record query mainly includes the
total number of snap records and the snap record information.
Parameter information (Note: optional is optional):

Key Type Values Description


operator char SearchCaptureNum SearchCaptureNum:
or query the total
SearchCapture number of captured
records according to
the criteria
SearchCapture:
according to
Conditional query
snapshot record
info json object specific contents
DeviceID int Device id
BeginTime char Search start time,
required
EndTime char Search end time,
required
BeginNO int Start sequence number
(optional) returned, not set
Set to start from 0
by default
RequestCount int 0~100 The number of
(optional) records returned,
the maximum is 100,
no default is set
Maximum return 15

3.26.1 Query the total number of snapshot records


36
Query the total number of

snapshot records according to

the time condition.


URI: http://<server ipaddr>/action/SearchCaptureNum

http://192.168.2.10/action/SearchCaptureNum

Issued body

37
{
"operator": "SearchCaptureNum",
"info": {
"DeviceID": 1305433,
"BeginTime": "2020-01-01T00:00:00",
"EndTime": "2020-12-13T23:09:00"

}
}

Parameter information returned:


Key Type Values Description
operator char SearchCaptureNum SearchCaptureNum:
query total capture
records based on
criteria
number
info json object specific contents
DeviceID int Device id
CaptureNum int Return to snapshot by
time
Total number of
records

Returned body:

38
Total number of snapshot records returned based on conditions

{
"operator": "SearchCaptureNum",
"info": {
"DeviceID": 1305433,
"CaptureNum": 485
}
}

39
3.26.2 Snapshot recorder information query

According to the conditions, query and query the record record personnel
information.
Key Type Values Description
operator char SearchCapture SearchCapture:
according to
Conditional query
snapshot record
info json object specific contents
DeviceID int Device id
CaptureNum int Return to snapshot by
time
Total number of
records
Listnum int Crawl returned based
(optional) on conditional query
Number of recorded
personnel information
LibSnapID int The information of
(optional) the snapshot record
returned
Snapshot library id
CreateTime Char YYYY-MM-DDThh:mm: Snapshot time
ss
SnapPicinfo Char Snapshot of the
base64 series
code

Operator: SearchCapture
URI: http://<server ipaddr>/action/SearchCapture

http://192.168.2.10/action/SearchCapture
Issued body

40
e.g.,
http: // <server ipaddr> / action /
SearchCapture Send the body:
Search by time:
{
"operator": "SearchCapture",
"info": {
"DeviceID": 1305433,
"BeginTime": "2020-01-13T00:00:00",
"EndTime": "2020-01-13T23:59:59"

}
}
Or
Limit the number of snapshot records returned:
{
"operator": "SearchCapture",
"info": {
"DeviceID": 1305433,
"BeginTime": "2020-01-01T00:00:00",
"EndTime": "2020-01-13T23:59:59",
"RequestCount": 10
}
}
Or
Limit the number of snapshot records returned and where they started:
{
"operator": "SearchCapture",
"info": {
"DeviceID": 1305433,
"BeginTime": "2020-01-01T00:00:00",
"EndTime": "2020-01-13T23:59:59",
"BeginNO": 5,
"RequestCount": 10
}

41
}

Returned body:
Returns the information of the snapshot recorder according to the time
condition:
{
"operator": "SearchCapture",
"info": {
"DeviceID": 1305433,
"Listnum": 15,
"List": [
{
"LibSnapID": 3303,
"CreateTime": "2020-01-13T20:02:43",
"SnapPicinfo": "data:image/jpeg;base64,Qk3m5......
},
{
"LibSnapID": 3302,
"CreateTime": "2020-01-13T19:36:06",
"SnapPicinfo": "data:image/jpeg;base64,Qk225QA......
},
{
"LibSnapID": 3301,
"CreateTime": "2020-01-13T18:34:15",
"SnapPicinfo": "data:image/jpeg;base64,Qk225......
},
......
{
"LibSnapID": 3289,
"CreateTime": "2020-01-13T16:31:26",
"SnapPicinfo": "data:image/jpeg;base64,Qk22......
}
]
}
42
}

Or
Limit the number of snapshot records returned to 10
{
"operator": "SearchCapture",
"info": {
"DeviceID": 1305433,
"Listnum": 10,
"List": [
{
"LibSnapID": 3303,
"CreateTime": "2020-01-13T20:02:43",
"SnapPicinfo": "data:image/jpeg;base64,Qk3m5......
},
{
"LibSnapID": 3302,
"CreateTime": "2020-01-13T19:36:06",
"SnapPicinfo": "data:image/jpeg;base64,Qk225QA......
},
{
"LibSnapID": 3301,
"CreateTime": "2020-01-13T18:34:15",
"SnapPicinfo": "data:image/jpeg;base64,Qk225......
},
......
{
"LibSnapID": 3294,
"CreateTime": "2020-01-13T16:31:38",
"SnapPicinfo": "data:image/jpeg;base64,Qk22......
}
]
}
}

43
Or
Limit the number of snapshot records returned by 10 and start position:
{
"operator": "SearchCapture",
"info": {
"DeviceID": 1305433,
"Listnum": 10,
"List": [
{
"LibSnapID": 3298,
"CreateTime": "2020-01-13T14:32:38",
"SnapPicinfo": "data:image/jpeg;base64,Qk3m5......
},
{
"LibSnapID": 3397,
"CreateTime": "2020-01-13T14:32:36",
"SnapPicinfo": "data:image/jpeg;base64,Qk225QA......
},
{
"LibSnapID": 3396,
"CreateTime": "2020-01-13T14:32:34",
"SnapPicinfo": "data:image/jpeg;base64,Qk225......
},
......
{
"LibSnapID": 3289,
"CreateTime": "2020-01-13T16:31:26",
"SnapPicinfo": "data:image/jpeg;base64,Qk22......
}
]
}
}

44
3.27 Temperature parameter

The temperature parameter is mainly related to the temperature operation parameters


of the machine model face recognition integrated machine that supports temperature
detection, and this parameter is only supported.
Parameter information (Note: optional is optional)

Key Type Values Description


operator char GetTemperature GetTemperature: Get
or temperature parameter
SetTemperature SetTemperature: Set
temperature
Degree parameter
info json object specific contents
DeviceID int Device id
FaceMaskTPTM int 0~6 Mask temperature
detection mode
ode 0: None (use 3.2 door
opening strip
VerifyMode mode in
software
Identification
comparison)
1: temperature
detection (temperature
detection
Pass below temperature
alarm threshold
Row)
2: Mask detection
(Pass)
3: temperature + white
list detection
4: mask + whitelist
detection
5: mask + temperature
detection
6: mask + temperature
+ white list check
45
Measurement
TemperatureC double 0.0 Temperature
heck calibration
TemperatureH double 37.3 Temperature alarm
igh threshold (default
(Confirm: 37.3)
EnvTemperatu double Ambient temperature
re (optional) (reserved)

EnvTemperatu double Ambient temperature


reCheck (optional) calibration value
(reserved)

46
OpenLaser int(optional) 0~1 Whether to turn on the
laser (reserved)

47
3.27.1 Get temperature parameters

Operator: GetTemperature

URI:http://<server ipaddr>/action/GetTemperature

e.g.,
http://192.168.2.10/action/GetTemperature

Reply body
{
"operator": "GetTemperature",
"info": {
"FaceMaskTPTMode":5,
"TemperatureCheck":0.0,
"TemperatureHigh":37.2,
"EnvTemperature":17.0,
"EnvTemperatureCheck":0.0,
"OpenLaser":1,
}
}

3.27.2 Set temperature parameters

Operator: SetTemperature

URI:http://<server ipaddr>/action/SetTemperature

e.g.,
http://192.168.2.10/action/SetTemperature
Send body

48
"operator": "SetTemperature",
"info": {
"DeviceID": 1305433,
"FaceMaskTPTMode":4,
"TemperatureCheck":0.00,
"TemperatureHigh":37.20,
"EnvTemperature":17.00,
"EnvTemperatureCheck":0.00,
"OpenLaser":1,
}
}

49
Appendix a: revision history
date Author versio modifie
n the
number record
2018-03-25 LiangSY 1.0 First draft
2018-04-03 LiangSY 1.1 1. Fixed some errors in the
documentation.
2. Fixed 3.3 problem with setting
username and password key.
2. Modified 3.2.1 Obtaining the
response content of the door
opening condition setting
parameters.
3. Modified 3.2.2 Setting Door
Opening Conditions Parameters.
4. Modify the time zone parameter
in 3.6 ntp parameters.
5. Added 3.9.2 Setting Device
Information Item.
6. Amend 3.2. Door opening
condition parameters.
7. Amend the character length
settings in 3.3 Setting
Username, Password, 3.7 Center
Connection, 3.9 Device
Information, 3.10 Adding,
Editing and Modifying Lists,
3.12 Data Subscription.
8. Amend the definition of the
Wiegand number generation method
in 3.10 List addition, edit
modification, and 3.12.4
Reporting of authentication
results.
2018-04-12 LiangSY 1.2 1. Fixed some errors in the
documentation.
2. increaseAttachRecord b:
authentication failed or
interface setReply to the
message.
3. Modified 3.12.3 Real-time
50
snapshot report and
3.12.4 Examples of reporting of
certification results.
4. Capitalize the first letter
of the key in info. 5. Modify
the example in the heartbeat of
3.14 subscription
2018-05-04 LiangSY 1.3 1.Modify 3.12.4 Push messages
and corresponding examples for
reporting authentication
results, add PersonID reporting.
2018-05-13 XuLS 1.3 Add the face capture comparison
server related interface. 3.15.
Access Camera Parameters
3.16. Face capture comparison
server parameters
3.17. Personnel type parameters
3.18. Face service function
2018-06-21 WangXY 1.3 Add list search query interface
3.19. List search query

51
2018-06-26 LiangSY 1.4 1. Corrected some parameters of
the face capture comparison
server related interface
2. Corrected some parameters of
list search query interface
3. Added 3.12.5 Querying
Subscribed Information
4. increase 3.20 Door opening
control
2018-07-05 XuLS 1.5 1. Modify 3.2 door opening
conditions and increase door
opening methods
2.Modify 3.10.2 List editing and
modification, 3.11. List
deletion, 3.19.1 Single list
query, 3.19.3 Multiple list
query, Added operation mode of
device database LibID
2018-07-05 ChenCH 1.5 Increase Appendix c: Capturing
packets for specific functional
interfaces
2018-07-09 XuLS 1.6 1. Modify 3.1 sound settings
2018-07-11 WangXY 1.7 1. Modification, 3.19.1 single
list query, 3.19.3 multiple list
query, uuid field added to the
reply message
2. Modified 3.10.1 single list
addition, 3.10.2 list edit
modification, 3.11. List
deletion, and added uuid field
for delivery information
3. Modify 3.12 data
subscription, add Value type of
Topics, control the picture
information of subscription
Teleport
2018-07-16 WangXY 1.7 1. Modify 3.12 data
subscription and add QR code
subscription function
2. Add 3.12.5 QR code to report
3. Modified 3.13 Cancel
subscription, add QR code to
cancel subscription function
4. Modified 3.12.6 Querying
Subscribed Messages, Adding
52
Value Type of Topics,
Controlling Subscription
Image information transmission
and QR code subscription query

2018-07-31 XuLS 1.7 1. Modified 3.2 Door Opening


Conditions, Added Door Opening
Mode Field: OpendoorWay, Control
Door Opening Mode
2. Modify 3.10 Add, edit and
modify the list to increase the
access permissions of the X
channel (Face Multiplex Server)
ChannelAuthorityX field
3. Modified 3.12.4 Reporting
the authentication result, and
added the AccessChannel field of
the personnel channel number
(used by the Face Multiplex
Server)
4. Modified 3.12.3 Real-time
snapshot report, increase
Snapshot Face Picture Type
PictureType Field
2018-11-16 LiangSY 1.8 1. Related parameters for
adding personnel list for
access control machine
2. Increased access control 3.21
Password operation

53
2018-11-19 WangXY 1.9 1. Modify 3.15 access camera
parameters, use json array
instead of the original
expression of subscripts
2. Modify 3.17 personnel type
parameters, use json array
instead of the original
representation of subscripts
3. increase 3.22 Control record
query
2019-01-21 WangXY 1.10 1. Modification 3.12.1 does not
require acknowledgement
ID, 3.12.2 Provide a user name
and password when subscribing.
Submitting requires
authentication, adding card
authentication and password
authentication subscription for
access control machines.
2.3.12.6 Query the subscribed
information, modify it to
3.12.7 Query the subscribed
information, and add the card
authentication and password
cancellation of the access
control subscription
3. Added 3.12.6 ic card number
authentication result report
(access control machine) and
3.12.7 password authentication
result report (access control
machine)

54
2019-03-8 LaiWS 1.11 1. Use optional to indicate
which fields are optional. If
the optional information is not
marked as optional, it is
required.
2. Change the type of info
field from char to json object,
and correct other non-standard
types.The length of some string
types is explained below.
3. Added 3.23.1 Obtaining Common
Setting Parameters and 3.23.2
Setting Common Parameters
4. Modified the ConInfo field of
the issued body in 3.15 access
camera parameters to be the same
as the field IPC_Info in the
reply body, and the ConInfo
field of the delivered body in
3.17 personnel type was changed
to the field in the reply body
WorkTypeInfo consistent
2019-04-03 LaiWS 1.12 1. Added 3.10.2 to add multiple
lists
2019-09-10 LaiWS 1.13 1. Added 3.24 Restart device

55
2019-09-26 CaiFF 1.14 1. Modify 3.12.3 Real-time
snapshot push to
3.12.3 Reporting by Strangers
2. Modified 3.18.2 Similarity of
Pictures
for 3.25.1 Image Similarity
3. Modified 3.18.4 Searching
Local Face Database by Image
for 3.25.2 Searching a Local
Face Database by Graph
4. Modified 3.18.3 Similarity of
feature codes to
3.18.2 Similarity of Feature
Codes
5. Modified 3.18.5 Obtaining
Face Pictures as
3.18.3 Obtaining Face Pictures
6. increase 3.25.3 Detecting
pictures of faces
2019-10-22 CaiFF 1.15 1.3.10.1 Add a single
list3.10.2 Add multiple
checklists
2.3.10.1 Add a single list
3.10.3 Edit the list
3, 3.19 List search query add
temporary list 3
Valid Count field description
2019-11-05 LaiWS 1.16 1.3.12.6 Identity Card
Information Reporting
2019-11-05 CaiFF 1.16 1. 3.12 Add breakpoint resume
transmission for data
subscription
2.3.12.1 Pushed Information Does
Not Need Authentication
3.12.2 Provide user name and
password when subscribing
3.3.12.3 Report by Strangers
3.12.4 Report Authentication
Results Increase Sendintime
Whether to Push Keywords in Time
4.3.12.9 Query for Subscribed
Information Increase
Breakpoint resume and
breakpoint resume time
56
keywords return

2019-11-19 LiangSY 1.17 1. 3.12 Increase the


subscription heartbeat interval
setting for data subscription
2019-11-29 CaiFF 1.18 1. 3.10 Adding, Editing,
Modifying Lists and Sending
List Pictures Support URI,
compatible with base64 encoding
And add uri to get the picture
example

57
2019-12-04 Chench 1.19 1.2.4 Added postman
authentication screenshot for
identity authentication.
2. 3.20 Door opening control
status controls whether to open
the door; added msg field for
prompt information; (compatible
with previous door opening
methods)
3.Modify and updateAttachRecord
c: specific functional interface
Capture screenshot.
2019-12-13 CaiFF 1.20 1. Modify 3.11 list deletion
to 3.11.1 single or multiple
list deletion
2. Add 3.11.2 delete all
personnel list
2019-12-25 CaiFF 1.21 1. Modify 3.1 sound settings, add
fields
2. Modify 3.2 door opening
conditions and add fields
3. Modified 3.11.2 Delete the
interface of all personnel
list
4. Modify 3.12 data subscription
and add fields
5.3.10 Add, edit and modify the
list, add different card number
processing methods, modify
examples
2019-12-28 CaiFF 1.21 1. Add 3.10.5 Wigan access card
number and built-in swipe id
card number
2020-01-03 CaiFF 1.21 1. Modify the 2.4 authentication
instructions
2020-01-13 CaiFF 1.22 1. increase 3.22.1 Query the
total number of control
records
2. increase 3.26 Snapshot query
2020-01-16 CaiFF 1.22 1. 3.22 Control record
queryIncrease hhtp far
Cheng door opening control
record query return

58
2020-02-18 CaiFF 1.22 1.3.22.2 Information query of
control recordswith
3.12.4 Reporting Authentication
Results and Adding
Authentication Types
2. Modified 3.11.1 to delete
TotalNum field description
2020-02-29 CaiFF 1.22 1.3.12.3 Snapshot report of
strangers, increase temperature
report and other fields
2.3.12.4 Adding fields such as
temperature report to the
authentication result report
3. increase 3.27 Temperature
parameters
2020-03-03 CaiFF 1.23 1. modify 3.27 Temperature
parametersMask temperature
detection
mode

59
Appendix b: Message reply for
authentication failure or interface
setting

B.1 Authentication failed

{
"operator": "authentication",
"info":{
"Result": "Fail",
"Detail": "Unsupport authentication protocol type"
}
}

Or

{
"operator": "authentication",
"info":{
"Result": "Fail",
"Detail": "Unknown user or password"
}
}

B.2 Set message reply

Set up successfully:

{
"operator": "<Operator>",
"code": 200,
"info":{
"Result": "Ok"
60
}
}
Setup failed:
{
"operator": "<Operator>",
"info":{
"Result": "Fail",
"Detail": "<detial>"
}
}

Appendix c: Capturing packets for


specific functional interfaces

C.1 Sound settings

C.1.1 Get audio settings parameters

61
C.1.2 Set audio parameters

62
C.1.3 Get the number and file name of files played

63
C.1.4 Play the specified file sound

64
C.2 Door opening conditions

C.2.1 Get the door opening condition setting


parameters

Or

65
66
C.2.2 Set the door opening conditions parameters

67
C.3 Set username and password

68
C.4 Network parameters

c.4.1 Get network parameters

69
c.4.2 Setting network parameters

1
C.5 Time parameter

C.5.1 Get system time

2
C.5.2 Set the system time

3
C.6 ntp parameter

c.6.1 Get ntp parameters

4
c.6.2 Setting ntp parameters

155
c.7 Central connection

c.7.1 Get center connection parameters

156
c.7.2 Setting center connection parameters

157
c.8 Factory reset

158
c.9 Setting information

c.9.1 Obtaining device information

159
c.9.2 Setting device information

160
C.10 Add, edit and modify the list

C.10.1 Single list add

……

161
c.10.2 Multiple list additions

……

162
c.10.3 List edit
and modification

……

1
c.10.4 Get the old and
new database versions

2
c.11 List
deletion

3
c.12 Data
subscription
c.12.1 Push messages do not require authentication

4
c.12.2 Provide username and password when
subscribing

1
c.12.3 Reporting to
a stranger

……

2
c.12.4 Reporting
of certification
results

……

3
c.12.5 Reporting of
ID information

c.12.6 Query for subscribed messages

4
c.13 Cancel
subscription

1
c.14
Subscription
Heartbeat

2
c.19 List search
query
c.19.1 Single list query

3
c.19.2 Check the
total number of
lists

4
c.19.3 Multiple list queries

……

175
176
c.20 Door opening control

c. 20.1 Door opening control

c.22 Control record query

Conditional search method:

177
Find by id:

178
1
C.23 Common setting
parameter
settings

C.23.1 Get common setup


parameters

2
C.23.2 Set common parameters

3
C.24 Restart the device

c. 24.1 Restart the device

4
c.25 Picture service function

C.25.1 Picture comparison similarity

……

……

1
C.25.2 Search the local face database by map

……

2
C.25.3 Detect picture faces

……

You might also like