HTTP API Protocol For IP Media Device-23.02.14
HTTP API Protocol For IP Media Device-23.02.14
1
CONTENTS
HTTP API Protocol For IP Media Device ....................................................................................................................... 1
1 References ................................................................................................................................................................ 8
2 OVERVIEW................................................................................................................................................................. 8
2.1 Transmission Mechanism............................................................................................................................... 8
2.2 JSON ............................................................................................................................................................... 8
2.3 URL ................................................................................................................................................................. 8
2.4 HTTP Header Field ......................................................................................................................................... 9
2.5 Response Messages Body ............................................................................................................................ 10
2.6 Command Categories................................................................................................................................... 12
2.7 Error Code .................................................................................................................................................... 12
2.8 Abbreviations ............................................................................................................................................... 13
2.9 Common error_code.................................................................................................................................... 13
3 SYSTEM ................................................................................................................................................................... 16
3.1 General ........................................................................................................................................................ 17
3.2 Date&Time ................................................................................................................................................... 18
3.3 NTP............................................................................................................................................................... 20
3.4 DST ............................................................................................................................................................... 21
3.5 Output Configuration ................................................................................................................................... 23
3.6 User .............................................................................................................................................................. 24
3.7 System Information...................................................................................................................................... 30
3.8 Channel Information .................................................................................................................................... 31
3.9 Record Information ...................................................................................................................................... 32
3.10 Network State ............................................................................................................................................ 33
4 NETWORK ............................................................................................................................................................... 36
4.1 Network Configuration ................................................................................................................................ 37
4.1.1 Network Base Information ................................................................................................................ 37
4.1.2 WLANScan......................................................................................................................................... 43
4.2 DDNS ............................................................................................................................................................ 45
4.2.1 DDNS Parameters.............................................................................................................................. 45
4.3 Email ............................................................................................................................................................ 47
4.3.1 Email Parameters .............................................................................................................................. 47
4.3.2 Email Test .......................................................................................................................................... 49
4.4 FTP ............................................................................................................................................................... 50
4.4.1 FTP Parameters ................................................................................................................................. 50
4.5 IP Filter Parameters...................................................................................................................................... 53
4.6 Https Configure ............................................................................................................................................ 55
4.7 Voice Assistant ............................................................................................................................................. 56
4.8 ipv6 .............................................................................................................................................................. 57
4.9 snmp ............................................................................................................................................................ 58
4.10 Rtsp ............................................................................................................................................................ 59
4.11 Onvif........................................................................................................................................................... 60
4.12 Tuya ............................................................................................................................................................ 60
2
5 CHANNEL................................................................................................................................................................. 61
5.1 Channel Configuration ................................................................................................................................. 61
5.1.1 Broadcast ipc..................................................................................................................................... 61
5.1.2 Digital channel .................................................................................................................................. 62
5.1.3 Custom protocol management ......................................................................................................... 68
5.1.4 Analog channel ................................................................................................................................. 69
5.1.5 Wireless channel ............................................................................................................................... 70
5.1.6 Digital wireless channel configuration .............................................................................................. 72
5.2 OSD .............................................................................................................................................................. 74
5.3 Image Control .............................................................................................................................................. 78
5.4 Video Color .................................................................................................................................................. 86
5.5 Video Cover.................................................................................................................................................. 88
5.6 PTZ ............................................................................................................................................................... 90
5.7 ROI ............................................................................................................................................................... 91
5.8 POE Power ................................................................................................................................................. 102
5.9 Video Crop ................................................................................................................................................. 103
6 STREAM................................................................................................................................................................. 105
6.1 Encode ....................................................................................................................................................... 105
6.2 Capture ...................................................................................................................................................... 110
6.3 Rtsp Url ...................................................................................................................................................... 111
7 ALARM .................................................................................................................................................................. 112
7.1 IO Alarm ..................................................................................................................................................... 113
7.2 Motion Alarm............................................................................................................................................. 115
7.3 PTZ Linkage ................................................................................................................................................ 119
7.4 Exception ................................................................................................................................................... 122
7.5 PIR .............................................................................................................................................................. 123
7.6 Flood-light .................................................................................................................................................. 127
7.7 Sound Detection ........................................................................................................................................ 130
7.8 Occlusion Detection ................................................................................................................................... 133
7.9 Perimeter Intrusion Detection ................................................................................................................... 135
7.10Line Crossing Detection ............................................................................................................................ 141
7.11Stationary Object Detection ..................................................................................................................... 146
7.12Pedestrian Detection ................................................................................................................................ 152
7.13Face Detection .......................................................................................................................................... 157
7.14Cross Counting .......................................................................................................................................... 162
7.15IntelligentAnalysis ..................................................................................................................................... 165
7.16 Voice Prompt ........................................................................................................................................... 168
7.16.1 Description .................................................................................................................................... 168
7.16.2 Syntax ............................................................................................................................................ 168
7.16.3 Example......................................................................................................................................... 172
7.17 Combination Alarm .................................................................................................................................. 174
7.18 Linkage Schedule ..................................................................................................................................... 180
7.19 Serial Transport ........................................................................................................................................ 183
7.20 IO-AlarmStatus......................................................................................................................................... 184
3
7.21 Disarming ................................................................................................................................................. 185
8 STORAGE ............................................................................................................................................................... 190
8.1 Disk ............................................................................................................................................................ 190
8.1.1DiskConfiguration ............................................................................................................................ 190
8.1.2Disk Control...................................................................................................................................... 192
8.1.3Disk Format ...................................................................................................................................... 193
8.2 Disk Group ................................................................................................................................................. 195
8.3 Cloud .......................................................................................................................................................... 197
8.4 Audio.......................................................................................................................................................... 200
8.5 RAID ........................................................................................................................................................... 202
8.6 Cloud(new)................................................................................................................................................. 139
9 SCHEDULES ........................................................................................................................................................... 212
9.1 Schedules ................................................................................................................................................... 212
10 RECORD ............................................................................................................................................................... 214
10.1 Record Configuration ............................................................................................................................... 214
10.2 Search Record .......................................................................................................................................... 215
10.3 Playback rtsp url....................................................................................................................................... 219
10.6 Month Search .......................................................................................................................................... 222
10.7 Pic Playback.............................................................................................................................................. 222
10.7.1Syntax............................................................................................................................................. 223
10.7.2 Parameters .................................................................................................................................... 223
10.8Playback Page ........................................................................................................................................... 226
10.9 Record Tag................................................................................................................................................ 228
11 MAINTENANCE ................................................................................................................................................... 231
11.1 Log............................................................................................................................................................ 231
11.2 Load Default Parameter ........................................................................................................................... 239
11.3 Auto Reboot ............................................................................................................................................. 240
11.4 Ftp Upgrade ............................................................................................................................................. 240
11.5 Device Reboot .......................................................................................................................................... 244
11.6 Import/Export Parameter ........................................................................................................................ 245
11.6.1 Description .................................................................................................................................... 245
11.6.2 Syntax ............................................................................................................................................ 245
11.6.3 Parameters .................................................................................................................................... 245
11.7IPC Maintenance ....................................................................................................................................... 246
11.7.1 Description .................................................................................................................................... 246
11.7.2 Syntax ............................................................................................................................................ 246
11.7.3 Parameters .................................................................................................................................... 248
11.8 System Upgrade ....................................................................................................................................... 253
11.9 Developer Mode ...................................................................................................................................... 255
11.10 Device Shutdown ................................................................................................................................... 257
11.11 Http Upgrade ......................................................................................................................................... 257
11.12 Defogging Fan ........................................................................................................................................ 258
12 LOGIN .................................................................................................................................................................. 258
12.1 Login......................................................................................................................................................... 259
4
12.1.1 Description .................................................................................................................................... 259
12.1.2 Syntax ............................................................................................................................................ 261
12.1.3 LOGIN ............................................................................................................................................ 271
12.1.4 Recover Password ......................................................................................................................... 273
12.2 Get Device Page ....................................................................................................................................... 279
12.2.1 Description .................................................................................................................................... 279
12.2.2 Syntax ............................................................................................................................................ 280
12.2.3 Example......................................................................................................................................... 281
12.3 Preview Control ....................................................................................................................................... 285
12.3.1 Description .................................................................................................................................... 285
12.3.2 Syntax ............................................................................................................................................ 286
12.3.3 Example......................................................................................................................................... 294
12.3.3 Example......................................................................................................................................... 294
12.4 LogOut ..................................................................................................................................................... 300
12.5Download root certificate File(A01) ......................................................................................................... 301
12.5.1 Description .................................................................................................................................... 301
12.5.2Syntax............................................................................................................................................. 301
12.5.3 Example......................................................................................................................................... 302
12.6 Account Rules .......................................................................................................................................... 303
12.6.1 Description .................................................................................................................................... 303
12.6.2 Syntax ............................................................................................................................................ 303
12.6.3 Example......................................................................................................................................... 304
12.7 Request pubkey or randbyte ................................................................................................................... 305
12.7.1 Description .................................................................................................................................... 305
12.7.2 Syntax ............................................................................................................................................ 306
12.7.3 Example......................................................................................................................................... 307
12.7.4 Instruciton ..................................................................................................................................... 308
13 MutexParam ....................................................................................................................................................... 310
13.1 MutexParam ............................................................................................................................................ 310
14 Function .............................................................................................................................................................. 310
14.1 Snapshot .................................................................................................................................................. 310
14.2 Request I Frame ....................................................................................................................................... 313
14.3 ANR .......................................................................................................................................................... 313
14.4 ETR ........................................................................................................................................................... 314
15 Event ................................................................................................................................................................... 315
15.1 event check .............................................................................................................................................. 315
15.1 event check Description and example ..................................................................................................... 321
15.2 Http listening ........................................................................................................................................... 323
15.2 Http listening description......................................................................................................................... 324
15.2.1 Push alarm through Get mode ..................................................................................................... 324
15.2.2 Push alarm through POST mode ................................................................................................... 325
15.2.3 Http listening keep alive................................................................................................................ 330
16 Custom ................................................................................................................................................................ 331
16.1 Push server .............................................................................................................................................. 331
5
16.2 Shared Cloud(A01 customizated)............................................................................................................. 332
16.3 Write Log(A01 customizated) .................................................................................................................. 332
16.4 Cloud Upgrade(A01 customizated) .......................................................................................................... 333
16.5 Develop Mode(A01 customizated) ..................................................................................................... 334
16.6 Cert Manage(A01 customizated)........................................................................................................ 336
6
17.4.3 Cross Counting Statistics ............................................................................................................... 478
17.4.4 Heat Map Statistics ....................................................................................................................... 480
17.5 Snaped face or object (pedestrian, car) real time alarm (NVR、IPC only, A01 no) .......................... 483
17.6Attribute Detection ................................................................................................................................... 487
17.7Repeat Customer ...................................................................................................................................... 490
17.8 Cross Counting Scenario .......................................................................................................................... 495
17.8.1 RealTime Info ................................................................................................................................ 496
17.8.2 Map ............................................................................................................................................... 499
17.8.3 Statistics ........................................................................................................................................ 501
17.8.4 Config ............................................................................................................................................ 505
17.8.5 Image Manage .............................................................................................................................. 509
17.x AI Operation Result Type(NVR only) ........................................................................................................ 511
18 Extended Functionality ....................................................................................................................................... 512
18.1 IPCVoice Prompt ...................................................................................................................................... 512
18.1.1 Description .................................................................................................................................... 512
18.1.2 Syntax ............................................................................................................................................ 513
18.1.3 Example......................................................................................................................................... 514
19 Push .................................................................................................................................................................... 516
19.1.1 Description .................................................................................................................................... 516
19.1.2 Syntax ............................................................................................................................................ 517
19.1.3 Example......................................................................................................................................... 521
Appendixes .............................................................................................................................................................. 541
A.1Additional Error Codes(A01)....................................................................................................................... 541
A.2 Secondary certification development guide.............................................................................................. 546
A.3 Set Password Development Guide ............................................................................................................ 548
FQA .......................................................................................................................................................................... 550
7
1 References
[1] RFC2616 Hypertext Transfer Protocol-HTTP/1.1
[2] RFC7159 The JavaScript Object Notation (JSON) Data Interchange Format
[3] RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax and Semantics
[4] RFC 2617 HTTP Authentication:Basic and Digest Access Authentication
[5]http://json-schema.org/
2 OVERVIEW
2.1 Transmission Mechanism
The HTTP API transaction starts from a request from a client application. The web server on the IP media
devices processes the request and sends the response back to the client application. The HTTP request is taken in
POST or Get method form as described in the following paragraphs. If the request is successful, the IP media video
device will return a HTTP header contains 200 OK. The HTTP Body will contain actual result or error message by
JSON format if an error occurs.
2.2 JSON
A device must support the syntax defined by RFC7159 and UTF-8 character set . All Json files must adopt
UTF-8 encoding according to RFC3629
2.3 URL
The URL scheme is used to locate device resources via a specific protocol in the network.
This section defines the syntax and semantics for http(s) URLs.
protocol: URL scheme for the particular request. The HTTP protocol is allowed in this specification.
host: The host field refers to the hostname, IP address, or the Fully Qualified Domain
Name of an IP device.
port: The port field refers to the port number of that host on which the identified resource is
located at the IP device listening for TCP connections. If the port is empty or not given, the
defaultport is assumed. For HTTP, the default port is 80. For HTTPS the default port is 443.
fixed string: Fixed string, usually use “API”.
cmd name:The specific command to an IP device.
8
2.4 HTTP Header Field
Requests from the video management system or the client application are packed in HTTPmessages. A request
message composed of three parts: the connection header field, the authorization header field, and the entity body
field. HTTP/1.1 is implemented and utilized according to RFC 2616 in the IP devices. For a video management
system or client application that uses persistentconnection for multiple transactions, it is required to implement
“Connection: Keep-Alive” HTTP header field, while also adopt the “Connection: close” HTTP header field for the
last transaction of the persistent connection.
When a video management system or client application sends any request to the device, it must be
authenticated by means of Basic Access or Digest AccessAuthorization according to RFC 2617, and thus all the
devices are required to support Basic Access or Digest Access. Authorization header field is sent along with each
request, and if a user is authenticated, the request will follow the normal execution flow. If client HTTP request is
with no authentication credentials, unauthorized HTTP response (401) will be returned with WWW-Authenticate
header field.
The Content-Type entity-header field indicates the media type of the entity body. The Content-Type may be
designated as “application/json; charset=’UTF-8’”, “application/octet-stream”, etc. For configuration information,
the Content-Type is usually “application/json; charset=’UTF-8’”.
If there is a JSON block for the HTTP request or response, the Content-Type and Content-Length will be set
in the headers of the HTTP message.
The Content-Type is usually "application / json; character set = "UTF-8'". The request uses the POST method,
the body is in JSON format, and contains at least one version number field.
For example:
If only a small amount of API support is needed, it can be accessed through summary authentication. The format is
as follows::
POST/API/SystemInfo/Base/Get HTTP/1.1
Authorization: Digest username="admin",realm="RS realm",nonce="d7357432-26b6-49d7-bc31-
9
cd2c690fd115",uri="/action/getConfig/Camera",cnonce="dedb934132796d7066c7cb59068e3487",nc=00000001,response="de
8918839a8fa301bf6badf2967965c8",qop="auth"
Content-Type: application/json
Content-Length: 1234,
{
"version": "x.x"
“data” : {
}
}
{
“result”:”failed”,
“reason”:”xxxxxxxx”
“error_code”: “user_blocked”
“data” : {
}
}
10
Content-Length: 40
{
"version": "x.x",
“error_code”: “part_failed”,
“reason”:”xxxxxxxx”
“ch_error_code”: [{“error_code”:” no_support”, “channel”:” IP_CH1”},],
“data” : {
}
}
11
}
Command Description
Configure and operate the general system
System
functions.
Network Configure network interfaces and parameters
12
devices will use appropriate HTTP protocol defined status codes for error reporting and when received handle
accordingly.
Error Code Description
200 The request has succeeded.
400 The request was badly formed. This is commonly used
for creating or updating a resource, but the data was
incomplete or incorrect.
401 The request requires user authentication to access this
resource. If the request contains invalid
authentication data, this code is sent.
403 The request is not allowed because the server is
refusing to fill the request.
404 The requested resource does not exist.
500 An internal server error has occurred.
501 The requested is not implemented.
2.8 Abbreviations
For the purposes of the present document, the following abbreviations apply:
IPC IP Camera
NVR Network Video Recorder
CH Analog channel
IP_CH Digital channel
WIFI_CH Wireless channel
14
modification short_modify_time Password change interval is too short
current_pwd_error Current password error
username_empty User name empty
username_repeat User name repeat
username_invalid Only letters, numbers and underscores are allowed
for user name
unmatched_pwd The two inputs are different
pwd_empty Password empty
pwd_length_err Password length error
pwd_equal_name Password cannot be the same as user name or user
name reverse
pwd_equal_old The new password cannot be the same as the
previous N passwords. The number field will be
attached to the data, representing N
pwd_repeated The new password and the old password must have
two different characters
pwd_weak_rule The password must contain at least two
combinations of the following characters:
lowercase letters, uppercase letters, numbers,
special characters and spaces
pwd_risk Password belongs to weak password dictionary
pwd_invalid Password invalid
Mail test user_auth_failed Authentication failed
data_error Sending data error
net_unreachable_or_dns_wrong Network failure or DNS server error
connect_server_err Failed to connect to the server
check_smtp_port Connection failed. Check whether the port is
correct
tls_ssl_handshake_err TLS/SSL handshake error
email_connect_err Connection error, please check the recipient
account
upgrade in_user_interface User interface
updating The board end is being upgraded
lack_memory insufficient memory
file_error File error
no_need_upgrade The current version is the latest and does not need
to be updated
http protocol not_modified The page is not modified (304)
http_redirect_https http jump https (307)
not_found Page not found (404)
method_not_allowed Request method is not allowed (405)
payload_too_large Paylod too large (413)
uri_too_long uri too long (414)
15
internal_server_error Server internal error (500)
service_unavailable_error The service is unavailable (503, exceeding the
maximum number of tcp connections)
Configure IPC See details A.1
parameters
DDNS test connect_error Network connection error
send_error Send error
reveive_error Receive error
network_info_error Network info error
unknown_error Unknown error
net_unreachable_or_dns_wrong Network failure or DNS server filling error!
connect_ip_server_timeout Connection to IP server timed out!
connect_ddns_server_timeout Connection to DDNS server timed out!
send_request_to_server_timeout Sending request to DDNS server timed out!
ddns_server_response_timeout DDNS server response timeout!
invalid_username_or_password Invalid user name or password!
hostname_not_exist Hostname not exist!
hostname_or_username_not_exist The host name or user name does not exist!
hostname_blocked Hostname exists but is locked!
username_or_passwore_is_empty User name or password cannot be empty!
not_donator_stop_update Not donator, update stopped !
not_fully_qualified_domain_name The domain name is not fully compliant!
host_under_different_account The host exists but under different accounts!
too_many_or_too_few_hosts_found Too many or too few servers found
dns_service_error DNS server error, please try again in an hour!
requested_ip_address_failed Failed to request IP address
Cloud video cloud_video_upload_chn_limit The video cloud upload opening channel exceeds
the limit
Auto capture auto_capture_chn_limit The automatic capture opening channel exceeds the
limit
FTP test illegal_param Illegal parameter
connect_failed Failed to connect to Ftp
login_failed User login failed
write_file_failed fail to write to file
created_dir_failed Failed to create folder
ftp_close_failed Failed to close Ftp service
Add IPC lack_channel There is no free channel for adding new IPC
3 SYSTEM
3.1 General
16
GET
URL POST /API/SystemConfig/General/Get
Description Get System General Information
Request Body None
Successful Response System general information JSON (show as follow Table-3.1)
SET
URL POST /API/SystemConfig/General/Set
Description Set System General Information
Request Body System general information JSON (show as follow Table-3.1)
Successful Response The successful result response that described in 2.5
Example:
Request message:
POST /API/SystemConfig/General/Get HTTP/1.1
{
"version": "1.0",
"data": {
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {
"device_name": "N5208EN",
"menu_timeouts": 30,
"session_timeout": 5,
"preview_session_timeout": true
17
}
}
3.2 Date&Time
GET
URL POST /API/SystemConfig/DateTime/Get
Description Get System Date & Time Information
Request Body none
Successful Response Date& Time information JSON (show as follow Table-3.2)
SET
URL POST /API/SystemConfig/DateTime/Set
Description Set System Date & TimeInformation
Request Body Date& Time information JSON (show as follow Table-3.2)
Successful Response The successful result response that described in 2.5
Example:
Request message:
POST /API/SystemConfig/DateTime/Get HTTP/1.1
{
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
“result”:” success”,
"version": "1.0",
“data”:{
"date": "05/29/2019",
"time": "15:35:39",
"date_format": "MM/DD/YYYY",
"time_format": 24,
"time_zone": "GMT+8:00"
}
}
19
3.3 NTP
GET
URL POST /API/SystemConfig/NTP/Get
Description Get System NTP Information
Request Body none
Successful Response NTP information JSON (show as follow Table-3.3)
SET
URL POST /API/SystemConfig/NTP/Set
Description Set System NTP Information
Request Body NTP information JSON (show as follow Table-3.3)
Successful Response The successful result response that described in 2.5
"time.windows.com",
"time.nist.gov",
server string
"pool.ntp.org",
"UserDefined"
Customserveraddress
custom_server Max length: 63byte string Note:Use this variable when the Server
value is "User-Defined".
sync_period 0-65535 Int Synchronization period
Example:
Request message:
POST /API/SystemConfig/NTP/GetHTTP/1.1
{
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result":"success",
"data":{
"ntp_enable":"Enable",
20
"server":"UserDefined",
"custom_server":"ntp.ntsc.ac.cn"
}
}
3.4 DST
GET
URL POST /API/SystemConfig/DST/Get
Description Get System DST Information
Request Body none
Successful Response DST information JSON (show as follow Table-3.4)
SET
URL POST /API/SystemConfig/DST/Set
Description Get System DST Information
Request Body DST information JSON (show as follow Table-3.4)
Successful Response The successful result response that described in 2.5
Example:
Request message:
POST /API/SystemConfig/DST/Get HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"version": "1.0",
“result”:”success”,
“data”:{
"dst_enable": false,
"time_offset": 1,
"dst_mode": "Week",
"start_month": "Mar",
"end_month": "Nov",
"start_week": "The 2nd",
"end_week": "The 1st",
"start_weekday": "Sun",
"end_weekday": "Sun",
"start_date": "01/01/2010",
"end_date": "01/01/2010",
"start_hour": "02:00:00",
"end_hour": "02:00:00"
22
}
}
SET
URL POST/API/SystemConfig/Output/Set
Description SetSystem OutputInformation
Request Body Output information JSON (show as follow Table-3.5.1)
Successful Response The successful result response that described in 2.5
23
3.6 User
GET
URL POST /API/SystemConfig/User/Get
Description Get SystemUser Information
Request Body User information JSON (show as follow Table-3.6.x)
Successful Response User information JSON (show as follow Table-3.6.1)
SET
URL POST /API/SystemConfig/User/Set
Description Set SystemUser Information
Request Body User information JSON (show as follow Table-3.6.1)
Successful Response The successful result response that described in 2.5
Note: The api is divided into the acquisition and setting of permissions and the acquisition and
setting of user passwords. It is reflected in the type field.
Administrators can use user_ Level obtains the authority and user password information of
ordinary users, and can modify the user name, password, authority and other parameters of all users.
Ordinary users can only obtain their own user password information.
Table-3.6.x (User information JSON)
KEY VALUE COMMENT
RANGE TYPE
user_level "ADMIN" It is only required when the administrator
"USER1" gets user permissions, but not for other
"USER2" string scenarios
…
"USER6"
“SavePassword” Save the user name and password, save the
“SavePermission” permission, and pass the parameter when
type “SaveTime”(A01) string obtaining the permission. Not required for
“GetPermission”, other scenarios
“LockUser”(A01)
User name search filtering function, used
support_user_filter bool when the number of system channels is
greater than or equal to 256
Example:
Scenario 1: admin obtains user parameters
Request message:
POST/API/SystemConfig/User/Get HTTP/1.1
{
"version": "1.0",
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
27
"result":"success",
"data":{
"user_info":{
"ADMIN":{
"user_enable":true,
"username":"admin",
"password_empty":false
},
"USER1":{
"user_enable":true,
"username":"user1",
"password_empty":false
},
"USER2":{
"user_enable":false,
"username":"user2",
"password_empty":true
},
"USER3":{
"user_enable":false,
"username":"user3",
"password_empty":true
},
"USER4":{
"user_enable":false,
"username":"user4"
},
"USER5":{
"user_enable":false,
"username":"user5",
"password_empty":true
},
"USER6":{
"user_enable":true,
"username":"liuyong",
"password_empty":false
}
}
}
}
28
{
"version": "1.0",
"data": {
"user_info": {
"USER2": {
"user_enable": true,
"username": "user2",
"password_empty": true,
"password": "111111",
"confirm_password": "111111"
}
},
"type": "SavePassword",
"secondary_authentication": "admin123.."
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{"result":"success","data":{}}
29
],
"live_enable": true,
"live_channel": [
"CH1",
"CH2",
"CH3",
"CH4",
"CH5",
"CH6",
"CH7",
"CH8"
],
"playback_enable": false,
"playback_channel": [
],
"ptz_enable": true,
"ptz_channel": [
"CH1",
"CH2",
"CH3",
"CH4",
"CH5",
"CH6",
"CH7",
"CH8"
]
}
}
},
"secondary_authentication": "admin123..",
"type": "SavePermission"
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{"result":"success","data":{}}
GET
30
URL POST/API/SystemInfo/Base/Get
Description Get System Base Information,Including software version date, network,
video format, hard disk capacity, etc
Request Body None
Successful Response System Information JSON(show as follow Table-3.7)
Please note that the following products will integrate the web and client ports. The client port will not be
opened and this item will be removed from the page in the future. If the customer does development docking,
please do not consider this port again
32
Table-3.9.1 (Channel Information JSON)
KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info Json Object
follow Table-3.9.2
channel_max int Max channel
33
Successful Response Network state Information JSON(show as follow Table-3.10.1)
34
client string "Internal port number, external port
rtsp string number, port UPnP function status,
string port UPnP function enabled"
https {ExportState:” Active”,” Inactive”}
{Upnp:” Enable”,” Disable”}
35
poe_subnet_mask string POE subnet mask,such as:255.255.255.0
Please note that the following products will integrate the web and client ports. The client port will not be
opened and this item will be removed from the page in the future. If the customer does development docking,
please do not consider this port again
Example:
Request message:
POST /API/SystemInfo/Network/Get HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
{
"result":"success",
"data":{
"wan":{
"dhcp":"Disable",
"ip_address":"172.16.10.159",
"subnet_mask":"255.255.0.0",
"gateway":"172.16.8.1",
"mac_address":"22-11-33-41-15-66",
"ipv6_address":"2000:0:0:0:0:0:0:1 / 128",
"ipv6_gateway":"2000:0:0:0:0:0:0:1",
"dns1":"172.18.1.222",
"dns2":"8.8.8.8"
},
"port":{
"web":"80,80,Inactive,Disable",
"client":"9000,9000,Inactive,Disable",
"https":"443,443,Inactive,Disable"
},
"bandwidth":{
"total_bandwidth":"172032Kbps",
"used_bandwidth":"41856Kbps"
}
}
}
4 NETWORK
4.1 Network Configuration
36
4.1.1 Network Base Information
GET
URL POST/API/NetworkConfig/NetBase/Get
Description It is used to get the device network interfaces
Request Body none
Successful Response Network base info JSON( show as follow Table-4.1.1.1)
SET
URL POST/API/NetworkConfig/NetBase/Set
Description It is used to set the device network interfaces
Request Body Network base info JSON( show as follow Table-4.1.1.1 )
Successful Response The successful result response that described in 2.5
The number of
channels depends on
37
the capabilities of
the device.
lan1 JSON Object Single JSON(show as follow Table-4.1.1.8 )
(used in the new network card mode)
lan2 JSON Object Single JSON(show as follow Table-4.1.1.9 )
(used in the new network card mode)
poe JSON Object Single JSON(show as follow Table-4.1.1.10 )
(used in the new network card mode)
net_card_mode "Single Address string array Net card mode
Mode" ,"Double
Address Mode"
default_route "WAN" string array Default route(used in the new network card mode)
" LAN1", "LAN2"
net_car_select "WAN" string array Net card selection(used in the new network card
"LAN1", "LAN2" mode)
pppoe_net_card "LAN1", "LAN2" string array PPPOE network card selection (used in new network
card mode)
Preferred DNS server, for example: 8.8.8.8
dns1 string
(dedicated for new network card mode)
Standby DNS server, for example: 8.8.8.8 (dedicated
dns2 string
for new network card mode)
38
ess 239.255.255.255)
Dhcp enable switch, DHCP switch is not enabled
dhcp_enable bool
after PPPOE is turned on (NVR only)
The url format of the rtsp server (for NVR and
rtsp_url string
DVR only)
encryption bool Video encryption
39
Table-4.1.1.6 (WIFI info JSON)
KEY VALUE COMMENT
RANGE TYPE
enable bool WIFI switch
ssid Max length: 35 byte string WIFISSID
password Max length: 35 byte string WIFI password
IP address obtained by connecting to WIFI
ip_address string
(Get only)
"Unconnected", WIFI connection status
status string
"Connected" (Get only)
base_enc_password Json Object Encrypted Password, Table-12.7.2.3
Example:
Request message:
POST /API/NetworkConfig/NetBase/Get HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
{
"version": "1.0",
“result”:”success”,
“data”:{
"wan": {
"dhcp": false,
"ip_address": "192.168.1.108",
"subnet_mask": "255.255.000.000",
"gateway": "172.018.000.001",
"dns1": "192.168.000.001",
"dns2": "008.008.008.008",
“dhcp_enable”:false
},
"lan": {
"ip_address": "010.010.025.100",
"subnet_mask": "255.255.000.000"
},
41
"pppoe": {
"enable": false,
"user": "",
"password": ""
},
"3g": {
"enable ": false,
"apn": "3gnet",
"dial_code": "*99#",
"user": "card",
"password": "card"
},
"wifi": {
"enable": false,
"ssid": "",
"password": ""
},
"port": [
{
"service": "Web",
"protocol": "TCP",
"internal_port": 80,
"external_port": 80,
"upnp_status": "Inactive",
"upnp": false
},
{
"service": "Client",
"protocol": "TCP",
"internal_port": 9000,
"external_port": 9000,
"upnp_status": "Inactive",
"upnp": false
},
{
"service": "Rtsp",
"protocol": "TCP",
"internal_port": 554,
"external_port": 554,
"upnp_status": "Inactive",
"upnp": false
},
{
"service": "Https",
42
"protocol": "TCP",
"internal_port": 443,
"external_port": 443,
"upnp_status": "Inactive",
"upnp": false
}
],
"p2p_switch": true,
"toe": false
}
}
4.1.2 WLANScan
GET
URL POST/API/NetworkConfig/ScanWlan/Scan
Description It is used to get the Wifilist.
Request Body none
Successful Response Wlan Scan JSON( show as follow Table-4.1.2.1 )
SET
URL POST/API/NetworkConfig/ScanWlan/Join
Description It is used to addwifi.
Request Body WIFI JSON( show as follow Table-4.1.2.2 )
Successful Response The successful result response that described in 2.5
SET
URL POST/API/APNetworkCfg/WifiStaParam/Set
Description Wifi AP Network configuration
Request Body STA Parameter info JSON( show as follow Table-4.1.2.3 )
Successful Response The successful result response that described in 2.5
Note: This API interface can only be registered and enabled in AP
mode
Table-4.1.2.1(Wlan ScanJSON)
KEY VALUE COMMENT
RANGE TYPE
wifi_info JSON array JSON(show as follow Table-4.1.2.2 )
Table-4.1.2.2(WIFIJSON)
KEY VALUE COMMENT
RANGE TYPE
43
ssid Max length: 35 byte string WIFI SSID
Wifi Signal Strength
signal_strength 0-4 int
Note: only use to ScanWlan
WIFI encryption type
security Max length: 128 byte string
Note:only use to ScanWlan
WIFI password
password Max length: 35 byte string
Note:only use to JoinWlan
base_enc_password Json Object Encrypted Password, Table-12.7.2.3
Example:
Request message:
POST/API/NetworkConfig/ScanWlan/Scan HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
“result”:”success”,
“data”:{
"wifi_info": [
{
"ssid": "xxxxxxxxxxxxx",
"signal_strength":4,
44
"security":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
……
]
}
}
Request message:
POST/API/NetworkConfig/ScanWlan/Join HTTP/1.1
{
"version": "1.0",
“data”:{
"ssid": "xxxxxxxxxxxxx",
"password":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 250
Connection: keep-alive
{
"version": "1.0",
"result": "success"
}
4.2 DDNS
GET
URL POST/API/NetworkConfig/DDNS/Get
Description It is used to get the DDNS parameters
Request Body none
Successful Response DDNS info JSON( show as follow Table-4.2.1 )
SET
URL POST/API/NetworkConfig/DDNS/Set
Description It is used to set the DDNS parameters
45
Request Body DDNS info JSON( show as follow Table-4.2.1 )
Successful Response The successful result response that described in 2.5
SET
URL POST/API/NetworkConfig/DDNS/Test
Description It is used to set the DDNS parameters
Request Body DDNS info JSON( show as follow Table-4.2.1 )
Successful Response The successful result response that described in 2.5 and 2.9
Example:
Request message:
POST/API/NetworkConfig/DDNS/Get HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 123
46
Connection: keep-alive
{
"version": "1.0",
“result”:”success”,
“data”:{
"ddns_enable": false,
"server": "NO_IP",
"domain": "",
"user": "",
"password": ""
}
}
4.3 Email
GET
URL POST/API/NetworkConfig/Email/Get
Description It is used to get the Email parameters
Request Body none
Successful Response Emailinfo JSON( show as follow Table-4.3.1.1 )
SET
URL POST/API/NetworkConfig/Email/Set
Description It is used to set the Email parameters
Request Body Emailinfo JSON( show as follow Table-4.3.1 .1)
Successful Response The successful result response that described in 2.5
Table-4.3.1.1(Emailinfo JSON)
KEY VALUE COMMENT
RANGE TYPE
email_enable bool Enable email
"Disable", Encryption type
"SSL",
encryption string
"TLS",
"Auto"
smtp_port [1~65535] int SMTP port
smtp_server Max length: 127byte string SMTP server
47
username User name for mail
password Mail password
sender Sender’s address
recvemail recvemail JSON( show as follow Table-4.3.1 .2)
password_empty bool Password if empty
interval_time 1,3,5,10 int Sending interval time. Unit: minute
base_enc_password Json Object Encrypted Password, Table-12.7.2.3
Table-4.3.1.2(recvemail JSON)
recvemail_1 Max length: 127 byte String sender1 address
recvemail_2 Max length: 127 byte String sender2 address
recvemail_3 Max length: 127 byte string Sender3 address
Example:
Request message:
POST /API/NetworkConfig/Email/Get HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 165
Connection: keep-alive
{
"version": "1.0",
“result”:”success”,
“data”:{
"email_enable": false,
"encryption": "AUTO",
"smtp_port": 25,
"smtp_server": "",
"username": "",
"password": "",
"sender": "",
"recvemail_1": "",
"recvemail_2": "",
"recvemail_3": "",
"interval_time": 3
}
}
48
4.3.2 Email Test
GET
URL POST/API/NetworkConfig/Email/Test
Description It is used to test email
Request Body ( show as follow Table-4.3.2.1)
Successful Response Emailinfo JSON( show as follow Table-4.3.2.2)
Table-4.3.2.1(Emailinfo JSON)
KEY VALUE COMMENT
RANGE TYPE
email_enable bool Mail enable
"Disable", Encryption type
"SSL",
encryption string
"TLS",
"AUTO"
smtp_port [1~65535] int SMTP port
smtp_server Max length: 127 byte string SMTP server
username Mail user name
password Mail password
password_empty bool Password if empty
sender Sender address
recvemail JSON( show as follow Table-4.3.2.3)
interval_time 1,3,5,10 int Sending interval time. Unit: minute
test_id 1-65535 int test id
"Start"、"Stop"、 Mail test instructions (start test, stop test, get test results)
email_test_flag string
"Query”
base_enc_passw Json Encrypted Password, Table-12.7.2.3
ord Object
Table-4.3.2.2(Emailinfo JSON)
KEY VALUE COMMENT
RANGE TYPE
"Testing"(testing) Mail test status (if test fails, an error will be returned
test_state string
"Ok"(test finish) directly)
Table-4.3.2.3(Emailinfo JSON)
recvemail_1 Email addresses of 3 receivers
recvemail_2
recvemail_3
Example:
Request message:
49
POST /API/NetworkConfig/Email/Test HTTP/1.1
{
"data": {
"email_enable": false,
"encryption": "AUTO",
"smtp_port": 25,
"smtp_server": "smtp163.com",
"username": "[email protected] ",
"password": "321",
"sender": "[email protected]",
"recvemail_1": "[email protected] ",
"recvemail_2": "",
"recvemail_3": "",
"interval_time": 3,
"test_id": 3,
"email_test_Flag":"start"
}
}
Response message:
{
"result": "success",
"data": {}
}
4.4 FTP
GET
URL POST/API/NetworkConfig/Ftp/Get
Description It is used to get the FTP parameters
Request Body none
Successful Response FTPinfo JSON( show as follow Table-4.4.1 )
SET
URL POST/API/NetworkConfig/Ftp/Set
Description It is used to set the FTP parameters
Request Body FTP info JSON( show as follow Table-4.4.1 )
Successful Response The successful result response that described in 2.5
50
TEST
URL POST/API/NetworkConfig/Ftp/Test
Description It is used to Test the FTP parameters
Request Body FTP info JSON( show as follow Table-4.4.1 )
Successful Response The successful result response that described in 2.5
Table-4.4.1(FTPInfo JSON)
KEY VALUE COMMENT
RANGE TYPE
ftp_enable bool FTP switch
ftp_test bool If support FTP test
Max length: 64 byte FTP IP address
server_ip Note:DVR maximum input string
characters 15
port [1~65535] int FTPServer Port
Max length: 64 byte Login user name
username Note:DVR maximum input string
characters 15
Max length: 64 byte Login user password
password Note:DVR maximum input string
characters 15
password_empty bool Password if empty
upgrade_picture bool Upgrade picture switch
"1920x1080", Picture resolution (for NVR
"1280x720", only)
"1024x768",
picture_resolution string
"640x480",
"320x240",
"176x144" or "176x120"
"Highest", Picture quality (for NVR only)
"Higher",
"Medium",
picture_quality string
"Low",
"Lower",
"Lowest"
video_stream_type "Mainstream","Substream" string Video stream type
video_type "RF","AVI","MP4" string Video file type
10,20,30,45,60 Maximum subcontracting
max_package_interval int interval
. Unit: minute
directory_name Max length: 95byte string Upload path
51
Upload videoinformation
upload_normal_video JSON array JSON(show as follow
Table-4.4.2 )
"FTP", FTP type
enc_mode "SFTP", string
"FTPS",
certpem string certificate
certpwd string secret key
privatekey string Private certificate
privatekeypwd string Private secret key
base_enc_password Json Object Encrypted Password, Table-
12.7.2.3
Example:
Request message:
POST /API/NetworkConfig/Ftp/GetHTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 165
Connection: keep-alive
{
"version": "1.0",
“result”:”success”,
“data”:{
52
"ftp_enable": false,
"server_ip": "192.168.1.100"",
"port": 21,
"username": "",
"password_empty": "",
"picture_resolution": "1280x720",
"picture_quality": "Higher",
"video_stream_type": "SubStream",
"max_package_interval": 30,
"directory_name": "",
"upload_normal_video": {
"enable": true,
"channel": [
"IP_CH2",
"IP_CH3",
"IP_CH4"
]
}
}
}
SET
URL POST/API/NetworkConfig/IPFilter/Set
Description It is used to set the IP Filter Parameters
Request Body IP Filter JSON( show as follow Table-4.5.1 )
Successful Response The successful result response that described in 2.5
Table-4.5.2(Single JSON)
KEY VALUE COMMENT
RANGE TYPE
Max length: 16byte、 Start filtering IP address
start_address string
64byte(NVR/DVR usage)
Max length: 16byte、 End filtering IP address
end_address string
64byte(NVR/DVR usage)
ip_type "Ipv4","Ipv6" string IP type (IPC only supports: "Ipv4")
Table-4.5.3(Error Code)
error_code commet
The blacklist/whitelist list is
ip_filter_list_empty
empty
Example:
Request message:
POST /API/NetworkConfig/IPFilter/GetHTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 250
Connection: keep-alive
{
"version": "1.0",
“result”:”success”,
“data”:{
"enable": true,
"choose": "Whitelist",
"restricted_type": "Blacklist",
"whitelist": [
{
"start_address": "192.168.1.100",
"end_address": "192.168.1.100",
"ip_type": "Ipv4"
}
54
],
"blacklist": [
{
"start_address": "192.168.1.106",
"end_address": "192.168.1.106",
"ip_type": "Ipv4"
}
]
}
}
SET
URL POST/API/NetworkConfig/https/Set
Description It is used to set the https Parameters
Request Body JSON( show as follow Table-4.6.1 )
Successful Response The successful result response that described in 2.5
Table-4.6.1
KEY VALUE COMMENT
RANGE TYPE
https_enable true false bool Don’t use
“Install”“Uninstall”
operate
“Switch”
Default: default install
"Default",
file_type string Custom: custom install
"Custom"
Transfer on switching
0: does not exist, 1: exists
file_exist int
(only get used, set not, Custom required)
ca_file 0-10240 string (only set used, get not)
key_file 0-10240 string (only set used, get not)
key_password 0-128 string (only set used, get not)
root_ca_file 0-10240 string (only set used, get not)
subject string Issued to (required by Custom)
issuer string Issued to (required by Custom)
55
not_before string Start time (required by Custom)
not_after string End time (required by Custom)
error_code
install_failed Install fail
uninstall_failed Uninstall fail
uninstall_not_allow In use, uninstallation is not allowed
switch_failed Switch fail
upload_failed Upload fail
upload_success Upload success
length_too_long Length too long
unsafe_siganature Unsafe signature
cert_key_not_match certificate key not match
invalid_cert_time Invalid certificate time
invalid_private_key Invalid private key
invalid_cert Invalid certificate
invalid_key_usage Invalid key usage
invalid_cert_chain Invalid certificate chain
invalid_cacert Invalid root certificate
invalid_cacert_time Contains an invalid root certificate
Control
URL POST/API/NetworkConfig/VoiceAssistant/Control ((API is not implemented
yet)
Description It is used to control voice assistent
Request Body JSON( show as follow Table-4.7.3 )
Successful Response The successful result response that described in 4.7.4
Table-4.7.1
KEY VALUE COMMENT
RANGE TYPE
type “Amazon”“Google” string
56
Table-4.7.2
KEY VALUE COMMENT
RANGE TYPE
user string User name
“Actived”"Unactived" Active state
state string
"Unconnected"
screen_stream “Mainstream”, “Substream” string Screen cast code stream
Table-4.7.3
KEY VALUE COMMENT
RANGE TYPE
type “Amazon”“Google” string
"Bind""Unbind" Active state
command string
"Apply"
user string
“Mainstream”, Screen cast code stream
screen_stream string
“Substream”
Table-4.7.4
KEY VALUE COMMENT
RANGE TYPE
0: fail
1: success
state int
2: other error, try it later
-1: Network failure
user string
“Mainstream”, Screen cast code stream
screen_stream string
“Substream”
4.8 ipv6
GET
URL POST/API/NetworkConfig/Ipv6/Get(DVR/NVR don’t support)
Description It is used to get theipv6 Parameters
Request Body none
Successful Response JSON( show as follow Table-4.8.1)
Control
URL POST/API/NetworkConfig/ipv6/Set(DVR/NVR don’t support)
Description It is used to setthe ipv6 parameters
Request Body JSON( show as follow Table-4.8.1 )
Successful Response The successful result response that described in 2.5
57
Table-4.8.1
KEY VALUE COMMENT
RANGE TYPE
prefixlen int
local_ipv6_addr Max length: 40byte
global_ipv6_addr Max length: 40byte
4.9 snmp
GET
URL POST/API/NetworkConfig/Snmp/Get
Description It is used to get thesnmpParameters
Request Body none
Successful Response JSON( show as follow Table-4.9.1)
Control
URL POST/API/NetworkConfig/snmp/Set
Description It is used to setthe snmp parameters
Request Body JSON( show as follow Table-4.9.1 )
Successful Response The successful result response that described in 2.5
Table-4.9.1
KEY VALUE COMMENT
RANGE TYPE
snmp_port int
snmp_enable bool false:disable true:enable
trap_port int
"V1", 0:snmp v1 1:snmp v2 2:snmp v1 v2 3:snmp v3
"V2",
snmp_versions String
"V1,V2"
"V3"
trap_ipaddr Max length: 32byte string Management server address
Set the IPC read community name, server to use
read_community Max length: 16byte string the common name and only read the snmp
information on the IPC
Set the IPC read-write community name, server
write_community Max length: 16byte string to use the community name to read and write the
snmp information on the IPC
authentication object json Shown as 4.9.2
base_enc_authentic Json Object Encrypted Password, Table-12.7.2.3
ation_password
58
base_enc_encrypted Json Object Encrypted Password, Table-12.7.2.3
_password
Table-4.9.2
readonly_user object Set to read user Shown as 4.9.3
readwrite_user object Set to read and write user Shown as 4.9.3
Table-4.9.3
KEY VALUE COMMENT
RANGE TYPE
MD5 authentication mode
authentication_type “MD5”, “SHA” string
SHA authentication mode
encrypted_type “CBC-DES” string For encryption algorithm expansion
username Max length: 16byte string
authentication_password Max length: 16byte string
authentication_password Password if empty
bool
_empty
encrypted_password Max length: 16byte string
encrypted_password_em Password if empty
bool
pty
4.10 Rtsp
GET
URL POST/API/NetworkConfig/Rtsp/Get(DVR/NVR don’t suport)
Description It is used to get the rtsp Parameters
Request Body none
Successful Response JSON( show as follow Table-4.10.1)
Control
URL POST/API/NetworkConfig/Rtsp/Set(DVR/NVR don’t support)
Description It is used to setthe rtsp parameters
Request Body JSON( show as follow Table-4.10.1 )
Successful Response The successful result response that described in 2.5
Table-4.10.1
KEY VALUE COMMENT
RANGE TYPE
rtsp_enable bool
rtsp_check_flag bool Checkflag
anonymous_login bool No username or password required
ipeye_enable bool Ipeye enable
59
4.11 Onvif
GET
URL POST/API/NetworkConfig/Onvif/Get
Description It is used to get the Onvif Parameters
Request Body none
Successful Response IP FilterJSON( show as follow Table-4.11.1 )
SET
URL POST/API/NetworkConfig/ Onvif /Set
Description It is used to set the Onvif Parameters
Request Body IP Filter JSON( show as follow Table-4.11.1 )
Successful Response The successful result response that described in 2.5
Table-4.11.1(Onvif JSON)
KEY VALUE COMMENT
RANGE TYPE
enable bool Enable
"Digest_sha256", Encryption method
" Digest ",
authentication " Digest /WSSE", string
"WSSE",
"None"
"HTTP/HTTPS", protocol
protocol "HTTPS", string
"HTTP "
username string User name
password string password
password_empty bool Password if empty
base_enc_password Json Object Encrypted Password, Table-12.7.2.3
4.12 Tuya
GET
URL POST/API/NetworkConfig/Tuya/Get
Description It is used to get the Tuya Parameters
Request Body none
Successful Response JSON( show as follow Table-4.12.1 )
SET
60
URL POST/API/NetworkConfig/Tuya/Set
Description It is used to set the Tuya Parameters
Request Body JSON( show as follow Table-4.12.1 )
Successful Response The successful result response that described in 2.5
Table-4.12.1(Onvif JSON)
KEY VALUE COMMENT
RANGE TYPE
enable bool enable
5 CHANNEL
5.1 Channel Configuration
This item includes broadcast, digital channel configuration, analog channel configuration, protocol management
The digital channel configuration includes multiple scenarios such as automatically adding ipc, manually adding,
5.1.1Broadcast ipc
GET
URL POST/API/ChannelConfig/RemoteDev/Search
Description Search ipc information(Broadcast search ipc)
Request Body None
Successful Response Device Information JSON (show as follow Table-5.1.2)
GET
URL POST/API/ChannelConfig/RemoteDev/Set
Description Set remote ipc parameters (broadcast to modify the ip of ipc)
Request Body Channel Request JSON(show as follow Table-5.1.2)
Successful Response The successful result response that described in 2.5
61
5.1.2 Digital channel
GET
URL POST/API/ChannelConfig/IPChannel/Get
Description Get the ipc channel parameters
Request Body ChannelRequest JSON(show as follow Table-5.1.1)
Successful Response Channel Information JSON (show as follow Table-5.1.3)
SET
URL POST/API/ChannelConfig/IPChannel/Set
Description Set the ipc channel parameters(including adding, deleting and modifying ipc)
Request Body Channel Information JSON(show as follow Table-5.1.3)
Successful Response show as follow Table-5.1.3.2
SET
URL POST /API/ChannelConfig/AutoAddIPC/Set
Description Automatically add IPC on board
Request Body None
Successful Response The successful result response that described in 2.5
62
The number of
channels depends on
the capabilities of the
device.
Channel InformationJSON show as follow
channel_info JSON object
Table-5.1.3.1
63
manufacturer Max length: 35byte string maufacturer
device_type Max length: 35byte string Device type
device_type_flag string The manufacturer's flag indicates that the
third-party IPC can broadcast the protocol
Max length: 32byte search and modify the IP, but the ONVIF
protocol is still required to go online (for
NVR only)
mac_address Max length: 35byte string MAC address
software_version Max length: 40byte string Firmware version
version_flag [0~255] int Version flag
security "Risk","Weak","Medium", string Password security
"Strength"
can_modify_pwd bool Whether password modification is
supported
new_password Max length: 31byte string Change new password
modify_all_chn_pwd bool Whether to modify all channel passwords
network_mode “Dhcp”,”Static” string Network mode
can_set_netmode bool Can I choose network mode
main_url Max length: 120byte string Main stream URL
sub_url Max length: 120byte string Sub stream URL
connect_method string When it is the ONVIF protocol, it is used
"General", to indicate whether to use the normal mode
"Security" or the security mode to connect the front-
end device
base_enc_password Json Object Encrypted Password, Table-12.7.2.3
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
64
"device_info": [
{
"network_mode": "Dhcp",
"ip_address": "3.1.141.230",
"subnet_mask": "000.000.000.000",
"gateway": "000.000.000.000",
"dns1": "000.000.000.000",
"dns2": "000.000.000.000",
"port": 80,
"channel_num": 1,
"protocol": "Onvif",
"manufacturer": "HIKVISION DS-2DC2D20IW-D3",
"device_type": "",
"device_type_flag": "0",
"mac_address": "94-E1-AC-DA-E3-72",
"software_version": "",
"version_flag": 0
},
{
"network_mode": "Dhcp",
"ip_address": "172.16.10.3",
"subnet_mask": "255.255.000.000",
"gateway": "172.016.008.001",
"dns1": "172.018.001.222",
"dns2": "008.008.008.008",
"port": 9000,
"web_port": 80,
"channel_num": 32,
"protocol": "Private",
"manufacturer": "",
"device_type": "N5332N",
"device_type_flag": "5932088458482681345",
"mac_address": "88-2E-42-90-41-18",
"software_version": "V8.1.0-20201015",
"version_flag": 1
},
{
"network_mode": "Dhcp",
"ip_address": "172.16.10.4",
"subnet_mask": "255.255.252.000",
"gateway": "172.016.008.001",
"dns1": "172.018.001.222",
"dns2": "008.008.008.008",
"port": 9000,
65
"web_port": 80,
"channel_num": 8,
"protocol": "Private",
"manufacturer": "",
"device_type": "N5208EN",
"device_type_flag": "5932088458482680320",
"mac_address": "4A-A4-43-BD-26-6D",
"software_version": "V8.1.0-20201018",
"version_flag": 1
},
{
"network_mode": "Dhcp",
"ip_address": "172.16.10.6",
"subnet_mask": "255.255.252.000",
"gateway": "172.016.008.001",
"dns1": "172.018.001.222",
"dns2": "008.008.008.008",
"port": 9000,
"web_port": 80,
"channel_num": 20,
"protocol": "Private",
"manufacturer": "",
"device_type": "#Y-DVR",
"device_type_flag": "5932091774199202304",
"mac_address": "C2-E5-88-F9-49-10",
"software_version": "V8.1.0-20201010",
"version_flag": 1
}
]
}
}
Scenario 2: broadcast and modify the ip of ipc
Request message:
POST /API/ChannelConfig/RemoteDev/Set?2020-10-28@13:30:33 HTTP/1.1
{
"version": "1.0",
"data": {
"device_info": [
{
"network_mode": "Static",
"ip_address": "172.16.10.25",
"subnet_mask": "255.255.252.000",
"gateway": "172.16.8.1",
66
"dns1": "255.255.255.255",
"dns2": "255.255.255.255",
"port": 80,
"channel_num": 0,
"protocol": "Private",
"manufacturer": "",
"device_type": "",
"device_type_flag": "0",
"mac_address": "88:22:29:8C:45:70",
"software_version": "8.1.0.B036",
"version_flag": 1,
"web_port": 80,
"old_ip_address": "172.16.10.24",
"username": "11",
"password": "111"
}
]
}
}
Response message:
HTTP/1.1 200 OK
{
"version": "1.0",
“result”:”success”,
“data”:{
}
}
Scene3:add ipc
Request message:
POST /API/ChannelConfig/IPChannel/Set?2020-10-28@14:09:37 HTTP/1.1
{
"version": "1.0",
"data": {
"channel_info": {
"CH6": {
"ip_address": "172.16.10.87",
"port": 9000,
"protocol": "Private",
"username": "admin",
"password": "11111"
}
},
"operation_type": "AddOrEditChannel"
67
}
}
Response message:
HTTP/1.1 200 OK
{
"version": "1.0",
“result”:”success”,
“data”:{
}
}
GET
URL POST/API/ChannelConfig/ProtocolManage/Get
Description Get theprotocolparameters
Request Body None
Successful Response Channel Information JSON (show as follow Table-5.1.6)
SET
URL POST/API/ChannelConfig/ProtocolManage/Set
Description Set theprotocol parameters
Request Body Channel Information JSON (show as follow Table-5.1.6)
Successful Response The successful result response that described in 2.5
68
Table-5.1.6 (protocolInformation JSON)
KEY VALUE COMMENT
RANGE TYPE
ProtocolInformation JSON show as follow
protocol_info Json Object
Table-5.1.6.1
GET
URL POST/API/ChannelConfig/AnalogChannel/Get
Description Get theanalogconfig
Request Body ChannelRequest JSON(show as follow Table-5.1.1)
Successful Response Channel Information JSON (show as follow Table-5.1.9)
SET
69
URL POST/API/ChannelConfig/AnalogChannel/Set
Description Set the analog config
Request Body Channel Information JSON (show as follow Table-5.1.9)
Successful Response The successful result response that described in 2.5
Table-5.1.11(Error Code)
error_code commet
Exceeded the max number of
Channel_limit
channels in the system
GET
URL POST/API/ChannelConfig/WirelessCamera/Get
Description Get the wireless camera config
Request Body ChannelRequest JSON(show as follow Table-5.1.1)
70
Successful Response Channel Information JSON (show as follow Table-5.1.11)
SET
URL POST/API/ChannelConfig/WirelessCamera/Set
Description Set the wireless camera config
Request Body Channel Information JSON (show as follow Table-5.1.13)
Successful Response The successful result response that described in 2.5
Power value
battery 0-100 int
GET
URL POST/API/ChannelConfig/ChannelConfig/Get
Description Get the channel config
Request Body ChannelRequest JSON(show as follow Table-5.1.6.1)
Successful Response Channel Information JSON (show as follow Table-5.1.6.2)
SET
URL POST/API/ ChannelConfig/ChannelConfig/Set
72
Description Set the channel config
Request Body Channel Information JSON (show as follow Table-5.1.6.2)
Successful Response The successful result response that described in 2.5
5.2 OSD
GET
URL POST/API/ChannelConfig/OSD/Get
Description Get the channel osd parameters
Request Body ChannelRequest JSON(show as follow Table-5.2.1)
Successful Response Channel Information JSON (show as follow Table-5.2.2)
SET
URL POST/API/ChannelConfig/OSD/Set
Description Set the channel osd parameters
Request Body Channel Information JSON (show as follow Table-5.2.2)
Successful Response The successful result response that described in 2.5
74
CH1 Json Object JSON show as follow Table-5.2.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object
75
KEY VALUE COMMENT
RANGE TYPE
show bool Whether the video window displays the date
"MM/DD/YYYY", Date format
date_format "YYYY-MM-DD", string Note: Analog channel is not supported
"DD/MM/YYYY"
Time mode, unit: hour
time_format 24,12 int
Note: Analog channel is not supported
time int Current device time (A01 not used)
Whether the OSD displays the week (A01
show_week bool
only)
pos JSON object Pos JSON show as follow Table-5.2.7
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
"channel_info": {
"CH1": {
"name": {
"show": true,
"text": "Camera",
"pos": {
"x": 199,
76
"y": 293
}
},
"datetime": {
"show": true,
"date_format": "YYYY-MM-DD",
"time_format": 24,
"pos": {
"x": 338,
"y": 258
}
},
"refresh_rate": "60Hz",
"covert": false,
"alpha": 64
},
"CH2": {
"status": "Offline"
},
"CH3": {
"name": {
"show": true,
"text": "fisheye",
"pos": {
"x": 282,
"y": 278
}
},
"datetime": {
"show": true,
"date_format": "YYYY-MM-DD",
"time_format": 24,
"pos": {
"x": 279,
"y": 242
}
},
"refresh_rate": "50Hz",
"covert": false,
"alpha": 58
},
"CH4": {
"status": "Offline"
},
77
"CH5": {
"name": {
"show": true,
"text": "Channel 2",
"pos": {
"x": 150,
"y": 0
}
},
"datetime": {
"show": true,
"date_format": "MM/DD/YYYY",
"time_format": 24,
"pos": {
"x": 309,
"y": 0
}
},
"refresh_rate": "50Hz",
"covert": false,
"alpha": 64
},
"CH6": {
"reason": "Not configured"
},
"CH7": {
"reason": "Not configured"
},
"CH8": {
"reason": "Not configured"
}
}
}
}
SET
78
URL POST/API/ChannelConfig/ImageControl/Set
Description Set the channel image control parameters
Request Body Channel Information JSON (show as follow Table-5.3.2)
Successful Response The successful result response that described in 2.5
DEFAULT
URL POST/API/ChannelConfig/ImageControl/Default
Description Get the channel image control default parameters
Request Body ChannelRequest JSON(show as follow Table-5.3.1)
Successful Response Channel Default Information JSON (show as follow Table-5.3.2)
80
low_beam_light 1-100 int Low beam light(Ir lamp takes effect
in manual mode)
high_beam_light 1-100 int High beam light(Ir lamp takes effect
in manual mode)
mirror_mode "Close", Mirror model
"VerticalMirroring",
string
"HorizontalMirroring",
"All"
corridor_mode “Close”,"Open" string Corridor mode
angle_rotation "0","90","180","270" string Angle rotation
82
dwdr_coefficeient 0-100、1-255 int DWDR coefficient
hlc_strength 1-255 int HLT strength coefficient
blc_level 1-15 Int Backlight compensation intensity
back_light_area "Top","Left","Down","Right"," Backlight compensation area
string
Center"
white_balance "Auto","Manual", White balance Ipc data“Auto”
"AutoTracking","OnePush", “Manual”,"Indoor"
"Indoor","Outdoor",
"FixedSodiumLamp",
string
"FluorescentLamp1",
"FluorescentLamp2",
"IncandescentLamp",
"Sunlight"
red_tuning 0-100、1-255 int Red tuning
83
"AutoMode" IR-CUT mode (non A01
ir_cut_mode "ColorMode", dedicated) see Table-5.3.4.1),
"BlackWhiteMode", string note: no photosensitive IPC
"VideoMode"/"ImageMode" changes VideoMode to
"TimeSchedule" ImageMode.
ir-cut_mode "AutoMode" IR-CUT mode(A01 only)
"ColorMode", string
"BlackWhiteMode",
85
defogging_level 0-100/(1-255) int Defogging level,( IPC:1-255)
elect-img-stabilization “Close”,"Open" elect-img-stabilization (A01
string
only)
denoising "Close","CommonMode", Denoising switch
"ExpertMode"
string
or“Disable”“Auto”,
“Manual”
denoising_level 0-100/(1-255) int Denoising level,( IPC: 1-255)
spatial_denoising_level 0-100 int Spatial denosing level(A01 only)
Temporal_denoising_level 0-100 Temporal denosing level(A01
int
only)
distort_correct “Close”,"Open" string Distort correct
distort_correct_mode "Auto","Manual" string Distort correct mode
distort_correct_level 0-100 int Distort correct level
support_default bool Whether support load default
Be careful:!!!
1. The lower limit of color temperature cannot be greater than the upper limit of color temperature
2. Manual exposure and wide dynamic, strong light suppression, background frequency, backlight compensation are
mutually exclusive
3. In automatic exposure mode: wide dynamic and strong light suppression are mutually exclusive, slow shutter and
wide dynamic, strong light suppression are mutually exclusive
Table-5.3.4.1(ir_cut_mode TimeSchedule )
start_time string Start time
end_time string End time
Table-5.3.4.2(ir_led Manual )
low_beam_light 1-100 int Low beam light
high_beam_light 1-100 int High beam light
SET
URL POST/API/ChannelConfig/Color/Set
Description Set the channel video color parameters
Request Body Channel Information JSON (show as follow Table-5.4.2)
Successful Response The successful result response that described in 2.5
86
DEFAULT
URL POST/API/ChannelConfig/Color/Default
Description Get the channel video color default parameters
Request Body ChannelRequest JSON(show as follow Table-5.4.1)
Successful Response Channel Default Information JSON (show as follow Table-5.4.2)
87
contrast 0-255 int contrast
saturation 0-255 int saturation
sharpness 0-255 int sharpness
support_default bool Whether support load default
SET
URL POST/API/ChannelConfig/VideoCover/Set
Description Set the channel video cover parameters
Request Body Channel Information JSON (show as follow Table-5.5.2)
Successful Response The successful result response that described in 2.5
88
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object
89
KEY VALUE COMMENT
RANGE TYPE
left 0-704(A01 SDK) int X coordinate
top 0-576( A01 SDK) int Y coordinate
width 0-704 int width
height 0-576 int height
5.6 PTZ
GET
URL POST/API/ChannelConfig/PTZ/Get
Description Get the channel PTZparameters
Request Body ChannelRequest JSON(show as follow Table-5.6.1)
Successful Response Channel Information JSON (show as follow Table-5.6.2)
SET
URL POST/API/ChannelConfig/PTZ/Set
Description Get the channel PTZparameters
Request Body Channel Information JSON (show as follow Table-5.6.2)
Successful Response The successful result response that described in 2.5
90
KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-5.6.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object
5.7 ROI
GET
URL POST/API/ChannelConfig/ROI/Get
Description Get the channel ROIparameters
Request Body ChannelRequest JSON(show as follow Table-5.7.1)
Successful Response Channel Information JSON (show as follow Table-5.7.2)
SET
URL POST/API/ChannelConfig/ROI/Set
Description Get the channel ROIparameters
Request Body Channel Information JSON (show as follow Table-5.7.1)
Successful Response The successful result response that described in 2.5
91
Table-5.7.1 (ChannelRequest JSON)
KEY VALUE COMMENT
RANGE TYPE
channel “CH1”…”CH1x” string array Each array bit represents a channel with a
“IP_CH1”…” IP_CH1x” string.
“WIFI_CH1”…” WIFI_CH1x”
92
follow Table
… Json Object
93
top 0-576 int Top
Example:
Request message:
POST /API/ChannelConfig/ROI/Get HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 207
Connection: keep-alive
{
"result": "success",
"data": {
"roi_info": {
"main_stream_info": {
"roi_id": [
{
"roi_zone_no": 1,
"roi_index": 0,
"roi_switch": true,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 2,
"rect": {
"left": 0,
"top": 180,
"width": 360,
"height": 180
}
},
{
"roi_zone_no": 2,
"roi_index": 1,
"roi_switch": false,
"is_abs_qp": 0,
94
"roi_level": 1,
"non_roi_fps": 30,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 3,
"roi_index": 2,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 30,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 4,
"roi_index": 3,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 30,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 5,
"roi_index": 4,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 30,
95
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 6,
"roi_index": 5,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 30,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 7,
"roi_index": 6,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 30,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 8,
"roi_index": 7,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 30,
"rect": {
"left": 0,
96
"top": 0,
"width": 0,
"height": 0
}
}
]
},
"sub_stream_info": {
"roi_id": [
{
"roi_zone_no": 1,
"roi_index": 0,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 2,
"roi_index": 1,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 3,
"roi_index": 2,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
97
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 4,
"roi_index": 3,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 5,
"roi_index": 4,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 6,
"roi_index": 5,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
98
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 7,
"roi_index": 6,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 8,
"roi_index": 7,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
}
]
},
"mobile_stream_info": {
"roi_id": [
{
"roi_zone_no": 1,
"roi_index": 0,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
99
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 2,
"roi_index": 1,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 3,
"roi_index": 2,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 4,
"roi_index": 3,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
100
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 5,
"roi_index": 4,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 6,
"roi_index": 5,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
},
{
"roi_zone_no": 7,
"roi_index": 6,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
101
"height": 0
}
},
{
"roi_zone_no": 8,
"roi_index": 7,
"roi_switch": false,
"is_abs_qp": 0,
"roi_level": 1,
"non_roi_fps": 10,
"rect": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
}
}
]
}
}
}
}
SET
URL POST/API/ChannelConfig/VideoCrop/Set
Description Set the channel video crop parameters
Request Body Channel Information JSON (show as follow Table-5.9.2)
Successful Response The successful result response that described in 2.5
103
Table-5.9.1 (ChannelRequest JSON)
KEY VALUE COMMENT
RANGE TYPE
channel “CH1”…”CH1x” string array Each array bit represents a channel with a string.
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…” WIFI_CH1x”
Table-5.9.4(Zone JSON)
KEY VALUE COMMENT
104
RANGE TYPE
zone_no 1-2 int Zone number
Zone coordinates JSON show as follow Table-
rect JSON object
5.9.5
6 STREAM
6.1 Encode
105
GET
POST/API/StreamConfig/MainStream/Get
POST/API/StreamConfig/SubStream/Get
URL
POST/API/StreamConfig/MobileStream/Get
POST/API/StreamConfig/EventStream/Get
Description Get video channel stream information
Request Body ChannelRequest JSON(show as follow Table-6.1.1)
Successful Response Channel Information JSON (show as follow Table-6.1.2)
SET
POST/API/StreamConfig/MainStream/Set
POST/API/StreamConfig/SubStream/Set
URL
POST/API/StreamConfig/MobileStream/Set
POST/API/StreamConfig/EventStream/Set
Description Set video channel stream information
Request Body Channel Information JSON (show as follow Table-6.1.2)
Successful Response The successful result response that described in 2.5
106
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object
6.2 Capture
GET
URL POST/API/StreamConfig/Capture/Get
Description Get the channel capture parameters
Request Body ChannelRequest JSON(show as follow Table-6.2.1)
Successful Response Channel Information JSON (show as follow Table-6.2.2)
SET
URL POST/API/StreamConfig/Capture/Set
Description Set the channel capture parameters
Request Body Channel Information JSON (show as follow Table-6.2.2)
Successful Response The successful result response that described in 2.5
Error_Code Response Error Information JSON (show as follow Table-6.2.4)
(auto_capture_chn_limit Return information attached to the error code)
111
KEY VALUE COMMENT
RANGE TYPE
channel "CH1"…"CH1x" string array Each array bit represents a channel with a
"IP_CH1"…" IP_CH1x" string.
"WIFI_CH1"…" WIFI_CH1x"
The number of channels depends
on the capabilities of the device.
Example:
Request message:
POST/API/Preview/StreamUrl/Get HTTP/1.1
{
"data": {
"version":"1.0",
"channel":["CH1", "IP_CH1"]
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
"channel_info": [
{
"channel": "CH1",
112
"mainstream_url": "rtsp://172.16.10.169:80/rtsp/streaming?channel=1&subtype=0",
"substream_url": "rtsp://172.16.10.169:80/rtsp/streaming?channel=1&subtype=1"
},
{
"channel": "IP_CH1",
"mainstream_url": "rtsp://172.16.10.169:80/rtsp/streaming?channel=17&subtype=0",
"substream_url": "rtsp://172.16.10.169:80/rtsp/streaming?channel=17&subtype=1",
"mobile_stream_url": "rtsp://172.16.10.169:80/rtsp/streaming?channel=17&subtype=2"
}
]
}
}
7 ALARM
7.1 IO Alarm
GET
URL POST /API/AlarmConfig/IO/Get
Description It is used to get the IO alarm parameters
Request Body ChannelRequest JSON(show as follow Table-7.1.1)
Successful Response Channel Information JSON (show as follow Table-7.1.2)
SET
URL POST /API/AlarmConfig/IO/Set
Description It is used to set the IO alarm parameters
Request Body Channel Information JSON (show as follow Table-7.1.2)
113
KEY VALUE COMMENT
RANGE TYPE
channel_info JSON Object Information JSON show as follow Table-7.1.x
channel_max int Total channels of current device
114
only)
ftp_video_upload bool Channel video FTP upload switch
(NVR/DVR only)
snap_enable bool Snap switch(A01 only)
show_message bool Show Message switch(NVR/DVR
only)
full_screen bool FullScreen switch(NVR/DVR only)
channel “CH1”…”CH1x” array Alarm channel switch
“IP_CH1”…” Channel alarm linkage switch, each value
IP_CH1x” represents a channel switch.
“WIFI_CH1”…”
WIFI_CH1x”
116
… Json Object
WIFI_CH1 Json Object
… Json Object
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm outut time
latch_time string
"60"
record_enable bool Record channel switch
117
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
IP_CH1x”
record_channel array
“WIFI_CH1”…”
WIFI_CH1x”
"Disable"
"Motion"
multiple_switch "PIR_and_Motion" string Motion switch with multiple options
"Person" (A01 not used)
"PIR_and_Person"
GET
URL POST /API/AlarmConfig/PTZLinkage/Get
Description It is used to get the PTZ Linkage alarm parameters
Request Body ChannelRequest JSON(show as follow Table-7.3.1)
Successful Response Channel Information JSON (show as follow Table-7.3.2)
SET
URL POST /API/AlarmConfig/PTZLinkage/Set
Description It is used to set the PTZ Linkage alarm parameters
Request Body Channel Information JSON (show as follow Table-7.3.2)
Successful Response The successful result response that described in 2.5
120
linkage_ptz_point_index 0,1,2,3……255 int The pointing point corresponding to
the channel of the alarm linkage.
Note: The client needs to be
compatible with two methods. The
old method of type string has many
redundant fields, which will cause a
crash. Version 8.2.3 changed to int to
solve the problem. The hexadecimal
string in the structure indicates
whether the option exists by bit, a
total of 256bits. The small end
storage, bit0 represents the None
option, 1-255bit represents the 1-255
digital option, bit 1 represents the
existence, and bit 0 represents the
nonexistence
(example:ptz_info.items.items.items[
{"linkage_ptz_point_index":
"1","linkage_ptz_point_index":
"2"...}]
Change to ptz_info.item.item:
“0000…000”)
ptz_switch bool Alarm linkage group number switch.
(4group)
7.4 Exception
GET
URL POST /API/AlarmConfig/Exception/Get
Description It is used to get theException parameters
Request Body None
Successful Response Exception Information JSON( show as follow Table-7.4.1)
SET
URL POST /API/AlarmConfig/Exception/Set
Description It is used to set the Exception parameters
Request Body Exception Information JSON( show as follow Table-7.4.1)
Successful Response The successful result response that described in 2.5
122
disk_error Json Object JSON show as follow Table-7.4.3
no_space_on_dis JSON show as follow Table-7.4.3
Json Object
k
fan_abnormal Json Object JSON show as follow Table-7.4.3
7.5 PIR
GET
URL POST /API/AlarmConfig/PIR/Get
Description It is used to get the pir config parameters
Request Body See Table -7.5.1
Successful Response Channel Information JSON (show as follow Table-7.5.2)
SET
123
URL POST /API/AlarmConfig /PIR/Set
Description It is used to set the pir parameters
Request Body Channel Information JSON (show as follow Table-7.5.2)
Successful Response Like example
Error_Code Response Error Information JSON (show as follow Table-7.5.4)
(cloud_video_upload_chn_limit Return information attached to the error code)
Exampleshow as follow 2.5
124
WIFI_CH1 Json Object
… Json Object
125
The number of
channels depends
on the capabilities
of the device.
Alarm output latch time,IPC value 5
latch_time "10","20","40","60" string 10 20 30
126
Table-7.5.5(detect_area JSON)
KEY VALUE COMMENT
RANGE TYPE
x 0~704 int Abscissa
y 0~576 int Ordinate
7.6 Flood-light
GET
URL POST /API/AlarmConfig/Deterrence/Get
Description It is used to get the flood light parameters
Request Body ChannelRequest JSON(show as follow Table-7.6.1)
Successful Response Channel Information JSON (show as follow Table-7.6.2)
SET
URL POST /API/AlarmConfig/Deterrence/Set
Description It is used to set the flood light parameters
Request Body Channel Information JSON (show as follow Table-7.6.2)
Successful Response Like example
Default
URL POST /API/AlarmConfig/Deterrence/Default
Description It is used to set the flood light parameters
Request Body Channel Information JSON (show as follow Table-7.6.2)
Successful Response Like example
127
Table-7.6.x
128
The region is divided into row * col blocks, and
each bit describes the value of a block The row
and col of white light are subject to motion.
Region: white light is triggered only when
motion is in this regionBit = 1: motion in this
region_setting 200*8 array block is monitored.
Example:
region_setting [0] = (FF-FF-FF-FF-FF-F0-00-
00-00-00-00):: motion in channel 0 line 0’s 44
blocks is monitored. Line 1’s 44 blocks not
monitored.
mbcol 44 Int The area is divided into row * col block
mbrow 30 Int The area is divided into row * col block
dualtalk_volume 1 - 10 int Intercom volume control.
Red and blue light switch false: close true:
enforcer_light_switch true false bool
open
enforcer_bright_time 5 - 180 int Duration of red and blue lights
Time_schedule JSON show as follow Table-
time_schedule JSON array
7.6.4
Use in the white light night vision mode of the
wireless battery program:,
1:Normal; 2:Full Color;3: Alarm.
" Normal "," Full Has difference with flood_light_mode.
deterrence_mode string
Color "," Alarm " flood_ light_ Mode indicates the way the
white light lights up when the white light is
triggered_ Mod indicates the picture color of
white light in night vision mode
Table-7.6.4(Time_schedule JSON)
KEY VALUE COMMENT
RANGE TYPE
schedule_type “Deterrence” string White led schedule
week JSON array WeekJSON show as follow Table-7.6.5
Table-7.6.5(WeekJSON)
KEY VALUE COMMENT
RANGE TYPE
Sun,Mon,Tue,Wed, Identify the day of the week
day string
Thu,Fri,Sat
0: Close time period Each array bit (int) identifies half an hour.
time array
1: Open this time period
129
7.7 Sound Detection
GET
URL POST /API/AlarmConfig/Intelligent/SoundDetection/Get
Description It is used to get the SoundDetectionconfig parameters
Request Body See Table -7.7.1
Successful Response Channel Information JSON (show as follow Table-7.7.2)
SET
URL POST /API/AlarmConfig/Intelligent/SoundDetection /Set
Description It is used to set theSoundDetection parameters
Request Body Channel Information JSON (show as follow Table-7.7.2)
Successful Response Like example
Error_Code Response Error Information JSON (shown in Table-7.7.6) (return information
accompanied by the cloud_video_upload_chn_limit error code)
support_copy bool Whether the page supports copy (NVR and DVR
only)
Channel Information JSON show as follow
channel_info JSON object
Table-7.7.x
page_type “ChannelConfig”, string It is used to distinguish the data of channel
“AarmConfig” configuration page or alarm configuration page
130
Table-7.7.x (Channel Information JSON)
KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.7.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm output latch time
latch_time string
"60"
record_enable true, false bool Record channel switch
record_channel “CH1”…”CH1x” array Alarm output channel
131
“IP_CH1”…” Channel alarm linkage switch.
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Post recording time
post_recording string
"300"
show_message bool Show Message switch(NVR only)
send_email true, false bool Send Email switch
bool Channel snapshot FTP upload switch
ftp_picture_upload true, false
(NVR only)
bool Channel video FTP upload switch(NVR
ftp_video_upload true, false
only)
picture_to_cloud true, false bool Picture upload switch(NVR only)
video_to_cloud true, false bool Video cloud upload switch(NVR only)
full_screen bool Full Screen switch(NVR only)
Time_schedule JSON show as follow Table-
time_schedule JSON array
7.7.4
File index (0~4294967295, 0 is None, that is,
no audio file is selected). Each file is named as
"index_file name" (1_i will try). When
voice_prompts_index 0~4294967295 int
displayed on the page, "index_" should be
hidden, such as "1_i will try", and only "i will
try" should be displayed
Playback channel, calculated by bit (bit0 is
voice_prompts_select array local, bit1 corresponds to front-end channel 1,
bit2 corresponds to channel 2...)
Time period, 12 time periods cannot have time
voice_prompts_time array
conflicts
Table-7.7.4(Time_schedule JSON)
KEY VALUE COMMENT
RANGE TYPE
schedule_type “SD” string Sound alarm time schedule
week JSON array WeekJSON show as follow Table-7.7.5
Table-7.7.5(WeekJSON)
KEY VALUE COMMENT
RANGE TYPE
Sun,Mon,Tue,Wed, Identify the day of the week
day string
Thu,Fri,Sat
0: Close time period Each array bit (int) identifies half an hour.
time array
1: Open this time period
132
KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH Channel number of cloud video upload function
array
d N_NUM enabled
max_cloud_video_u MAX_CLOUD_VID The maximum number of channels supported for
int
pload_num EO_RECORD_NUM cloud video upload
SET
URL POST /API/AlarmConfig/Intelligent/OcclusionDetection/Set
Description It is used to set theOcclusionDetection parameters
Request Body Channel Information JSON (show as follow Table-7.8.2)
Successful Response Like example
Error_Code Response Error Information JSON (show as follow Table-7.8.4)
(cloud_video_upload_chn_limit Return information attached to the error code)
133
channel_max int Maximum number of channels
Whether the page supports copy (NVR and DVR
support_copy bool
only)
Channel Information JSON show as follow
channel_info JSON Object
Table-7.8.x
page_type “ChannelConfig”, string It is used to distinguish the data of channel
“AarmConfig” configuration page or alarm configuration page
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm latch time
latch_time string
"60"
134
record_enable true, false bool Record channel switch(NVR only)
“CH1”…”CH1x” Alarm output channel(NVR only)
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Post recording latch time(NVR only)
post_recording string
"300"
send_email true, false bool Send Email switch
bool Channel snapshot FTP upload switch
ftp_picture_upload true, false
(NVR only)
bool Channel video FTP upload switch(NVR
ftp_video_upload true, false
only)
picture_to_cloud true, false bool Picture upload switch(NVR only)
video_to_cloud true, false bool Video cloud upload switch(NVR only)
full_screen bool Full Screen switch(NVR only)
"0","10","20","40", Buzzer time(NVR only)
buzzer string
"60"
show_message bool Show Message switch(NVR only)
File index (0~4294967295, 0 is None, that is,
no audio file is selected). Each file is named as
"index_file name" (1_i will try). When
voice_prompts_index 0~4294967295 int
displayed on the page, "index_" should be
hidden, such as "1_i will try", and only "i will
try" should be displayed
Playback channel, calculated by bit (bit0 is
voice_prompts_select array local, bit1 corresponds to front-end channel 1,
bit2 corresponds to channel 2...)
Time period, 12 time periods cannot have time
voice_prompts_time array
conflicts
Table-7.8.4(Error Information JSON)
KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH Channel number of cloud video upload function
array
d N_NUM enabled
max_cloud_video_u MAX_CLOUD_VID The maximum number of channels supported for
int
pload_num EO_RECORD_NUM cloud video upload
135
Request Body See Table -7.9.1
Successful Response Channel Information JSON (show as follow Table-7.9.2)
SET
URL POST /API/AlarmConfig/Intelligent/PID/Set
Description It is used to set thePID parameters
Request Body Channel Information JSON (show as follow Table-7.9.2)
Successful Response Like example
Error_Code Response Error Information JSON (show as follow Table-7.9.7)
(Cloud_video_upload_chn_limit Return information attached to the error
code)
136
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm output time
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Recording delay time
post_recording string
"300"
send_email true, false bool Send Email switch
bool Channel snapshot FTP upload switch
ftp_picture_upload true, false
(NVR only)
bool Channel video FTP upload switch
ftp_video_upload true, false
(NVR only)
picture_to_cloud true, false bool Picture upload switch (for NVR)
Video cloud upload switch (for
video_to_cloud true, false bool
NVR)
full_screen bool FullScreen switch(NVR only)
"0","10","20","40", Buzzer beep time (NVR only)
buzzer string
"60"
137
show_message bool Show Message switch(NVR only)
PID enable switch,false: close
switch true, false bool
true: open
"Off" Detection type, used by intelligent
"Pedestrian" second-generation IPC of humanoid and
detection_type "Vehicle" string vehicular)
"Pedestrian
&Vehicle"
sensitivity 1-4 int detection sensitivity
Whether there will be dashes in preview
0 - No line drawn 1 -
iva_lines bool and playback (used by intelligent
Line drawn
second-generation IPC)
/*Scenario 0 indoor 1 outdoor */(used
scene "Indoor", "Outdoor" string
by intelligent generation IPC)
JSON Single Channel Information JSON show as
rule_info
object follow Table-7.9.4
string Flag supporting channel replication (for NVR
copy_ch "digit""analog""wifi"
and DVR only)
File index (0~4294967295, 0 is None, that is,
no audio file is selected). Each file is named as
"index_file name" (1_i will try). When
voice_prompts_index 0~4294967295 int
displayed on the page, "index_" should be
hidden, such as "1_i will try", and only "i will
try" should be displayed
Playback channel, calculated by bit (bit0 is
voice_prompts_select array local, bit1 corresponds to front-end channel 1,
bit2 corresponds to channel 2...)
Time period, 12 time periods cannot have time
voice_prompts_time array
conflicts
Example:
Request message:
POST /API/AlarmConfig/Intelligent/PID/Get HTTP/1.1
{
"version": "1.0"
"channel":["IP_CH2"]
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
139
"data": {
"channel_info": {
"CH1": {
"status": "Online",
"switch": false,
"sensitivity": 2,
"detection_type": "Off",
"latch_time": "5",
"post_recording": "5",
"alarm_out": [],
"send_email": false,
"record_enable": false,
"rule_info": {
"rule_number1": {
"rule_switch": false,
"rule_type": "A->B",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
},
"rule_number2": {
"rule_switch": false,
"rule_type": "A->B",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
},
"rule_number3": {
"rule_switch": false,
"rule_type": "A->B",
140
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
},
"rule_number4": {
"rule_switch": false,
"rule_type": "A->B",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
}
}
}
}
}
}
SET
URL POST /API/AlarmConfig/Intelligent/LCD/Set
Description It is used to set theLCD parameters
Request Body Channel Information JSON (show as follow Table-7.10.2)
Successful Response Like example
141
Error_Code Response Error Information JSON (show as follow Table-7.10.7)
(cloud_video_upload_chn_limit (response info of error code.)
142
“Local->1”… Alarm output channel
”Local->x”
“IP_CH1->1”… Each array bit represents aalarm output channel
“IP_CH1->2”… with a string.
” IP_CHx->1” Camera:
alarm_out ” IP_CHx->2” array Local->1:enable,no value:disable
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm latching time
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120","3 Post recording time
post_recording string
00"
send_email true, false bool Send Email switch
bool Chapture picture in channel. FTP upload
ftp_picture_upload true, false
switch,(NVR only)
bool Channel recording FTP upload switch,
ftp_video_upload true, false
(NVR only)
picture_to_cloud true, false bool Picture upload switch(NVR only)
Video upload to cloud switch, ( NVR
video_to_cloud true, false bool
only)
full_screen bool FullScreen switch,(NVR only)
"0","10","20","40", Buzzer time(NVR only)
buzzer string
"60"
show_message bool Show Message switch,(NVR only)
swtich,false: close
switch true, false bool
true: open
sensitivity 1-4 int Sensitivity of detection
"Off" Detection type, Pedestrian or Vehicle.
"Pedestrian"
detection_type "Vehicle" string
"Pedestrian
&Vehicle"
0 : no lines In liveview and playback shows lines or
iva_lines int
1: show lines not.
JSON Single Channel Information JSON show as
rule_info
object follow Table-7.10.4
143
string Symbol of supporting channel copy.(NVR、DVR
copy_ch "digit""analog""wifi"
only)
File index(0~4294967295,0 is None,no chosen
voice file.)。Each file is named“index_file name”
(1_i will try),when show in the page, it needs
voice_prompts_index 0~4294967295 int
to hide the “index_”. For example, “1_i will
try”,it will show“i will try” only.
Example:
Request message:
POST /API/AlarmConfig/Intelligent/LCD/Get HTTP/1.1
{
"version": "1.0"
"channel":["IP_CH2"]
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"IP_CH2": {
"status": "Online",
"switch": false,
"sensitivity": 2,
"latch_time": "5",
"post_recording": "10",
"send_email": false,
"record_enable": false,
"alarm_out": [],
"rule_info": {
"rule_number1": {
"rule_switch": false,
"rule_type": "A->B",
"rule_line": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0
}
145
},
"rule_number2": {
"rule_switch": false,
"rule_type": "A->B",
"rule_line": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0
}
},
"rule_number3": {
"rule_switch": false,
"rule_type": "A->B",
"rule_line": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0
}
},
"rule_number4": {
"rule_switch": false,
"rule_type": "A->B",
"rule_line": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0
}
}
}
}
}
}
}
146
Successful Response Channel Information JSON (show as follow Table-7.11.2)
SET
URL POST /API/AlarmConfig/Intelligent/SOD/Set
Description It is used to set theSOD parameters
Request Body Channel Information JSON (show as follow Table-7.11.2)
Successful Response Like example
Error_Code Response Error Information JSON (show as follow Table-7.11.7)
(cloud_video_upload_chn_limit r(esponse info of error code)
147
Table-7.11.3 (Channel Information JSON)
KEY VALUE COMMENT
RANGE TYPE
"Offline","Online", Channel online status, only for IP channel.
status string
“Nonsupport” Note: when channel is online, no such string.
“Local->1”… Alarm output channel
”Local->x”
“IP_CH1->1”… Each array bit represents aalarm output channel
“IP_CH1->2”… with a string.
” IP_CHx->1” Camera:
alarm_out ” IP_CHx->2” array Local->1:enable,no value:disable
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm latching time
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Post recording time
post_recording string
"300"
send_email true, false bool Send Email switch
bool Chapture picture in channel. FTP upload
ftp_picture_upload true, false
switch,(NVR only)
bool Channel recording FTP upload switch,
ftp_video_upload true, false
(NVR only)
picture_to_cloud true, false bool Picture upload switch(NVR only)
Video upload to cloud switch, ( NVR
video_to_cloud true, false bool
only)
full_screen bool FullScreen switch,(NVR only)
"0","10","20","40" Buzzer time(NVR only)
buzzer string
,"60"
show_message bool Show Message switch,(NVR only)
swtich,false: close
switch true, false bool
true: open
sensitivity 1-4、0-100 int Sensitivity of detection
"Default" IntervalMode JSON show as follow Table-
snap_mode string
"RealTimeMode" 7.12.4
148
"IntervalMode"
Example:
Request message:
POST /API/AlarmConfig/Intelligent/SOD/Get HTTP/1.1
{
"version": "1.0"
"channel":["IP_CH2"]
}
150
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH1": {
"status": "Online",
"switch": false,
"sensitivity": 2,
"latch_time": "5",
"post_recording": "10",
"send_email": false,
"record_enable": false,
"alarm_out": [],
"rule_info": {
"rule_number1": {
"rule_switch": false,
"rule_type": "Legacy",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
},
"rule_number2": {
"rule_switch": false,
"rule_type": "Legacy",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
},
151
"rule_number3": {
"rule_switch": false,
"rule_type": "Legacy",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
},
"rule_number4": {
"rule_switch": false,
"rule_type": "Legacy",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
}
}
}
}
}
}
7.12Pedestrian Detection
GET
URL POST /API/AlarmConfig/Intelligent/PD/Get
Description It is used to get the PD config parameters
Request Body See Table -7.12.1
Successful Response Channel Information JSON (show as follow Table-7.12.2)
SET
URL POST /API/AlarmConfig/Intelligent/PD/Set
152
Description It is used to set thePD parameters
Request Body Channel Information JSON (show as follow Table-7.12.2)
Successful Response Like example
Error_Code Response Error Information JSON (show as follow Table-7.12.8)
(cloud_video_upload_chn_limit response info of error code.)
153
"Offline","Online" Channel online status, only for IP channel.
status , string Note: when channel is online, no such string.
“Nonsupport”
“Local->1”… Alarm output channel
”Local->x”
“IP_CH1->1”… Each array bit represents aalarm output
“IP_CH1->2”… channel with a string.
” IP_CHx->1” Camera:
alarm_out ” IP_CHx->2” array Local->1:enable,no value:disable
The number of
channels depends
on the capabilities
of the device.
"10","20","40", Alarm latching time,IPC: 5 10 20 30
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Post recording time,IPC: 0 5 10 20 30
post_recording string
"300"
send_email true, false bool Send Email switch
bool Chapture picture in channel. FTP upload
ftp_picture_upload true, false
switch,(NVR only)
bool Channel recording FTP upload switch,
ftp_video_upload true, false
(NVR only)
picture_to_cloud true, false bool Picture upload switch(NVR only)
Video upload to cloud switch, ( NVR
video_to_cloud true, false bool
only)
full_screen bool FullScreen switch,(NVR only)
"0","10","20","40", Buzzer time(NVR only)
buzzer string
"60"
show_message bool Show Message switch,(NVR only)
swtich,false: close
switch true, false bool
true: open
Identify the normal Human detection or
is_ai_param true, false bool
Intelligent Human detection (NVR only)
“Low” Sensitivity of detection
level “Middle” string
“High”
sensitivity 0-100 int Sensitivity of detection
snap_mode "Default" string Snapshot mode,
154
"RealTimeMode" IntervalMode JSON show as follow Table-
"IntervalMode" 7.12.4
Example:
Request message:
POST /API/AlarmConfig/Intelligent/PD/Get HTTP/1.1
{
"version": "1.0"
"channel":["IP_CH2"]
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"IP_CH2": {
"status": "Online",
"switch": false,
"sensitivity": "High",
"alarm_out": [],
"rule_info": {
"rule_number1": {
156
"rule_switch": true,
"rule_type": "Normal",
"rule_rect": {
"x1": 30,
"y1": 30,
"x2": 30,
"y2": 545,
"x3": 675,
"y3": 545,
"x4": 675,
"y4": 30
}
}
},
"latch_time": "5",
"post_recording": "5",
"send_email": false,
"record_enable": false
}
}
}
}
SET
URL POST /API/AlarmConfig/Intelligent/FD/Set
Description It is used to set theFD parameters
Request Body Channel Information JSON (show as follow Table-7.13.2)
Successful Response Like example
Error_Code Response Error Information JSON (show as follow Table-7.13.10)
(cloud_video_upload_chn_limit response info of error code.)
158
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm latching time Ipc value 5 10 20 30
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Post recording time Ipc value 0 5 10 20 30
post_recording string
"300"
send_email true, false bool Send Email switch
bool Chapture picture in channel. FTP upload
ftp_picture_upload true, false
switch,(NVR only)
bool Channel recording FTP upload switch,
ftp_video_upload true, false
(NVR only)
picture_to_cloud true, false bool Picture upload switch(NVR only)
Video upload to cloud switch, ( NVR
video_to_cloud true, false bool
only)
full_screen bool FullScreen switch,(NVR only)
"0","10","20","40", Buzzer time(NVR only)
buzzer string
"60"
show_message bool Show Message switch,(NVR only)
swtich,false: close
switch true, false bool
true: open
Identify normal AI and deep learning AI
is_ai_param true, false bool
(NVR only)
face_enhance bool face_enhance switch
"StaticMode" Detection mode
detection_mode "MotionMode" string
Example:
Request message:
POST /API/AlarmConfig/Intelligent/FD/Get HTTP/1.1
{
"version": "1.0"
"channel":["IP_CH2"]
}
Response message:
{
"result": "success",
161
"data": {
"channel_info": {
"CH1": {
"status": "Online",
"switch": false,
"alarm_out": [],
"post_recording": "0",
"send_email": false,
"record_enable": false,
"rule_info": {
"rule_number1": {
"rule_switch": true,
"rule_type": "Normal",
"rule_rect": {
"x1": 30,
"y1": 30,
"x2": 30,
"y2": 545,
"x3": 675,
"y3": 545,
"x4": 675,
"y4": 30
}
}
}
}
}
}
}
7.14Cross Counting
GET
URL POST /API/AlarmConfig/Intelligent/CC/Get
Description It is used to get the CC config parameters
Request Body See Table -7.14.1
Successful Response Channel Information JSON (show as follow Table-7.14.2)
SET
URL POST /API/AlarmConfig/Intelligent/CC/Set
Description It is used to set theCC parameters
Request Body Channel Information JSON (show as follow Table-7.14.2)
162
Successful Response Like example
Error_Code Response Error Information JSON (show as follow Table-7.14.7)
(cloud_video_upload_chn_limit response info of error code.)
163
“Local->1”… Alarm output channel
”Local->x”
“IP_CH1->1”… Each array bit represents aalarm output channel
“IP_CH1->2”… with a string.
” IP_CHx->1” Camera:
alarm_out ” IP_CHx->2” array Local->1:enable,no value:disable
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm latching time Ipc value 5 10 20 30
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Post recording time,Ipc value 0 5 10 20
post_recording string
"300" 30
send_email true, false bool Send Email switch
bool Chapture picture in channel. FTP upload
ftp_picture_upload true, false
switch,(NVR only)
bool Channel recording FTP upload switch,
ftp_video_upload true, false
(NVR only)
picture_to_cloud true, false bool Picture upload switch(NVR only)
Video upload to cloud switch, ( NVR
video_to_cloud true, false bool
only)
full_screen bool FullScreen switch,(NVR only)
"0","10","20","40", Buzzer time(NVR only)
buzzer string
"60"
show_message bool Show Message switch(NVR only)
swtich,false: close
switch true, false bool
true: open
sensitivity 1-4 int Sensitivity of detection
0 - No line drawn In liveview and playback shows lines or
iva_lines int
1 - Line drawn not.
voice_prompts int Voice prompts(NVR only)
Object Information JSON show as follow Table-
rule_info
7.14.4
File index(0~4294967295,0 is None,no chosen
voice file.) Each file is named“index_file name”
voice_prompts_index 0~4294967295 int
(1_i will try),when show in the page, it needs
to hide the “index_”. For example, “1_i will
164
try”,it will show“i will try” only.
7.15IntelligentAnalysis
GET
URL POST /API/Intelligent/IntelligentAnalysis/Get
Description getIntelligent Analysis information
Request Body ChannelRequest JSON(show as follow Table-7.15.1)
Successful Response Analysis Information JSON (show as follow Table-7.15.2)
SET
URL POST /API/Intelligent/IntelligentAnalysis/Set
165
Description search and get Intelligent Analysis’ data
Request Body Channel Information JSON (show as follow Table-7.15.2)
Successful Response Analysis data JSON (show as follow Table-7.15.5)
166
PD alarm type JSON show as follow Table-
Pedestrian_Detection Json object
7.15.4 Only used by IPC
CC alarm type JSON show as follow Table-
Cross_Counting Json object
7.15.4Only used by IPC
"Daily report", Report type
"weekly report",
report_type string
"Monthly report",
"Annual report",
"Number of in" Cross type,DVR/NVR need
cross_type string
"Number of out"
search_date 10 string Search date
ai_cross_count bool Identify 1st, 2nd generation of CC
7.16.1 Description
GET
URL POST /API/AlarmConfig/VoicePrompts/Get
Description It is used to get the voice prompt config parameters
Request Body Request JSON(show as follow Table-7.16.2.1)
Successful Response Response Information JSON (show as follow Table-7.16.2.2)
SET
URL POST /API/AlarmConfig/VoicePrompts/Set
Description It is used to operate the voice prompt function
Request Body Request JSON(show as follow Table-7.16.2.4)
7.16.2 Syntax
171
string command :"Upload"、
language convert_mode: "Text"released,
means the text is this language.
"g711a" string
command :" Transform " release,
"aac"
download_mode means to convert the index
"wav"
relative audio format.
"mp4"
json array command :" Play " release, means
to play with which channel. 255
ipc_channel_info
means locally to the responding IPC
channel. Start from 0.
string When control_type is AiPlate, must
use this string, for the
license_plate others no need to use. In
the interface it’s ”License
Plate”
7.16.3 Example
Request message:
POST/API/AlarmConfig/VoicePrompts/Get
{
"data": {
"command": "GetAudioFilesList ",
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
"audio_list": [
"5_13227.mp3", // Each item in the list is divided into two parts by underscores (_). The first part is
a unique serial number assigned by the system to the audio file, and the second part is an audio file name.
"6_9528.mp3",
"7_AlienBoi.mp3"
]
}
}
172
7.16.3.2RequestUploadAudio Files
Request message:
POST/API/AlarmConfig/VoicePrompts/Set
{
"data": {
"command": "UploadAudioFile",
"file_name": "9528.mp3",
"file_data": [0,73,1,68,2,51,3,3,4,0,5,0,6,0,7,0,8,34,9,69,10
,84,11,73,12,84,13,51,14,0,15,0,16,0,17,24,18,0,19,0,20,…]
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": { }
}
Request message:
POST/API/AlarmConfig/VoicePrompts/Set
{
"data": {
"command": "RemoveAudioFile",
"audio_index": 5
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
"audio_list": [
"6_9528.mp3",
"7_AlienBoi.mp3"
]
}
}
173
7.17 Combination Alarm
GET
URL POST /API/AlarmConfig/Combination/Get
Description It is used to get the combination alarm config parameters
Request Body See Table -7.17.1
Successful Response Channel Information JSON (show as follow Table-7.17.2)
SET
URL POST /API/AlarmConfig/Combination/Set
Description It is used to set the combination alarm parameters
Request Body Channel Information JSON (show as follow Table-7.17.2)
Successful Response The successful result response that described in 2.5
174
Table-7.17.4 (Channel Information JSON)
KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital channels.
"Offline","Online",
status string Note: This field does not exist when the channel
“Nonsupport”
is online
enable_alarm "Disable" "Enable" string Combination alarm switch
Combination alarm configure JSON combination
combination_configure Json array
show as follow Table-7.17.5
“Local->1”… Alarm output channel
”Local->x”
“IP_CH1->1”… Each array bit represents aalarm output channel
“IP_CH1->2”… with a string.
” IP_CHx->1” Camera:
alarm_out ” IP_CHx->2” array Local->1:enable,no value:disable
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm output channel
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Post recording time
post_recording string
"300"
send_email true, false bool Send Email switch
full_screen bool FullScreen switch(NVR only)
"0","10","20","40", Buzzer time(NVR only)
buzzer string
"60"
show_message bool Show Message switch,(NVR only)
ftp_picture_upload bool Switch for snapshot upload to FTP
bool Switch for uploading recording to FTP
ftp_video_upload
(NVR/DVR only)
picture_to_cloud bool Switch for loading picture
video_to_cloud bool Switch for loading video (NVR/DVR only)
File index(0~4294967295,0 is None,no chosen
voice file.) Each file is named“index_file name”
voice_prompts_index array (1_i will try),when show in the page, it needs
to hide the “index_”. For example, “1_i will
try”,it will show“i will try” only.
175
Play channel,(bit0: local,bit1: camera ch1,
voice_prompts_select array
bit2: camera ch2…)
Voice prompts time,The 12 time ranges cannot
voice_prompts_time Json array conflict with each other. JSON voice prompts
time show as follow Table-7.17.6
"digit""analog""wif Symbol of supporting channel copy.(NVR、DVR
copy_ch string
i" only)
Example:
Request message:
POST /API/AlarmConfig/Combination/Get HTTP/1.1
{
"version": "1.0",
“data”:{
"page_type": "AlarmConfig",
176
"channel":["CH1"]
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH1": {
"enable_alarm": "Enable",
"combination_configure": [{
"alarm_type": "AT_MOTION",
"alarm_source": "IP Camera",
"support_ipc_io": true
},
{
"alarm_type": "AT_PIR",
"alarm_source": "IP Camera",
"support_ipc_io": true
}
],
"buzzer": "0",
"alarm_out": [],
"latch_time": "10",
"record_enable": true,
"record_channel": ["CH1"],
"post_recording": "30",
"show_message": true,
"send_email": true,
"full_screen": false,
"ftp_picture_upload": true,
"ftp_video_upload": false,
"picture_to_cloud": true,
"video_to_cloud": false,
"voice_prompts_index": [
155,
0,
0,
0,
0,
0,
0,
0,
177
0,
0,
0,
0
],
"voice_prompts_select": [
1,
0,
0,
0
],
"voice_prompts_time": [{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
},
{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
},
{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
},
{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
},
{
178
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
},
{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
},
{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
},
{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
},
{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
},
{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
179
"end_minute": 59,
"end_second": 59
},
{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
},
{
"start_hour": 0,
"start_minute": 0,
"start_second": 0,
"end_hour": 23,
"end_minute": 59,
"end_second": 59
}
]
}
}
}
}
SET
URL POST /API/AlarmConfig/Schedule/Set
Description It is used to set the alarm schedule
Request Body Channel Information JSON (show as follow Table-7.18.2)
Successful Response The successful result response that described in 2.5
181
“CC”
“CD”,
“QD”
“LPD”,
“RSD”
week JSON array WeekJSON show as follow Table-7.18.5
Combination alarm switch for current alarm
switch bool
type (8.2.3 new adding)
Table-7.18.5(WeekJSON)
KEY VALUE COMMENT
RANGE TYPE
“Sun”, “Mon”, “Tue”, Mark the day
day “Wed”, string
“Thu”, “Fri”, “Sat”
0: Close time period Each array bit (int) identifies half an hour.
time array
1: Open time period
Example:
Request message:
POST /API/AlarmConfig/Combination/Get HTTP/1.1
{
"version":"1.0",
“data”:{
"page_type":" FloodLight",
"channel":["CH1"]
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH1": {
"schedule": [
{
"schedule_type": "Motion",
"week": [
{
"day": "Sun",
"time":
[1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1]
182
},
{
"day": "Mon",
"time":
[1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1]
},
{
"day": "Tue",
"time":
[1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1]
},
{
"day": "Wed",
"time":
[1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1]
},
{
"day": "Thu",
"time":
[1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1]
},
{
"day": "Fri",
"time":
[1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1]
},
{
"day": "Sat",
"time":
[1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1]
},
]
}
]
}
}
}
}
183
URL POST/API/ AlarmConfig/SerialTransport/Set
Description Trigger the alarm of external alarm device
Request Body Serial Transport JSON ( show as follow Table-7.19.1 )
Successful Response none
Table-7.19.2(SerialInfoJSON)
KEY VALUE COMMENT
RANGE TYPE
Data type. Use to identify the operation of
data_type int
232/485 alarm device
data_size int Data size
data_buf string get the commend
7.20 IO-AlarmStatus
GET
URL POST/API/ AlarmConfig/IOAlarmStatus/Get
Description Get the local alarm output IO status
Request Body none
Successful Response IO-AlarmStatus JSON( show as follow Table-7.20.1 )
SET
URL POST/API/ AlarmConfig/IOAlarmStatus/Set
Description Set the local alarm output IO status
Request Body IO-AlarmStatus JSON( show as follow Table-7.20.3)
Successful Response none
Table-7.20.1(IO-AlarmStatus JSON)
KEY VALUE COMMENT
RANGE TYPE
IoAlarm_States JSON show as follow Table-
ioalarm_states JSON array
7.20.2
Table-7.20.2(IoAlarm_States JSON)
KEY VALUE COMMENT
RANGE TYPE
ioalarm_states int Statue value of alarm IO port
184
Table-7.20.3(IO-AlarmStatus JSON)
KEY VALUE COMMENT
RANGE TYPE
IoAlarm_Info JSON show as follow Table-
ioalarm_info Json Object
7.20.4
Table-7.20.4(IoAlarm_Info JSON)
KEY VALUE COMMENT
RANGE TYPE
ioalarm_id int IO alarm channel
ioalarm_state int IO alarm status value
7.21 Disarming
GET
URL POST/API/AlarmConfig/Disarming/Get
Description Get disarming status of DVR/NVR
Request Body none
Successful Response Disarming JSON( show as follow Table-7.21.1 )
SET
URL POST/API/ AlarmConfig/Disarming/Set
Description Set disarming status of DVR/NVR
Request Body Disarming JSON( show as follow Table-7.21.1)
Successful Response none
Table-7.21.1(Disarming JSON)
KEY VALUE COMMENT
RANGE TYPE
disarming bool disarming switch
action Json Object Action JSON show as follow Table-7.21.2
“CH1”…x”
disarming_channel “IP_CH1”…x” array disarming channel
“WIFI_CH1”…x”
Single Channel Information JSON show as
channel_info Json Object
follow Table-7.21.3
Table-7.21.2(action JSON)
KEY VALUE COMMENT
RANGE TYPE
buzzer bool buzzer switch
185
alarm_out bool alarm_out switch
show_message bool show_message switch
send_email bool send_email switch
full_screen bool full_screen switch
voice_prompts bool voice_prompts switch
Table-7.21.6(WeekJSON)
KEY VALUE COMMENT
RANGE TYPE
Sun,Mon,Tue,Wed, Mark the date
day string
Thu,Fri,Sat
0: close this time Each array bit (int) identifies half an hour.
time array
1: enable this time
Example:
Request message:
POST /API/AlarmConfig/Disarming/Get HTTP/1.1
{
"data": {}
}
Response message:
186
Success:
{
"result": "success",
"data": {
"disarming": false,
"action": {
"buzzer": false,
"alarm_out": false,
"show_message": false,
"send_email": false,
"full_screen": false,
"voice_prompts": false
},
"disarming_channel": ["CH1", "CH2"],
"channel_info": {
"CH1": {
"disarming_schedule": [{
"schedule_type": "Disarming",
"week": [{
"day": "Sun",
"time": [1, 1, 1, ..., 1, 1, 1]
}, {
"day": "Mon",
"time": [1, 1, 1, ..., 1, 1, 1]
}, {
"day": "Tue",
"time": [1, 1, 1, ..., 1, 1, 1]
}, {
"day": "Wed",
"time": [1, 1, 1, ..., 1, 1, 1]
}, {
"day": "Thu",
"time": [1, 1, 1, ..., 1, 1, 1]
}, {
"day": "Fri",
"time": [1, 1, 1, ..., 1, 1, 1]
}, {
"day": "Sat",
"time": [1, 1, 1, ..., 1, 1, 1]
}]
}]
},
"CH2": {…},
"CH3": {…},
187
"CH4": {…}
}
}
}
}
Get
URL POST/API/AlarmConfig/VoiceAlarm/Get
Description Get the voice alarm info
Request Body none
Successful Response VoiceAlarm JSON( show as follow Table-7.22.2 )
SET
URL POST/API/AlarmConfig/VoiceAlarm/Set
Description Set the voice alarm info
Request Body VoiceAlarm JSON( show as follow Table-7.22.2)
Successful Response The successful result response that described in 2.5
Import
URL POST/API/AlarmConfig/VoiceAlarm/Import
Description add customize audio
Request Body VoiceAlarm JSON( show as follow Table-7.22.6)
Successful Response The successful result response that described in 2.5
Delete
URL POST/API/AlarmConfig/VoiceAlarm/Delete
Description Delete customize audio
Request Body VoiceAlarm JSON( show as follow Table-7.22.7)
Successful Response The successful result response that described in 2.5
Table-7.22.1(VoiceAlarm JSON)
KEY VALUE COMMENT
188
RANGE TYPE
siren_switch bool Siren function switch
siren_time int Siren latching time
siren_value int Siren alarm voice volume
“Alarm1” Siren alarm audio type
“Alarm2”
siren_type “User-defined1” string array
“User-defined2”
“User-defined3”
siren_file_name 0-127 string Siren file name
siren_file 0-256k string show the import audio plug-in file name or not
siren_file_type 0-127 string Siren file type
siren_support_form ".wav" Siren supports file form
string array
at ".pcm"
Table-7.22.2(VoiceAlarm JSON)
KEY VALUE COMMENT
RANGE TYPE
siren_switch bool Siren switch
siren_time 5-180 int Siren latching time
siren_value 1-10 int Siren alarm voice volume
siren_type_content JSON show as follow Table-
siren_type_content Json Object
7.22.3
“Alarm1” Siren alarm audio type
“Alarm2”
siren_type “User-defined1” string array
“User-defined2”
“User-defined3”
siren_file_name 0-127 string Siren file name
Table-7.22.3(siren_type_content JSON)
KEY VALUE COMMENT
RANGE TYPE
delete_button bool delete/import audio button
siren_file_name 0-127 string Siren file name
siren_file 0-256k string show the import audio plug-in file name or not
Table-7.22.6(VoiceAlarm JSON)
KEY VALUE COMMENT
RANGE TYPE
“Alarm1” Siren audio type (“Alarm1”,“Alarm2”
siren_type “Alarm2” string array Are system audio)
“User-defined1”
189
“User-defined2”
“User-defined3”
file_name 0-127 string Alarm file name
file_data 0-256k string Audio file data
siren_file_type 0-127 string Audio file type
Table-7.22.7(VoiceAlarm JSON)
KEY VALUE COMMENT
RANGE TYPE
“Alarm1” Siren audio type (“Alarm1”,“Alarm2”
“Alarm2” Are system audio can’t be deleted)
siren_type “User-defined1” string array
“User-defined2”
“User-defined3”
8 STORAGE
8.1 Disk
8.1.1DiskConfiguration
GET
URL POST/API/StorageConfig/Disk/Get
Description It is used to get the Disk parameters
Request Body none
Successful Response Storage JSON( show as follow Table-8.1.1 )
SET
URL POST/API/StorageConfig/Disk/Set
Description It is used to set the Disk parameters
Request Body Storage JSON( show as follow Table-8.1.1 )
Successful Response The successful result response that described in 2.5
Table-8.1.1.1(StorageJSON)
KEY VALUE COMMENT
RANGE TYPE
disk_info JSON array Disk InformationJSON(show as follow Table-
190
8.1.2 )
"Off", Overwrite type
"Auto",
"1Day",
"3Days",
over_write string
"7Days",
"14Days",
"30Days",
"90Days"
esata_record bool E-SATA record function switch
HDD format type
"AllHddData"
/*format whole HDD*/
hdd_format_type “OnlyHddRecord", string
/*only format the record field*/
"OnlyHddData",
/*only format the general data field*/
8.1.2Disk Control
Control
URL POST/API/StorageConfig/Disk/Control
Description It is used to control the Disk parameters
Request Body Request JSON (show as follow Table-8.1.2.1)
Successful Response The successful result response that described in Table-8.1.2.3
8.1.3Disk Format
SET
193
URL POST/API/StorageConfig/Disk/Format
Description It is used to format disk
Request Body Request JSON( show as follow Table-8.1.3.1 )
Successful Response The successful result response that described in 2.5
GET
URL POST/API/StorageConfig/Disk/Format/Progress
Description It is used to get format percent
Request Body None
Successful Response Disk Format Percent JSON( show as fol low Table-8.1.3.2 )
Table-8.1.3.1(Request JSON)
KEY VALUE COMMENT
RANGE TYPE
base_secondary_aut Json Object Encryption auth,Table-12.7.2.4
hentication
hdd_id int array HDD no.
HDD format type
"AllHddData" /*format whole HDD*/
hdd_format_type string
“OnlyHddRecord", /*only format the record field*/
"OnlyHddData", /*only format the general data field*/
194
Example:
Request message:
POST/API/StorageConfig/Disk/FormatHTTP/1.1
{
"version":"1.0",
“data”:{
"id":1
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 250
Connection: keep-alive
{
"version": "1.0",
"result": "success"
}
SET
URL POST/API/StorageConfig/DiskGroup/Set
Description It is used to set the DiskGroup parameters
Request Body Disk Group JSON( show as follow Table-8.2.1 )
Successful Response The successful result response that described in 2.5
Example:
Request message:
POST/API/StorageConfig/DiskGroup/Get HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 250
Connection: keep-alive
{
"version":"1.0",
“result”:”success”,
“data”: {
"disk_group_info":[
{
"disk_group_type":"Record Disk Group",
"group_array":[
{
"group_num":"Record Disk Group 1",
"channel":[
"CH1",
"IP_CH1",
"IP_CH2"
]
},
{
"group_num":"Record Disk Group 2",
"channel":[
"CH2",
196
"CH3",
"CH4"
]
}
]
}
]
}
}
8.3 Cloud
GET
URL POST/API/StorageConfig/Cloud/Get
Description It is used to get the Cloud parameters
Request Body none
Successful Response CloudJSON( show as follow Table-8.3.1 )
SET
URL POST/API/StorageConfig/Cloud/Set
Description It is used to set the Cloud parameters
Request Body Cloud JSON( show as follow Table-8.3.1 )
Successful Response The successful result response that described in 2.5
CONTROL
URL POST/API/StorageConfig/Cloud/Control
Description It is used to connect the Cloud
Request Body Request Json (show as follow Table-8.3.3)
Successful Response CloudJSON( show as follow Table-8.3.4 )
URL POST/API/action/accesstoken
Description It is used to connect the Cloud
Request Body Request Json (show as follow Table-8.3.0)
Successful Response
Table-8.3.0(CloudJSON)
KEY VALUE COMMENT
RANGE TYPE
After the Dropbox is activated,
accesstoken 1-128 string
token
Table-8.3.1(CloudJSON)
KEY VALUE COMMENT
197
RANGE TYPE
cloud_storage bool Cloud storage function switch
cloud_type "DROPBOX","Google Drive" string Cloud storage type
Cloud storage connection status
"Activated","CloudFull","Unactivated", (DVR/NVR only)
cloud_status string
"NetworkBlocked","Disabled" Note: only support to obtain,
not support to set.
unsigned Total size(DVR/NVR only)
total_size Unit: byte long Note: only support to obtain,
long not support to set.
unsigned Used size(DVR/NVR only)
used_size Unit: Bytes long Note: only support to obtain,
long not support to set.
"Off","Auto","1Day","3Days","7Days", Cloud overwrite time
cloud_over_write string
"14Days","30Days","90Days" (DVR/NVR only)
Video file type
video_type "RF","AVI","MP4" string
(DVR/NVR only)
JSON DriveName JSON(show as
channel_info
array follow Table-8.3.x )
channel_max int Total channels
Table-8.3.2(DriveName JSON)
KEY VALUE COMMENT
RANGE TYPE
channel 0 ~ Maximum channel number string Channel no.
Each channel creates a folder on cloud
storage
folder_name Max length: 63 byte string Note: The folder name must comply
with the file name specification.
Invalid characters are not allowed
Table-8.3.3(Request JSON)
198
KEY VALUE COMMENT
RANGE TYPE
cloud_type "DROPBOX","Google Drive" string Cloud storage type
Table-8.3.4(Url JSON)
KEY VALUE COMMENT
RANGE TYPE
url string Request connect URL
Verify code (for Google Drive cloud
code string
storage)
Example:
Request message:
POST/API/StorageConfig/Cloud/Get HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 250
Connection: keep-alive
{
"version":"1.0",
“result”:”success”,
“data”:{
"cloud_storage":true,
"cloud_type":"DROPBOX",
"cloud_status":"Unactivated",
"total_size":0,
"used_size":0,
"cloud_over_write":"Auto",
"video_type":"MP4",
"drive_names":[
{
"channel":"CH1",
"folder_name":"CH1"
},
{
"channel":"CH2",
"folder_name":"CH2"
},
199
{
"channel":"CH3",
"folder_name":"CH3"
},
……
]
}
}
8.4 Audio
GET
URL POST/API/DeviceConfig/Audio/Get
Description It is used to get the audio Parameters
Request Body ChannelRequest JSON(show as follow Table-8.4.1)
Successful Response JSON( show as follow Table-8.4.2)
Control
URL POST/API/DeviceConfig/Audio/Set
Description It is used to setthe audio parameters
Request Body JSON( show as follow Table-8.4.2 )
Successful Response The successful result response that described in 2.5
Example:
Request message:
POST/API/DeviceConfig/Audio/Get HTTP/1.1
{
"version": "1.0",
"data": {
"channel": ["IP_CH1", "IP_CH2"]
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 244
{
"result": "success",
"data": {
"channel_info": {
"IP_CH1": {
"copy_ch": "digit",
201
"audio_enable": true,
"audio_type": "G711A",
"in_volume": 5,
"out_volume": 4
},
"IP_CH2": {
"audio_enable": true,
"audio_type": "G711A",
"in_volume": 5,
"out_volume": 5
}
}
}
}
8.5 RAID
GET
URL POST/API/ StorageConfig/Raid/Get
Description It is used to get the RAID Parameters
Request Body Raid JSON(show as follow Table-8.5.1)
Successful Response JSON( show as follow Table-8.5.2)
Control
URL POST/API/ StorageConfig/Raid/Set
Description It is used to set the RAID parameters
Request Body JSON( show as follow Table-8.5.2 )
Successful Response The successful result response that described in 2.5
202
Table-8.5.1.1 (disk_info JSON)
KEY VALUE COMMENT
RANGE TYPE
No 1~16 int32 show the HDD no.
Whether the hard drive is in the configurable
enable bool state, that is, it can be selected to serve as a hot
spare drive or rebuild a Raid array
Select the current hard drive to be used as a hot
check bool
spare drive or rebuild a Raid array
id 0~16 int32 HDD id code
disk_model max_length:40 string HDD model
serial_no max_length:20 string HDD serial no.
total_size 2147483647 int32 HDD size,unit: GB
array_name max_length:20 string HDD belongs to which RAID disk
"Normal Disk", It indicates that the hard drive is a common hard
disk_type "HotDisk", "Raid string drive, a hot spare drive, and a RAID drive
Disk"
The button for setting or removing a hot spare
"", "Add HotDisk", drive is displayed. If the value is blank, the
button_type string
"Remove HotDisk" operation is not supported and the button is not
displayed
slot_no max_length:8 string Slot number of the hard disk
Table-8.5.1.2 (raid_infoJSON)
KEY VALUE COMMENT
RANGE TYPE
No int32 show the HDD no.
Select the current hard drive for rebuilding or
check bool
deleting the current Raid array
raid_id 0~16 int32 show the RAID disk no.
raid_name max_length:32 string show the RAID disk no.
"RAID0", "RAID1", RAID type
raid_type "RAID4", "RAID5", string
"RAID0", "RAID10"
total_size 0~ 2147483647 int32 RAID size
"Normal", "Degrade", RAID status "Normal", "Degrade", "Offline"
raid_status string
"Offline"
hot_disk 0~16 int32 RAID hot disk number
sub_disk_list array Set up RAID HDD id
The display operation button for rebuilding the
rebuild_button "", "Rebuild RAID" int32 current RAID drive. If the string is empty, it does
not need to be displayed
203
Information Json Show as follow Table-
task object
8.5.1.2.1.
204
RANGE TYPE
"OneKeyCreate", Build RAID name
"CreateRaid",
"DeleteRaid",
item sring
"AddHotDisk",
"RemoveHotDisk",
"Rebuild"
Table-8.5.2 ( JSON)
KEY VALUE COMMENT
RANGE TYPE
"OneKeyCreate", The command of operation (corresponding to the
"CreateRaid", JSON when the parameter is get, fill and modify
"DeleteRaid", the parameter and send back)
ctrl sring
"AddHotDisk",
"RemoveHotDisk",
"Rebuild"
Example:
Request message:
POST/API/DeviceConfig/Audio/Get HTTP/1.1
{
"version": "1.0",
"data": {
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 244
{
"result": "success",
"data": { {
"disk_info": [{
"No": 0,
"id": 0,
"enable": false,
"check": false,
"slot_no": "HDD1",
"disk_model": "TOSHIBA DT02ABA400VH",
"serial_no": "81P3S3TDSSQH",
205
"total_size": 3726,
"array_name": "RAID5_0",
"disk_type": "Raid Disk",
"button_type": ""
}, {
"No": 1,
"id": 3,
"enable": false,
"check": false,
"slot_no": "HDD4",
"disk_model": "TOSHIBA DT02ABA400VH",
"serial_no": "81P3S3SRSSQH",
"total_size": 3726,
"array_name": "RAID5_0",
"disk_type": "Raid Disk",
"button_type": ""
}, {
"No": 2,
"id": 5,
"enable": false,
"check": false,
"slot_no": "HDD6",
"disk_model": "TOSHIBA DT02ABA400VH",
"serial_no": "81P3S3SDSSQH",
"total_size": 3726,
"array_name": "RAID5_0",
"disk_type": "Raid Disk",
"button_type": ""
}, {
"No": 3,
"id": 6,
"enable": true,
"check": false,
"slot_no": "HDD7",
"disk_model": "TOSHIBA DT01ACA300",
"serial_no": "48HNBW7AS",
"total_size": 2794,
"array_name": "-",
"disk_type": "Normal Disk",
"button_type": "Add HotDisk"
}, {
"No": 4,
"id": 7,
"enable": true,
206
"check": false,
"slot_no": "HDD8",
"disk_model": "TOSHIBA DT01ACA300",
"serial_no": "48HNEM8AS",
"total_size": 2794,
"array_name": "-",
"disk_type": "Normal Disk",
"button_type": "Add HotDisk"
}
],
"raid_info": [{
"raid_name": "RAID5_0",
"No": 0,
"raid_id": 0,
"check": false,
"raid_type": "RAID5",
"total_size": 7630637,
"raid_status": "Degrade",
"sub_disk_list": [0, 3, 5],
"hot_disk": "0",
"task": {
"status": "Rebuild",
"progress": 19
},
"rebuild_button": ""
}
],
"about_raid_info": {
"max_raid_num": 16,
"raid_type": [0, 1, 4, 5, 6, 10],
"hotdisk_type": "Public HotDisk",
"support_rebuild": "Yes"
},
"create_raid": {
"raid_name": "",
"raid_type": "RAID0",
"disk_info": [{
"id": 6,
"serial_no": "48HNBW7AS",
"check": false
}, {
"id": 7,
"serial_no": "48HNEM8AS",
"check": false
207
}
]
}
}
}
}
8.6 Cloud(new)
GET
URL POST/ API/StorageConfig/Server/Get
Description It is used to get the Cloud parameters
Request Body none
Successful Response CloudJSON( show as follow Table-8.6.1 )
SET
URL POST/API/StorageConfig/ Server /Set
Description It is used to set the Cloud parameters
Request Body Cloud JSON( show as follow Table-8.6.1 )
Successful Response The successful result response that described in 2.5
TEST
URL POST/ API/StorageConfig/Server/Test
Description It is used to set the Cloud parameters
Request Body Cloud JSON( show as follow Table-8.6.1 )
Successful Response The successful result response that described in 2.5
CONTROL
URL POST/API/StorageConfig/Cloud/Control
Description It is used to connect the Cloud
Request Body Request Json (show as follow Table-8.6.3)
Successful Response CloudJSON( show as follow Table-8.6.4 )
URL POST/API/action/accesstoken
Description It is used to connect the Cloud
Request Body Request Json (show as follow Table-8.6.0)
Successful Response
Table-8.6.0(CloudJSON)
KEY VALUE COMMENT
RANGE TYPE
208
accesstoken 1-128 string Dropbox activation token
Table-8.6.1(CloudJSON)
KEY VALUE COMMENT
RANGE TYPE
enc_mode "FTP""SFTP""AWS S3""DROPBOX"Google string Server mode(DVR/NVR only)
Drive"
video_stream_ty "Mainstream""Substream" string Video stream tpye(DVR/NVR
pe only)
Table-8.6.3(Request JSON)
KEY VALUE COMMENT
RANGE TYPE
cloud_type "DROPBOX","Google Drive" string Cloud type
Table-8.6.4(Url JSON)
KEY VALUE COMMENT
RANGE TYPE
url string Request connection URL
Verification code (for Google Drive
code string
cloud storage)
Example:
Request message:
POST/API/StorageConfig/Server/Get HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
210
Content-Length: 250
Connection: keep-alive
{
{
"result": "success",
"data": {
"enc_mode": "FTP",
"enc_agreement": "ftp://",
"video_stream_type": "Substream",
"video_type": "RF",
"max_package_interval": 10,
"cloud_over_write": "Auto",
"cloud_status": "Unactivated",
"total_size": "0.00B",
"used_size": "0.00B",
"progress": 0,
"ftp_info": {
"enable": true,
"server_ip": "172.16.8.124",
"port": 21,
"username": "hwy",
"password": "",
"password_empty": false
},
"sftp_info": {
"enable": true,
"server_ip": "172.16.8.12",
"port": 21,
"username": "8888",
"password": "",
"password_empty": false
},
"aws_info": {
"enable": true,
"server_ip": "rsvediobkt.s3.ap-southeast-1.amazonaws.com",
"region": "ap-southeast-1",
"username": "AKIK4RT23BIPRM2",
"password": "",
"password_empty": false
},
"dropbox_info": {"enable": true},
"google_drive_info": {"enable": false}
}
}}
211
9 SCHEDULES
9.1 Schedules
GET
URL POST/API/Schedules/Record/Get
POST/API/Schedules/Capture/Get
POST/API/Schedules/Ftp/Get
POST/API/Schedules/Email/Get
POST/API/Schedules/Intelligent/Get
POST/API/Schedules/Alarm/Get
POST /API/Schedules/AI/Get
Description It is used to get the schedules
Request Body ChannelRequest JSON(show as follow Table-9.1.1)
Successful Response Channel Information JSON (show as follow Table-9.1.2)
SET
URL POST/API/Schedules/Record/Set
POST/API/Schedules/Capture/Set
POST/API/Schedules/Ftp/Set
POST/API/Schedules/Email/Set
POST/API/Schedules/Intelligent/Set
POST/API/Schedules/Alarm/Set
POST /API/Schedules/AI/Set
Description It is used to set the schedules
Request Body Channel Information JSON (show as follow Table-9.1.2)
Successful Response The successful result response that described in 2.5
Table-9.1.4(CategoryJSON)
KEY VALUE COMMENT
RANGE TYPE
Schedule Types Allowed to be Configured
Recording schedule contains type { Normal, Motion,
"Normal", IO, PIR }
"Motion", The capture schedule contains types { Normal, Motion,
"Io", IO, PIR }
"Pir" Ftp schedule contains type { Normal, Motion, IO,
"IntelligentAnalysis", IntelligentAnalysis }
"Exception", Email schedule contains types { Motion, IO,
"Buzzer" Exception, In-Analysis, PIR }
schedule_type “Push” string Alarm schedule contains type { IO, Buzzer }
"PIR and Motion", Intelligent does not have this field
"Pir_Motion_Person" Server plan contains type { "Normal" "Motion" "Io"
"pid""lcd""sod""pvd""f "PIR and
d""cc""sound""od""ad" Motion","Pir_Motion_Person"Motion""pid""lcd""sod"
"cd""qd" "pvd""fd""cc""sound""od" "ad" "cd" "qd" "lpd" "rsd"
"lpd""rsd""face""ai_pvd "face" "ai_pvd" "ai_pid" "ai_lcd" "lpr"}
""ai_pid""ai_lcd""lpr" Note: Depending on device capabilities, actual
schedule types may be less than allowable
configurations
week JSON array WeekJSON show as follow Table-9.1.5
213
show_list Bool Show logic with new schedule table
Table-9.1.5(WeekJSON)
KEY VALUE COMMENT
RANGE TYPE
Sun,Mon,Tue,Wed, identify the day of the week
day string
Thu,Fri,Sat
0: close the time period Each array bit (int) identifies half an hour.
time array
1: Open the time period
10 RECORD
10.1 Record Configuration
GET
URL POST/API/RecordConfig/Get
Description Get the channel record parameters
Request Body ChannelRequest JSON(show as follow Table-10.1.1)
Successful Response Channel Information JSON (show as follow Table-10.1.2)
SET
URL POST/API/RecordConfig/Set
Description Set the channel record parameters
Request Body Channel Information JSON (show as follow Table-10.1.2)
Successful Response The successful result response that described in 2.5
215
depends on the capabilities of
the device.
Search startdate.
start_date string
The date format is MM/DD/YYYY
Search end date.
end_date string
The date format is MM/DD/YYYY
Search start time.
start_time string
The time format is hh:mm:ss
Search end time.
end_time string
The time format is hh:mm:ss
record_type int Video type
stream_mode "Mainstream","Substream" string Stream type (IPC only supports main stream)
smart_region 18 Int array Smart playback filter area, the size is 15*22
AllIntelliRec: 0x1c8,
PEARecord: 0x40,
PEALineRecord: 0x8,
HDRecord: 0x80,
FDRecord: 0x100,
PCCRecord: 0x4000,
216
SmartRecord: 0x80000,//2018.05.30
OcclusionRecord: 0x100000,//occulusion detection
INE_ALL_RECORD: (0x10 | 0x20 | 0x40 | 0x200 |
0x1000 | 0x2000 | 0x4000),
AlarmAssemble: 0x7FFFFFFF,//5.0 Use both
AllRecord: 0xFFFFFFFF,
PicAllRecord: 0x7FFFF
NormalRecord: 0x1, Recording type (for
AlarmRecord: 0x2, NVR only)
MotionRecord: 0x4,
IORecord: 0x8,
PEARecord: 0x10,
PEALineRecord: 0x10,
AVDRecord: 0x20,
OSCRecord: 0x40,
AllIntelliRec: 0x80,
SensorRecord: 0x100,
PEAAreaRecord: 0x200,
OCCRecord: 0x400,//private zone
NetbreakRecord: 0x800,//netbreak
HDRecord: 0x1000, 4096
FDRecord: 0x2000, 8192
record_type int
PCCRecord: 0x4000, 16384
MothionAndIo: 0x8000,
PIRRecord: 0x10000,
SoundRecord: 0x20000,
ManualRecord: 0x40000,
SmartRecord: 0x80000,//2018.05.30
OcclusionRecord: 0x100000,//occulusion detection
PersonRecord: 0x200000
FaceAttribute:0x400000
INE_ALL_RECORD: (0x10 | 0x20 | 0x40 | 0x200 |
0x1000 | 0x2000 | 0x4000),
AlarmAssemble: 0x7FFFFFFF,//5.0 Use both
AllRecord: 0xFFFFFFFF,
PicAllRecord: 0x7FFFF
217
The time format is
hh:mm:ss
Record file end time.
end_time string The time format is
hh:mm:ss
Size int file size, unit byte
record_id 0 - 0xFFFFFFFF unsigned int
disk_event_id 0 - 0xFFFFFFFF unsigned int
Example:
Request message:
POST /API/ Playback/SearchRecord/SearchHTTP/1.1
{
"version":"1.0",
"stream_mode": "Substream",
"channel":["IP_CH1","IP_CH2"],
"start_date":"01/03/2020",
"start_time":"00:00:00",
"end_date":"01/03/2020",
"end_time":"23:59:59",
"record_type":4294967295
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 207
Connection: keep-alive
{
"version": "1.0",
"record":[
[
{
"channel": "IP_CH1",
"stream_mode": "Substream",
"record_type": 1,
"start_date": "06/24/2019",
"start_time": "00:00:01",
"end_date": "06/24/2019",
"end_time": "00:38:17",
"time": 3211264
},
218
……
{
"channel": "IP_CH1",
"stream_mode": "Substream",
"record_type": 3,
"start_date": "06/24/2019",
"start_time": "15:09:31",
"end_date": "06/24/2019",
"end_time": "15:15:55",
"time": 2416640
}
]
]
}
Table-10.3.1
KEY VALUE COMMENT
RANGE TYPE
channel int channel, starting from 1
0: main stream, 1: sub stream type
subtype int
stream
starttime string Play start time
endtime string playback end time
Whether to use local time (this field can be
true: use local time omitted, UTC time is used) (note: currently only
localtime bool
false: use UTC time the backend supports this field, and the frontend
IPC does not support it yet)
Note: When the time entered in the request is UTC time, the response time is also UTC time.
219
GET
URL POST/API/Playback/PlaybacRtspkUrl/Get (only for A01. Not supported for
non-A01)
Description Get playback Rtsp URL
Request Body SearchRequest JSON(show as follow Table-10.3.1.1)
Successful Response Record Information JSON (show as follow Table-10.3.2)
Example:
Request message:
POST /API/ Playback/SearchRecord/SearchHTTP/1.1
{
"version":"1.0",
“data”:{
"stream_mode": "Substream",
"channel":"CH1",
"start_date":"2020-07-09",
"start_time":"00:00:00",
"end_date":"2020-07-09",
"end_time":"23:59:59",
“transport_type”:”tcp”,
“record_type”: 4294967295
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 207
Connection: keep-alive
221
"version": "1.0",
“data”:{
"playback_url ": "rtsp://192.168.1.100:554/rtsp/playback?channel=2&sutbype=0&starttime=2020-
07-03T00:29:37Z&endtime=2020-07-03T15:33:30Z"
}
}
222
10.7.1Syntax
GET
URL POST/API/Playback/Picture/Get
Description Search picture information.
Request Body SearchRequest JSON(show as follow Table-10.7.1)
Successful Response Record Information JSON (show as follow Table-10.7.2)
10.7.2 Parameters
223
Each array bit represents a channel with a string.
Pass the parameter when searching for the first
time. When IE already has a picture information
list, this field does not need to be passed.
When searching for the first time, IE does not
have any pic_info information, so this field is
pic_info string not passed. The board will do a search and return
all the information to IE. And return the data of
the first image to IE
pic_width int
pic_height int
pic_sort int 0: order 1: reverse order
NormalRecord: 0x1, Can be a single search type or a mix of types
MotionRecord: 0x4,
unsigned
record_type IORecord: 0x8,
int
PIRRecord: 0x10000,
ManualRecord: 0x40000
When this parameter is requested, the content of
msg_type string
the field is returned as is.
The client requests a single image in sequence according to the reply image information, the example
is as follows:
Request message:
POST /API/Playback/Picture/Get?2020-10-28@14:19:11 HTTP/1.1
{
"version": "1.0",
"data": {
"pic_info":
"AQAAAwAAAAAGAAAACAAAAAQAAAAAfQAAAAcTDhwKFAAA0IoBAZYAABAAAAAAAAAA"
}
}
Response message:
HTTP/1.1 200 OK
{"version":"1.0","result":"success","data":{"picture":{"channel":"CH5","time":"2020/10/28
14:19:07","image":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wDFAAgGBgcGBQgHBwcJCQgKDBQNDAsLD
BkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEy
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgIJCQkMCwwYDQ0YMiEcITIy
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgC0AUAAwEiAAIRAQ
MRAv/EAaIAAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKCxAAAgEDAwIEAwUFBAQAAAF9
AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3OD "}}}
10.8Playback Page
GET
URL POST /API/Playback/PlaybackPage/Range
Description Get the channel record parameters
Request Body none
Successful Response Channel Information JSON (show as follow Table-10.8.x)
227
Sound bool Sound alarm (for NVR only)
occulusion bool Lens blocking (for NVR only)
Intelligent bool Intelligent analysis (for NVR only)
PID bool AI Perimeter Invasion (for NVR only)
LCD bool AI cross-line detection (for NVR only)
faceAttr bool Face attributes (for NVR only)
SET
URL POST / API/Playback/Tag /Set
Description Add Tag label
Request Body Record Tag JSON (show as follow Table-10.9.4)
Successful Response The successful result response that described in 2.5
228
The number of channels depends on
the capabilities of the device.
Search startdate.
start_date string The date format is MM/DD/YYYY
Example:
Request message:
POST /API/ Playback/Tag/Get HTTP/1.1
{
"version": "1.0",
"data": {
"start_date": "04/14/2021",
"start_time": "00:00:00",
"end_date": "04/14/2021",
"end_time": "23:59:59",
"channel": [
"CH1",
"CH2",
"CH3",
"CH4",
"CH5",
"CH6",
"CH7",
230
"CH8"
],
"Keyword": ""
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"version": "1.0",
"result": "success",
"data": {
"Pre-play": "30s",
"Post-play": "30s",
"all_tag_num": 2,
"all_tag_info": [
{"tag_info": {
"Tag_date": "04/14/2021",
"Tag_time": "09:39:56",
"channel": "CH1",
"chNum": 0,
"label_id": 1,
"record_id": 0,
"Tag_name": "Tag"
}},
{"tag_info": {
"Tag_date": "04/14/2021",
"Tag_time": "09:40:02",
"channel": "CH3",
"chNum": 2,
"label_id": 2,
"record_id": 0,
"Tag_name": "Tag11"
}}
]
}
}
11 MAINTENANCE
11.1 Log
231
GET
URL POST/API/Maintenance/Log/Search
Description Get the system log information
Request Body Request JSON (show as follow Table-11.1.1)
Successful Response Log Information JSON (show as follow Table-11.1.2)
Table-11.1.1(Request JSON)
KEY VALUE COMMENT
RANGE TYPE
start_date The date format is MM/DD/YYYY string Start date of search.
start_time The time format is hh:mm:ss string Start time of search.
end_date The date format is MM/DD/YYYY string Enddate of search.
end_time The time format is hh:mm:ss string Endtime of search.
main_type "System", string log master type
"Operate",
"Alarm",
"Account",
"Record",
"Storage",
"AI",
"All"
channel_max Ipc:1 int Maximum number of channels
232
"Account", 2. Give all logs when
"Record", requested by User (NVR)
"Storage",
"AI",
"All"
ai_main_type "Face Detection" " Human & Vehicle" string AI log main type
System: log subtype
"SystemStartup", 1. 1. Only IPC supports
"Shutdown", subtype query, NVR
"Reboot", does not support this
"SystemMaintain", function
"Update", 2. In order to unify the
"ChangeTime", interface, the NVR reserves
“Ntp” this interface, and the All
"All" subtype is also included in
the query to facilitate future
Operate: expansion.
"RECParameters",
"ScheduleRecord",
"MainstreamSettings",
"NetworkSettings",
"SubstreamSettings"
"EmailSetting",
"DdnsSettings",
"ColorSettings",
sub_type string
"DisplaySettings",
"VideoSettings",
"VideoCover",
"Motion",
"I/O",
"HddSettings",
"PtzSettings",
"SerialPort"
"NtpSettings",
"DstSettings",
"GeneralSetup",
"MultiUser",
"Maintenance",
"AbnormalSettings",
“EmailSchedual”,
"RtspSettings",
“IntelligentSchedual”,
“IpcChannel”
"FtpSettings",
233
"ImageControl",
"MobileStream",
"ProtocolConfigure",
"CaptureSettings",
“CaptureSchedual”
"IntelligentSettings",
"IntelligentSettings2",
"IntelligentSettings3",
"AlarmLinkagePTZ",
"IntelligentSettings4",
"IntelligentSettings5",
"IntelligentSettings6",
"CloudStorage",
"PirAlarmSettings",
"AlarmStream",
“IpcPreviewCtrl”
“IPV6”,
“ProtocolInfo”,
“HttpsSettings”,
"DeterrenceSettings",
"SdSetting",
"OdSetting",
“FtpSchedual ”
"IpFilter",
"AlarmSchedule",
“EmailTest”
“ExportParam”
“ImportParam”
“LoadDefault”
“IpcReboot”
“IpcExport”
“IpcImport”
“IpcLoadDefault”
“IpcUpgrade”
“SearchLog”
"ChannelAdd",
"ChannelDelete",
"Modify",
“IpcSearch”
“PtzControl”
“ManualAlarm”
“BackupLog”
“CrosscountSearch”
“DefaultImgControl”
234
“DefaultColor”
“IpcChannelDelete”
“DisplaySettings”
“MainstreamSettings”
“PlatformSettings”
“ChannelModify”
“AbnormalSettings”
“PosAdd”
“PosDelete”
“PosModify”
“PosSettings”
“SmartHomeSettings”
“VersionSettings”
“SNMPSettings”
"All"
Alarm:
"MotionStart",
"MotionEnd",
"IoAlarmStart",
"IoAlarmEnd",
"VideoLoss",
"PidStart",
"PidEnd",
"LcdStart",
"LcdEnd",
"SodStart",
"SodEnd",
"PirStart",
"PirEnd",
"Pd&VdStart",
"Pd&VdEnd",
"FdStart",
"FdEnd",
"CcStart",
"CcEnd",
"CdStart",
"CdEnd",
"QdStart",
"QdEnd",
"ShellBroken",
"SdStart",
"SdEnd",
235
"OdStart",
"OdEnd"
"All"
Account:
"Login",
"Logout",
"AddUser",
"DeleteUser",
"ModifyUser",
"LockScreen",
"Unlock",
"UsernameError",
"PasswordError",
"All"
Record:
"Schedule Record Start",
"ManualRecordStart",
"RecordStop",
"RecordSearch",
"Playback",
"RecordBackup",
"PictureSearch",
"PicturePlayback",
"PictureBackup"
“ManulCapture”
“InstantPlayback”
"All"
Storage:
"FormatHDD",
"NoSpaceOnDisk",
"DiskError",
"Auto",
"HddPartitionChanged"
“HddSmart”
"All"
AI
Face Detection:
236
"Stranger"
""
"All"
Secure:
“LoginLock”
“PasswordInsecure”
“ReadUserParamFailed”
“ReadFactoryParamFailed”
“SessionBusy”
“UpgradeVerifyFailed”,
“CustomCartExpired”
All:
"All"
The channel associated with
the log
channel string
Note: Depending on the log
type, this field is optional
Is there a video
record bool Note: Depending on the log
type, this field is optional
"operate_success",
"no_permission",
"lack_of_resource",
"network_error",
"exception_error",
"operate_failed",
result_code "file_error", string
"memory_not_enough",
"parameter_error",
"para_check_error",
"write_flash_error",
"no_hdd",
"auth_failed",
237
"no_support",
"unknown_error",
"no_udisk",
"no_upgrade_package",
"soft_is_new",
"software_packet_error",
"language_version_error",
"file_name_too_long",
"update_failed",
"event_coverd",
"backup_search_dir_too_long",
"backup_no_support_mjpeg",
"connect_close",
"file_invalid",
"sapce_shortage",
"data_error",
"user_not_exist",
"first_login",
"weak_password",
"time_abnormal",
"passwd_expired",
"version_incompatible",
"in_userinterface",
"in_upgrading",
"user_locked",
"part_success"
OPRATE
URL POST /API/Maintenance/Reset/Set
Description Restore system default parameters
Request Body Request JSON (show as follow Table-11.2.1)
Successful Response The successful result response that described in 2.5
Table-11.2.1(Request JSON)
KEY VALUE COMMENT
RANGE TYPE
channel bool Restore channel related parameters
record bool Restore record related parameters
alarm bool Restore alarm related parameters
ai bool Restore ai related parameters
network bool Restore network related parameters
device bool Restore device related parameters
system bool Restore system related parameters
system_maintain bool Restore systemmaintain related parameters (for A01
only)
attendance bool Restore attendance related parameters (for A01 only)
secondary_authentic Max length: 16 byte string Verify the admin user password for secondary
ation authentication
intelligent bool Restore intelligent related parameters
except_network_par bool
am
base_secondary_aut Json Encryption auth,Table-12.7.2.4
hentication Object
SET
URL POST /API/Maintenance/AutoReboot/Set
Description Set NTP information
Request Body Auto Reboot information JSON (show as follow Table-11.3)
Successful Response The successful result response that described in 2.5
240
GET
URL POST /API/Maintenance/FtpUpgrade/Get
Description Get the information of Ftp Upgrade
Request Body none
Successful Response Ftp upgrade response JSON (show as follow Table-14.4.2)
SET
URL POST /API/Maintenance/FtpUpgrade/Set
Description Get the information of Ftp Upgrade
Request Body Ftp upgradeinformation JSON (show as follow Table-14.4.2)
Successful Response The successful result response that described in 2.5
SET
URL POST /API/Maintenance/FtpUpgrade/Check
Description Get the information of Ftp Upgrade
Request Body none
Successful Response Ftp upgrade result JSON (show as follow Table-14.4.3)
SET
URL POST /API/Maintenance/FtpUpgrade/Upgrade
Description Start ftp upgrade
Request Body none
Successful Response The successful result response that described in 2.5
GET
URL POST /API/Maintenance/FtpUpgrade/Progress
Description It is used to download percent
Request Body none
Successful Response Ftp upgrade result JSON (show as follow Table-14.4.4)
Example:
Request message:
POST/API/Maintenance/FtpUpgrade/Range HTTP/1.1
242
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: xx
Connection: keep-alive
{
"result": "success",
"data": {
"ftp_addr": {
"type": "string",
"mode": "rw",
"min_len": 0,
"max_len": 64
},
"ftp_port": {
"type": "int32",
"mode": "rw",
"min": 1,
"max": 65535
},
"username": {
"type": "string",
"mode": "rw",
"min_len": 0,
"max_len": 64
},
"user_pwd": {
"type": "string",
"mode": "rw",
"min_len": 0,
"max_len": 32
},
"user_pwd_empty": {
"type": "bool",
"mode": "rw"
},
"ftp_path": {
"type": "string",
"mode": "rw",
"min_len": 0,
"max_len": 128
},
243
"cur_version": {
"type": "string",
"mode": "rw",
"min_len": 0,
"max_len": 64
},
"new_version": {
"type": "string",
"mode": "rw",
"min_len": 0,
"max_len": 64
},
"ftp_button": {
"description": "Used to control whether the button is displayed!",
"type": "string",
"items": [“Save”,”Refresh”,”Check”,”Upgrade”]}
}
}
}
Example:
Request message:
POST /API/ Maintenance/DeviceReboot/Set HTTP/1.1
{
"data":{
"secondary_authentication":"11111"
}
244
}
Response message:
HTTP/1.1 200 OK
{
"version": "1.0"
"result": "success"
}
11.6.1 Description
11.6.2 Syntax
GET
URL POST /API/Maintenance/ParamManagement/Get
Description Export the param configure file
Request Body show as follow Table-11.6.1
Response JSON (show as follow Table-11.6.2)
SET
URL POST /API/Maintenance/ ParamManagement/Set
Description Import the param configure file
Request Body JSON (show as follow Table-11.6.3)
Successful Response JSON (show as follow Table-11.6.4)
11.6.3 Parameters
Table-11.6.1
KEY VALUE COMMENT
RANGE TYPE
base_secondary_aut Json Object Encryption auth,Table-12.7.2.4
hentication
11.7IPC Maintenance
11.7.1 Description
11.7.2 Syntax
OPRATE
URL POST /API/IPCMaintaint/IPCReset/Get
Description For NVR request to Restore IPC’s default parameters
Request Body
Successful Response The successful result response that described in Table-11.7.1
OPRATE
URL POST /API/IPCMaintaint/IPCReboot/Get
Description For NVR request to Reboot IPC
Request Body
Successful Response The successful result response that described in Table-11.7.1
OPRATE
URL POST /API/IPCMaintaint/IPCParamManagement/Get
Description For NVR request to import or export IPC’s parameters
Request Body
Successful Response The successful result response that described in Table-11.7.1
246
OPRATE
URL POST /API/IPCMaintaint/IPCReset/Set
Description For NVR request to Restore IPC’s default parameters
Request Body Request JSON (show as follow Table-11.7.4)
Successful Response The successful result response that described in Table-11.7.7
OPRATE
URL POST /API/IPCMaintaint/IPCReboot/Set
Description For NVR request to Reboot IPC
Request Body Request JSON (show as follow Table-11.7.4)
Successful Response The successful result response that described in Table-11.7.7
OPRATE
URL POST /API/IPCMaintaint/IPCParamManagement/Import
Description For NVR request to import IPC’s parameters
Request Body Request JSON (show as follow Table-11.7.4)
Successful Response The successful result response that described in Table-11.7.7
OPRATE
URL POST /API/IPCMaintaint/IPCParamManagement/Export
Description For NVR request to export IPC’s parameters
Request Body Request JSON (show as follow Table-11.7.4)
Successful Response The successful result response that described in Table-11.7.7
OPRATE
URL POST /API/IPCMaintaint/IPCUpgrade/Get
Description For NVR request to Upgrade IPC
Request Body
Successful Response The successful result response that described in Table-11.7.1
GET
URL POST /API/IPCMaintaint/IPCUpgrade/Token
Description IPC upgrade get token
Request Body show as follow Table-11.7.10
Successful Response The successful result response that described in Table-11.7.11
POST
URL POST /API/IPCMaintaint/IPCUpgrade/Upgrade
Description IPC Upgrade
Request Body file data
Successful Response The successful result response that described in Table-11.12
247
GET
URL POST /API/IPCMaintaint/FtpIpcUpgrade/Range
Description Get the information of Ftp IPC Upgrade
Request Body
Successful Response FtpIPCUpgradeRange Info JSON (show as follow Table-11.7.14)
GET
URL POST /API/IPCMaintaint/FtpIpcUpgrade/Get
Description Get the information of Ftp IPC Upgrade
Request Body none
Successful Response FtpIPCUpgrade Info JSON (show as follow Table-11.7.17)
SET
URL POST /API/IPCMaintaint/FtpIpcUpgrade/Set
Description Get the information of Ftp IPC Upgrade
Request Body Ftp IPC Upgrade Set Info JSON (show as follow Table-11.7.18)
Successful Response The successful result response that described in 2.5
SET
URL POST /API/IPCMaintaint/FtpIpcUpgrade/Check
Description Get the information of Ftp IPC Upgrade
Request Body Ftp IPC Upgrade Check Info JSON (show as follow Table-11.7.19)
Successful Response Ftp IPC Upgrade Check Info JSON (show as follow Table-11.7.19)
SET
URL POST /API/IPCMaintaint/FtpIpcUpgrade/Upgrade
Description Start Ftp IPC upgrade
Request Body Ftp IPC Upgrade Info JSON (show as follow Table-11.7.20)
Successful Response The successful result response that described in 2.5
GET
URL POST /API/IPCMaintaint/FtpIpcUpgrade/Progress
Description It is used to get upgrade proess
Request Body Ftp IPC Upgrade Info JSON (show as follow Table-11.7.20)
Successful Response Ftp IPC upgrade result JSON (show as follow Table-11.7.21)
11.7.3 Parameters
248
RANGE TYPE
SingleInformation JSON show as follow Table-
channel_info JSON Object
11.7.2
249
… Json Object
250
file_name string upgrade file name
file_size int Upgrade file size
ipc_channels int array Channels that need to be upgraded
upgrade_head int array 1KB of data before the upgrade file
base_secondary_aut Json Object Encryption auth,Table-12.7.2.4
hentication
251
[“Save”,”Refresh”,”Che Whether the control interface button is displayed
ftp_buttons string
ck”,”Upgrade”]
check_chns string array IPC to be detected
SingleInformation JSON show as follow Table-
channel_info JSON Object
11.7.15
A new interface for judging whether to use FTP
online_upgrade bool
or HTTP to upgrade IPC online
253
Description System upgrade get token
Request Body show as follow Table-11.8.1
Successful Response The successful result response that described in Table-11.8.2
POST
URL POST /API/Maintenance/SystemUpgrade/Upgrade
Description Upgrade system
Request Body file data
Successful Response The successful result response that described in 2.5
POST
URL POST /API/Maintenance/SystemUpgrade/VersionCheck
Description Version Check (nvr needs to verify the version information in the ftp and http
upgrade configuration files of ipc)
Request Body show as follow Table-11.8.3
Successful Response The successful result response that described in 2.5
254
updating The board is being upgraded
lack_memory Not enough storage
file_error file error
no_need_upgrade The current version is already the latest and does
not need to be updated
size_error File size exceeded. file_limit returns the
maximum file size
file_invalid The file is invalid, please upload a legal file
GET
URL POST /API/Maintenance/DeveloperMode/Get
Description Developer Mode
Request Body
Successful Response The successful result response that described in Table-11.9.1
SET
URL POST /API/Maintenance/DeveloperMode/Set
Description Developer Mode
Request Body show as follow Table-11.9.1
Successful Response The successful result response that described in 2.5
DELETE
URL POST /API/Maintenance/DeveloperMode/Clear
Description Developer Mode
Request Body show as follow Table-11.9.2
Successful Response The successful result response that described in 2.5
255
TOKEN
URL POST /API/Maintenance/DeveloperMode/Token
Description Developer Mode
Request Body None
Successful Response Table-11.9.3
DOWNLOAD
URL POST /API/Maintenance/DeveloperMode/Download
Description Developer Mode
Request Body show as follow Table-11.9.4
Successful Response None
256
in the header.
2. Send /API/Maintenance/DeveloperMode/Download with x-download-token and X-csrftoken to
download the file.
Example:
Request message:
POST /API/ Maintenance/DeviceShutdown/Set HTTP/1.1
{
"data":{
"base_secondary_authentication":"11111"
}
}
Response message:
HTTP/1.1 200 OK
{
"version": "1.0"
"result": "success"
}
257
Request Body None
Successful Response The successful result response that described in Table-11.11.1
TEST
URL POST /API/ Maintenance/AutoUpgrade/Check
Description Http Upgrade
Request Body None
Successful Response The successful result response that described in 2.5
SET
URL POST /API/ Maintenance/AutoUpgrade/Set
Description Http Upgrade
Request Body None
Successful Response The successful result response that described in 2.5
SET
URL POST /API/Maintenance/DefoggingFan/Set
Description Set fan switch
Request Body Defogging Fan information JSON (show as follow Table-11.10)
Successful Response The successful result response that described in 2.5
12 LOGIN
258
12.1 Login
This chapter includes APIs such as login, logout, heartbeat, device information acquisition after login, and
channel information acquisition.
Client login and subsequent process reference:
The /API/Login/Range interface does not authenticate, and returns whether the system is logged in for the first time
(admin without a password), and some information for display. If it is the first login to the system, the client calls
the /API/FirstLogin/Password/Set interface to set the admin password before logging in to the system.
12.1.1 Description
Range
URL POST/API/Login/Range
Description Get the device info before login
Request Body None
259
Successful Response Range Information JSON (show as follow Table-12.1.1)
Get
URL POST/API/Login/DeviceInfo/Get
Description Get device information
Request Body Device Information JSON (show as follow Table-12.1.2.x)
Successful Response Device Information JSON (show as follow Table-12.1.2)
Get
URL POST/API/Login/ChannelInfo/Get
Description Get channel information
Request Body None
Successful Response Device Information JSON (show as follow Table-12.1.3)
Set
URL POST/API/FirstLogin/Password/Set
Description Device first login setting password
Request Body show as follow Table-12.1.5
Successful Response The successful result response that described in 2.5
Set
URL POST/API/Login/Password/Set
Description Set the user password on the login interface (for ordinary users to log in and
set the password for the first time, only for A01)
Request Body show as follow Table-12.1.5
Successful Response The successful result response that described in 2.5
Range
URL POST/API/Web/Login
Description login
Request Body show as follow Table-12.1.10
Successful Response Range Information JSON (show as follow Table-12.1.6)
Range
URL POST /API/Login/Heartbeat
Description Heartbeat API, send a heartbeat request every 30s after login to ensure that
the heartbeat will not expire after timeout
Request Body show as follow Table-12.1.9
Successful Response The successful result response that described in 2.5
260
12.1.2 Syntax
Table-12.1.1( rangeJSON)
KEY VALUE COMMENT
RANGE TYPE
device_type “IPC” string Used to determine the current device before
login
cur_lang string current display language
username Max length: 16 byte string username
password string password
“ipc_tip” string Password prompt box content selection
pwd_tip “nvr_tip”
“dvr_tip”
password_tips bool Whether to display the password prompt
Json Object List of languages supported for selection, the
lang_strs
language types are shown in Table-12.1.1.1
default_lang string default display language
custom_name int Customer name, not A01
custom_logo int Customer logo, not used for A01
bool The sign of logging in to IE with an empty
first_login_flag password, that is, whether it is the first time to
log in
wifi_ip string A01 not used
web_title string "Web Viewer", not used for A01
site_version string Displayed version number
support_recover bool Support password retrieval function
_password
use_recover_pas bool Use the password retrieval function
sword
default_usernam string When there is no password, it is displayed
e when changing the password
bool Whether the password is encrypted for
password_enc
transmission
String The currently supported API version, the
http_api_version
current version is: V1.0.
Table-12.1.1.1(lang_strs JSON)
KEY VALUE COMMENT
RANGE TYPE
CHS 中文 string
CHT 繁体中文 string
CSY ČEŠTINA string
261
DAN DANSK string
ENU English string
FIN FINNISH string
FRA FRANÇAIS string
DEU DEUTSCH string
ELL ΕΛΛΗΝΙΚΑ string
HEB עברית string
HUN MAGYAR string
ITA ITALIANO string
JPN 日本語 string
PLK POLSKI string
PTG PORTUGUÊS string
RUS РУССКИЙ string
ESN ESPAÑOL string
THA ไทย string
SLV SLOVENIA string
ROM ROMANIAN string
BRG BULGARIAN string
ARA ARABIC string
HIN HINDI string
VIE VIETNAM string
HOL HOLLAND string
TUR TURKEY string
POS PERSIAN string
SVE SVENSKA string
KOR KOREAN string
IND INDONESIAN string
PTB PORTUGUESE string
FLM FLEMISH string
UKA Українська string
SLK Slovensky string
Table-12.1.2.x(request JSON)
KEY VALUE COMMENT
RANGE TYPE
requestor “NVR” string Request sources: eg: nvr, etc.
int The requested channel number.
Usage scenario: When DVR/NVR is
connected to multi-channel devices,
front_chn_index bring this field when you want to get the
front-end ipc device information. When
the connected device receives this field,
it will request the device information of
262
the corresponding channel ipc and
forward it to the connecter.
Table-12.1.2(respond JSON)
KEY VALUE COMMENT
RANGE TYPE
channel_num int Total number of channels
analog_channel_num int Total Analog Channels
int The number of analog channels, if it
max_analog_chn
is greater than 0, it is dvr/xvr
“Mainstream”, string array Support several stream switching
stream_profile ”Substream”,
“Mobilestream”
support_ftp_upgrade bool Whether to support ftp upgrade
support_http_upgrade bool Whether to support http upgrade
ftp_upgrade_url string ftp upgrade url
http_upgrade_url string http upgrade url
support_cloud_upgrade bool Whether to support cloud upgrade
“VVPush”, string Push type (A01 is not used)
push_type “Baidu”“RSPush”
“TutkPush”
“Mainstream”, string IE default stream type
default_stream
“Substream”
“0s”“30s”“1m”5m string (A01 not used)
client_logout_time
““30m”
“Motion”“Io” string array
pushinfo_type
“Videoloss””Pir”
ptz_support true,false bool
local_alarmin_num int On-board alarm input
local_alarmout_num int On-board alarm output
suggested_modify_pwd bool Is it recommended to change the
password
bool Whether to support face parameter
support_face_config
query and setting
bool Whether to support IE download
support_ie_down_snap
board screenshot
bool Does it support pedestrian and
support_human_vehicle_search
vehicle search functions?
bool Whether to enhance the function of
support_lpd_enhance
vehicle recognition
int Main stream preview channel
preview_num
number
mac_addr Max length:35byte string MAC address
263
bool Whether to support determining
whether the program has IO alarms
support_io_record
based on the total number of IO
alarms at the front and rear ends
bool Does it support manual recording
support_manual_record
type search
bool Sound alarm display flag: 0 hidden,
support_sound_record
1: displayed
bool Support NewRecordDetailRsp
support_playback_new_rec_detail
(New_GetRecFileList) search
bool Support NewRecordDetailRsp
support_playback_new_rec_file_do (New_GetRecFileList) video
wnload download, support video file lock
query and lock setting
bool Does the IE playback page support
support_more_chn_playback multi-channel playback (more than 4
channels)
bool Whether to display video masking
support_video_cover_record
alarm
bool Indicates whether or not the display
support_smart_record
intelligence analysis page
support_substream_playback bool substream playback
support_pir_record bool support PIR
support_flood_light bool support FloodLigh
support_speaker bool support the speaker
bool true: the validity period of the custom
show_certificate_remain_time
certificate is less than 8 days
certificate_remain_time 0-10 int Valid days for custom certificates
media_port see communication matrix
media_external_port see communication matrix
local_ip string
0-100 int The maximum size of the board
upgrade_file_max_size
upgrade file, in MB
0-3 int The length of the upgrade header
upgrade_head_trans_size
information on the board side, in k
bool Whether to support volume
support_audio_volume
adjustment
“TalkHalf”, string
talkback
“TalkFull”
sound bool sound switch display
enable_encryption bool private protocol encryption
"manual_alarm" string array Controls the set of capabilities
device_preview_ability
"face" displayed on the side of the preview
264
"FR" string array Control the set of options displayed
"Human" on the side of the AI preview (after
"Vehicle" the update, this field is also used to
"PID_Human" judge the type in the playback smart
"PID_Vehicle" image search, and the smart type
"LCD_Human" judgment in the smart data statistics
device_preview_AI_item
"LCD_Vehicle" interface)
"Non-Vehicle"
"PID_Non-
Vehicle"
"LCD_Non-
Vehicle"
"localSetting" string array Controls the set of capabilities
"remoteSetting" displayed on the upper right side of
device_main_menu
"playback", the preview
"preview"
bool Does it support AI face, car and
support_ai_pic_report
image reporting?
bool Whether to support repeat customer
support_repeat_visitor
function (for NVR only)
bool Whether to support face attendance
support_face_attendance
function (for NVR only)
bool Does it support the heat map function
support_heat_map
(for NVR only)
bool Whether to support fisheye function
support_fisheye
(for NVR only)
bool Whether to support binocular
support_binoculars
function (for NVR only)
bool Whether to support over-the-line
support_cc_scenario
scene application
Does it support face-based real-time
support_attendance_scenario
attendance scene application?
support_face_attribute bool Whether to support face attributes
bool Whether to support AI's perimeter
support_ai_pidlcd
and tripwire
bool Whether to support AI's crossing
support_ai_cc
count
bool Does it support one-key disarm
support_disarming
function
unsigned long Equipment type
dev_type
long
device_type Max length:24byte string Device model
unsigned char Playback mode: 0-old playback
dev_play_backcap
mode, 1-fast forward and fast rewind
265
only take I frame mode, 2-fast
forward and fast rewind jump I frame
mode
bool Does it support Pid Lcd search
support_PidLcd_search
function
bool Whether to support AAC audio
support_aac
format
p2p_id string P2P ID (A01 is not used)
bool Support single-channel HLS code
support_hls_server
stream
videoloss_status bool Whether to display the missing logo
nocamera_display bool Whether to display nocamera text
FR_model_version int IPC face recognition model version
FD_model_version int IPC face detection model version
support_voice_prompts bool Whether to support voice broadcast
bool Whether to support disconnected
support_ANR
recording
bool Whether to support white light alarm
support_siren_audio
sound type selection
support_floodlight_color_image_ct bool Whether to support white light forced
rl color function
bool Whether to support parameter import
support_param_import_export
and export
support_occlusion_detection bool Does it support lens occlusion alarm?
support_sound_detection bool Whether to support sound detection
bool Whether to support osd transparency
support_osd_transparency
switch
“H.264” string array Supported encoding types
“H.265”
encode_type_ability
“H.264+”
“H.265+”
Json Object The supported ptz capabilities are
ptz_ability
shown in Table-12.1.11
Json Object See Table-12.1.12 for the default
localset
format of local settings
Json Object See Table-12.1.13 for the format
localsetRange
range of local settings
bool Whether to support face group
support_get_fr_group acquisition, that is, support the GetId
method
bool Whether to support license plate
support_get_lpr_group group acquisition, that is, support the
GetId method
266
Max length:32byte String manufacturer name
manufacturer
(1)Request
URL : POST / API / FirstLogin / Password / Set
{
"version": "1.0",
"data" : {
"base_enc_password": {
"seq": 0,
"peer_key" : "060kL4pXa9Br5Mt+/zsii4GllHfeXc/yR0jmP2Zfykzc=",
"cipher" : "0bjEvTI4Lr8jsytAHx8bSXPNk7cuvIFYGCQjIUH2S/sVPnNQO"
}
}
}
(2)Response(JSON)
{
"result":"success",
"data" : {}
}
Table-12.1.9(heartbeat request JSON)
KEY VALUE COMMENT
RANGE TYPE
keep_alive bool Keep alive
Table-12.1.10(request JSON)
KEY VALUE COMMENT
RANGE TYPE
int Login isolation flag, corresponding to
the value passed by the client:114(B09)、
oem_type 144(B14) 、 148(B25) 、 298(B07) 、
221(B07) 、 309(B52-1) 、 310(B52) 、
313(B52-1\B52)
269
Table-12.1.11(ptz_ability JSON)
KEY VALUE COMMENT
RANGE TYPE
“1.0” string Dome new page version
ptz_version
“2.0”
btn_autofocus bool auto focus
"Ptz_QuickUse string array Shortcut button
_3DPosition"
"Ptz_QuickUse
_AutoFocus"
"Ptz_QuickUse
_PtzReset"
quick_use "Ptz_QuickUse
_WatchMode"
"Ptz_QuickUse
_ManualHuma
nTrace"
"Ptz_QuickUse
_LensReset"
iris_minus_add bool
Table-12.1.12(localset JSON)
KEY VALUE COMMENT
RANGE TYPE
string Video download default format, neutral
RecFileType
default is MP4
string The default format of the snapshot, the
CapFileType
neutral default is JPG
int Default interval time, neutral default
SwitchTime
interval is 10
Table-12.1.13(localsetRange JSON)
KEY VALUE COMMENT
RANGE TYPE
"RF" string Video Download Format Options
RecFileType "MP4"
"AVI"
"JPG" string Snapshot Format Options
CapFileType "BMP"
"PNG"
SwitchTime 1-60 int interval time range
Table-12.1.14(partial_request JSON)
KEY VALUE COMMENT
270
RANGE TYPE
/API/IPCMaintaint/IPC Json Object API that supports page-by-page access
Disk/Get to IPC SDK information
Table-12.1.15
KEY VALUE COMMENT
RANGE TYPE
type "channel_list" string type of data
0-32 int The size of each page of data after
quota
paging
total int total size of data
Example:
Partial request(JSON)
support_partial_request:{
"/API/IPCMaintaint/IPCDisk/Get":{
"type": "channel_list",
"quota" : 16,
"total" : 256
}
"/API/IPCMaintaint/IPCDisk/Format":{
"type": "channel_list",
"quota" : 16,
"total" : 256
}
}
12.1.3 LOGIN
This interface is a login interface, and the client uses digest authentication to log in; when the login is
successful, in the http header, two fields are returned, Set-cookie and X-csrftoken;
For example
Set-Cookie:
session=54f47bdcec65156e41b51d945bdcb4b6a9c77fae237b1c40d74c08db4a5eeb8f;HttpOnly;path
=/
X-csrftoken: 93e2a23d518767b646ffd9a58b24b48665923ed797dbbb6b1e9760ebb9335b14
271
After the client logs in, when accessing static files, you need to bring cookies in the http header, for
example
Cookie: session=54f47bdcec65156e41b51d945bdcb4b6a9c77fae237b1c40d74c08db4a5eeb8f;
When accessing the API, you also need to include the X-csrftoken field in the http header, for example:
X-csrftoken: 93e2a23d518767b646ffd9a58b24b48665923ed797dbbb6b1e9760ebb9335b14.
After the login is successful, the server maintains the session callback, which is 5 minutes by default
and can be configured. When the client accesses the server with a session, the server refreshes the
session expiration time.
The digest authentication algorithm currently uses rfc 2617, which will be modified to rfc7616 and
compatible with rfc2617
See Table-12.1.6 for the return of successful login (NVR, DVR, IPC are not implemented
temporarily)
Table-12.1.6 (login success json)
KEY VALUE COMMENT
RANGE TYPE
last_login_time Max_length:64 string Last successful login time (time stamp)
last_login_ip Max_length: 64 string Last login successful IP address
int The number of failed logins since the last
fail_login_count
successful login
int The number of days remaining on the
pwd_remain_time
password (IPC defaults to 90 days)
272
12.1.4 Recover Password
RANGE
URL POST /API/RecoverPassword/Range
Description It is used to get the RecoverPassword config parameters
Request Body NULL
Successful Response Channel Information JSON (show as follow Table-12.1.4.1)
GET
URL POST /API/RecoverPassword/Get
Description It is used to get the RecoverPassword parameters
Request Body Channel Information JSON (show as follow Table-12.1.4.1)
Successful Response The successful result response that described in 2.5
SET
URL POST /API/RecoverPassword/Set
Description It is used to set the RecoverPassword parameters
Request Body Channel Information JSON (show as follow Table-12.1.4.1)
Successful Response The successful result response that described in 2.5
RANGE
URL POST /API/RecoverPassword/Authorization/Range
Description It is used to get the RecoverPassword Authorization parameters
Request Body NULL
Successful Response Channel Information JSON (show as follow Table-12.1.4.2)
GET
URL POST /API/RecoverPassword/Authorization/Get
Description It is used to get the RecoverPassword Authorization parameters
Request Body Channel Information JSON (show as follow Table-12.1.4.2)
Successful Response The successful result response that described in 2.5
SET
URL POST /API/RecoverPassword/Authorization/Set
Description It is used to set the RecoverPassword Authorization parameters
Request Body Channel Information JSON (show as follow Table-12.1.4.2)
Successful Response The successful result response that described in 2.5
SET
URL POST /API/RecoverPassword/Certificate/Export
Description It is used to set the RecoverPassword Authorization parameters
Request Body Channel Information JSON (show as follow Table-12.1.4.1)
273
Successful Response The successful result response that described in 2.5
SET
URL POST /API/RecoverPassword/Email/Send
Description It is used to set the RecoverPassword Authorization parameters
Request Body A button for send email_code
Successful Response The successful result response that described in 2.5
Example:
ALL request and response message:
1. /API/RecoverPassword/Range
Response example:
{
"result": "success",
"data": {
"answer_flag": {
"type": "bool"
},
"email_flag": {
"type": "bool"
},
"certificate_flag": {
"type": "bool"
},
"super_pwd_flag": {
"type": "bool"
},
"questions": {
"type": "array",
"size": 3,
"items": [
{
"type": "int32",
"items": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
275
11,
12,
13,
14,
15
]
}
]
},
"answers": {
"type": "array",
"size": 3,
"items": [
{
"type": "string",
"min_len": 1,
"max_len": 64
}
]
},
"email": {
"type": "string",
"min_len": 1,
"max_len": 64
}
}
}
3. /API/RecoverPassword/Set #Set the configuration of retrieving the password, log in for the first time and go
276
through the Set interface
send instance:
{
"data": {
"answer_flag": true,
"email_flag": true,
"certificate_flag": true,
"super_pwd_flag": true,
"questions": [5, 4, 3],
"answers": ["111", "222", "333"],
"email": "[email protected]"
}
}
4. /API/RecoverPassword/Authorization/Range
example response:
{
"result": "success",
"data": {
"mode": {
"type": "string",
"items": [
"Answer",
"Email",
"Certificate",
"SuperPwd"
]
},
"questions": {
"type": "array",
"size": 3,
"items": [
{
"type": "int32",
"items": [
1,
2,
3,
4,
5,
6,
277
7,
8,
9,
10,
11,
12,
13,
14,
15
]
}
]
},
"answers": {
"type": "array",
"size": 3,
"items": [
{
"type": "string",
"min_len": 1,
"max_len": 64
}
]
},
"email_code": {
"type": "string",
"min_len": 1,
"max_len": 64
},
"certificate": {
"type": "string",
"min_len": 1,
"max_len": 128
},
"super_pwd": {
"type": "string",
"min_len": 1,
"max_len": 16
}
}
}
278
{
"result": "success",
"data": {
"mode": "Answer",
"questions": [
5,
4,
3
]
}
}
12.2.1 Description
12.2.2 Syntax
Table-12.2.1(JSON)
KEY VALUE COMMENT
RANGE TYPE
json Show Table-12.2.2
Table-12.2.2(JSON)
KEY VALUE COMMENT
RANGE TYPE
main Json array Show Table-12.2.3
Table-12.2.3(JSON)
KEY VALUE COMMENT
RANGE TYPE
Max length 64 string A menu
“Display,”Record”,”Alarm”, ”AI”,”N
title
etwork”,”Storage”,”System”,”Intellige
nt”
sub Json array Show Table-12.2.4
Table-12.2.4(JSON)
KEY VALUE COMMENT
RANGE TYPE
title Max length 64 string Secondary menu “
pages Json array Show Table-12.2.5
Table-12.2.5(JSON)
KEY VALUE COMMENT
RANGE TYPE
title Max length 64 string Level 3 menu
page Max length 64 string Confirm this with the client
280
12.2.3 Example
Request message:
POST /API/Login/DevicePage/GetHTTP/1.1
Accept: */*
Content-type: application/json
{
"version": "1.0",
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: xx
Connection: keep-alive
{
"version": "1.0",
"main":[ //first level menu
{
"title": "Channel",
"sub":[ //secondary menu
{
"title": "Channel",
"pages":[ //Level 3 menu, corresponding to a single page
{
"title": "IP Channels", //name
"page": "chn_ipChn"//web page
},
{
"title": "Protocol Manage",
"page": "chn_protocolMng" }
]
},
...
]
},
{
...
},
...
]
}
The neutral standard configuration is as follows:
Main menu [Level 1 menu]
281
["Channel","Record","Alarm","AI","Network","Device","System","Intelligent"]
Submenu [secondary menu]
…
Level 3 menu [web page]
Title Page
Channel related, page chn_
Analog Channels chn_analogChn
IP Channels chn_ipChn
Wireless Camera chn_wireChn
Protocol Manage chn_protocolMng
Live chn_osd
Image Control chn_imgCtrl
Video Cover chn_videoCover
Video Crop chn_videoCrop
PTZ chn_ptz
FloodLight chn_floodlight
PIR chn_pir
PID chn_pid
LCD chn_lcd
SOD chn_sod
PD chn_pd
FD chn_fd
CC chn_cc
Sound_Detection chn_sound_detection
Occlusion_Detection chn_occlusion_detection
Intelligent_Analysis chn_intelligent_analysis
Schedule,page schedules_
Record Schedule schedules_rec
Capture Schedule schedules_capture
Email Schedule schedules_email
Ftp Schedule schedules_ftp
CloudSchedule schedules_cloud
Intelligent Schedule schedule_intelligent
282
Ai_Schedules ai_schedules
Ai related,page AI
283
FD(Face Detection) chn_ai_fd
PD&VD(Human & Vehicle Detection) chn_ai_pvd
PID(Perimeter Intrusion Detection) chn_ai_pid
LCD(Line Crossing Detection) chn_ai_lcd
CC(Cross Counting) chn_ai_cc
HM(Heat Map) chn_heat_map
SOD(Goods Lost Legacy) chn_ai_sod
CD(Crowd Density Detection) chn_ai_cd
QD(Queue Lenght Detection) chn_ai_qd
Model Configuration ai_model_configuration
Database Management ai_database_management
FR(Face Recognition) alarm_ai_fr
AD(Attribute Detection) alarm_ai_attribute
PD&VD(Human&Vehicle Detection) alarm_ai_pvd
PID(Perimeter Intrusion Detection) alarm_ai_pid
LCD(Line Crossing Detection) alarm_ai_lcd
CC(Cross Counting) alarm_ai_cc
FD(Face Detection) alarm_ai_fd
FA(Face Attendance) alarm_ai_fa
SOD(Goods Lost Legacy) alarm_ai_sod
CD(Crowd Density Detection) alarm_ai_cd
QD(Queue Lenght Detection) alarm_ai_qd
LPD(License Plate Detection) alarm_ai_lpd
RSD(Rare Sound Detection) alarm_ai_rsd
Face Detection ai_fd_statistics
Human&Vehicle Detection ai_pvd_statistics
Heat Map Statistics ai_hm_statistics
Cross Counting Statistics ai_cc_statistics
Others
Auto Reboot sys_auto_reboot
Parameter Management sys_param_mgt
Load Default sys_load_default
Log sys_maint_log
Sys Defogging Fan sys_defogging_fan
12.3.1 Description
Get
URL POST/API/PreviewChannel/PTZ/Get
Description Get PTZControlinformation
Request Body ChannelRequest JSON(show as follow Table-12.3.2.x )
Successful Response Information JSON (show as follow Table-12.3.2.2)
Get
URL POST/API/PreviewChannel/Floodlight2AudioAlarm/Get
Description Get LightSireninformation
Request Body ChannelRequest JSON(show as follow Table-12.3.2.x )
Successful Response Information JSON (show as follow Table-12.3.2.3)
Get
URL POST/API/PreviewChannel/DualTalk/Get
Description Get Dualtalk information
Request Body ChannelRequest JSON(show as follow Table-12.3.2.x )
Successful Response Information JSON (show as follow Table-12.3.2.5)
Get
URL POST/API/PreviewChannel/ManualAlarm/Get
Description Get Manulalarm information
Request Body None
285
Successful Response Information JSON (show as follow Table-12.3.2.4)
Control
URL POST/API/PreviewChannel/PTZ/Control
Description Control PTZ
Request Body Request JSON (show as follow Table-12.3.2.2)
Successful Response The successful result response that described in 2.5
Control
URL POST/API/PreviewChannel/PTZ/Control/Progress
Description GET PTZ status
Successful Response Response JSON (show as follow Table-12.3.2.2)
Control
URL POST/API/PreviewChannel/Floodlight2AudioAlarm/Set
Description Control LightSiren
Request Body Request JSON (show as follow Table-12.3.2.3)
Successful Response The successful result response that described in 2.5
Control
URL POST/API/PreviewChannel/DualTalk/Set
Description Control DualTalk
Request Body Request JSON (show as follow Table-12.3.2.5)
Successful Response The successful result response that described in 2.5
Control
URL POST/API/PreviewChannel/ManualAlarm/Set
Description Control Manulalarm
Request Body Request JSON (show as follow Table-12.3.2.4)
Successful Response The successful result response that described in 2.5
12.3.2 Syntax
286
The number of channels
depends on the capabilities of
the device.
Table-12.3.2.1(ptz_paramJSON)
KEY VALUE COMMENT
RANGE TYPE
channel string
“1.0” PTZ new page version
ptz_version
“2.0”
PTZ_CMD_UP = 1, int (Only A01)(only control)
PTZ_CMD_DOWN,
PTZ_CMD_LEFT,
PTZ_CMD_RIGHT,
PTZ_CMD_UPLEFT,
PTZ_CMD_UPRIGHT,
PTZ_CMD_DOWNLEFT,
PTZ_CMD_DOWNRIGHT,
PTZ_CMD_ZOOMIN,
PTZ_CMD_ZOOMOUT,
PTZ_CMD_FOCUSNEAR,
PTZ_CMD_FOCUSFAR,
PTZ_CMD_IRISOPEN,
PTZ_CMD_IRISCLOSE,
PTZ_CMD_AUTOSCAN,
PTZ_CMD_CRUISE,
cmd PTZ_CMD_CHANGECRUISETIM
E,
PTZ_CMD_SETPRESET,
PTZ_CMD_CLEARPRESET,
PTZ_CMD_CALLPRESET, //20
PTZ_CMD_AUXILIART_OPEN,
PTZ_CMD_AUXILIART_CLOSE,
PTZ_CMD_LOCKFOCUS,
PTZ_CMD_LINESCANSETA,
PTZ_CMD_LINESCANSETB,
PTZ_CMD_LINESCANSETSPEED
, /* speed >=0 && speed <=
PTZ_CMD_LINESCANSMALLRA
D, // Inner arc
PTZ_CMD_LINESCANBIGRAD,
287
// Outer arc
PTZ_CMD_DEFAULT,
PTZ_ZOOM_POSITION,
PTZ_FOCUS_POSITION,
PTZ_ZOOM_MOVE,
PTZ_FOCUS_MOVE,
PTZ_AUTO_FOCUS,
PTZ_AREA_FOCUS,
PTZ_REFRESH_INFOR,
PTZ_CALIBRATION_SETTING,
PTZ_TOUR_START,
PTZ_TOUR_STOP,
PTZ_PATTERN_START,
PTZ_PATTERN_STOP,
PTZ_PATTERN_RECORD_START
,
PTZ_PATTERN_RECORD_STOP,
PTZ_NET_OSD,
PTZ_3D_POSITION,
PTZ_LIGHT,
PTZ_RAIN,
PTZ_CALCPADNUM_SETTING,
PTZ_CMD_NEWSCENECALIB,
PTZ_PRIVACYMODE,
PTZ_TRACE_MODE,
PTZ_Count
“Ptz_Cmd_Up”, String (Not forA01)(only control)
“Ptz_Cmd_Down”,
“Ptz_Cmd_Left”,
“Ptz_Cmd_Right”,
“Ptz_Cmd_UpLeft”,
“Ptz_Cmd_UpRight”,
“Ptz_Cmd_DownLeft”,
“Ptz_Cmd_DownRight”,
“Ptz_Cmd_ZoomAdd”,
cmd
“Ptz_Cmd_ZoomMinus”,
“Ptz_Cmd_FocusAdd”,
“Ptz_Cmd_FocusMinus”,
“Ptz_Cmd_IrisAdd”,
“Ptz_Cmd_IrisMinus”,
“Ptz_Cmd_CircleCenter”,
“Ptz_Cmd_Cruise”,
“Ptz_Change_CruiseTime”,
“Ptz_Cmd_AddPreset”,
288
“Ptz_Cmd_ClearPreset”,
“Ptz_Cmd_CallPreset”,
“Ptz_Cmd_AuxiliartOpen”,
“Ptz_Cmd_AuxiliartClose”,
“Ptz_Cmd_LockFocus”,
“Ptz_LineScan_StartPoint”,
“Ptz_LineScan_EndPoint”,
“Ptz_Cmd_LineScanSetSpeed”,
“Ptz_LineScan_CruiseStart”,
“Ptz_LineScan_CruiseStop”,
“Ptz_Btn_Default”,
“Ptz_Zoom_Position”,
“Ptz_Focus_Position”,
“Ptz_Zoom_Move”,
“Ptz_Focus_Move”,
“Ptz_Btn_AutoFocus”,
“Ptz_AreaFocus”,
“Ptz_Btn_Refresh”,
“Ptz_CalibRationSetting”,
“Ptz_Tour_Start”,
“Ptz_Tour_Stop”,
“Ptz_Pattern_CruiseStart”,
“Ptz_Pattern_CruiseStop”,
“Ptz_Pattern_RecordStart”,
“Ptz_Pattern_RecordStop”,
“Ptz_Net_Osd”,
“Ptz_3Dposition”,
“Ptz_Light”,
“Ptz_Rain”,
“Ptz_CalcpadNumSetting”,
“Ptz_Cmd_NewSceneCalib”,
“Ptz_Cmd_DefCruise_Start”,
“Ptz_Cmd_DefCruise_Stop”,
“Ptz_WatchPoint_Add”,
“Ptz_Privacy_Mode”,
“Ptz_Trace_Mode”
Table-12.3.2.2(respond ptz_paramJSON)
KEY VALUE COMMENT
RANGE TYPE
cmd “Ptz_Cmd_Up”, string Cmd show as table 12.3.2.1
“Ptz_Cmd_Down”,
…
289
…
“Ptz_Privacy_Mode”,
“Ptz_Trace_Mode”
state “Stop””Start” String Used for button pressand release
zoom_step 1,5,20 Int Zoom adjust steps
focus_step 1,5,20 Int Focus adjust steps
zoom_slider Depending on the len Int Zoom slider
focus_slider Depending on the len Int Focus slider
isctl Bool Gray screen or not:true:not,false:yes
0-10; int (only control)
speed
0-100(DVR/NVR only)
0-255 int array The maximum length of the array is 255,,
Every array is a preset point,Every array value
preset_point
(0-255)means the cruise time of preset point,
0means no preset point.
cruise_state bool Cruise status of presetpoint
line_scan_state bool Cruise status of line scan
trace_preset_point Array TOUR preset point setted
preset_point_no 1-255 int (only control)
bool true:stop PTZ control
ctl_stop
(only control)
1-255 int Cruise time of single preset point
preset_point_time
(only control)
preset_point_name 1-31 String Name of preset point, ranges from 1 to31 bytes
"Ptz_Cmd_ZoomMinu object Range used to display zoom operation buttons
zoom_minus_add s"
"Ptz_Cmd_ZoomAdd"
"Ptz_Cmd_FocusMinu object Range used to display focus operating button
focus_minus_add s"
"Ptz_Cmd_FocusAdd"
"Ptz_Cmd_IrisMinus" object Range used to display IRIS operating button
iris_minus_add
"Ptz_Cmd_IrisAdd"
btn_autofocus "Ptz_Btn_AutoFocus" object used to display autofocus operating button
btn_default "Ptz_Btn_Default" object used to display default operating button
btn_refresh "Ptz_Btn_Refresh" object used to display refresh operating button
preset_point_cruise_b "Ptz_Cmd_Cruise" object used to display cruise button
tn
is_req_progress bool if to progress the cruise command
"Ptz_Cmd_Up" object Range used to display the direction
"Ptz_Cmd_Down"
ptz_direction_control "Ptz_Cmd_Left"
"Ptz_Cmd_Right"
"Ptz_Cmd_UpLeft"
290
"Ptz_Cmd_UpRight"
"Ptz_Cmd_DownLeft"
"Ptz_Cmd_DownRigh
t"
"Ptz_Cmd_CircleCent
er"
“Mode_Preset_Point” object Range used to display modes of advanced
“Mode_Watch_Mode function
”
advanced_mode
“Mode_Line_Scan”
“Mode_Trace”
“Mode_Pattern_Scan”
trace_number 0-3 int Tour 1-4 trace
pattern_scan_number 0-3 int Pattern scan 1-4 trace
pattern_scan_numbe 0-3 Array Pattern scan 1-4 if set or not
r_isset
“Low”,”Middle”,” String Line scan speed
line_scan_speed
High”
line_scan_area bool If set line scan
“5s””6s””7s”…..”59s” String Tour trace interval
trace_interval
”60s”
utc_protocol string Utc control protocol
"Coax_Cmd_Menu string Utc control command
"
"Coax_Cmd_Up"
"Coax_Cmd_Left"
utc_cmd
"Coax_Cmd_Right
"
"Coax_Cmd_Down
"
"Mode_Default_Cruis string Current cruise mode
e"
"Mode_Preset_Point"
"Mode_Watch_Mode"
current_cruise_mode
"Mode_Line_Scan"
"Mode_Trace"
"Mode_Pattern_Scan"
"Mode_Restore_Btn"
0-100 int Belt’s life,above 90,indicating life insufficient;
belt_times_use
100 unable to cruise
"Ptz_QuickUse_3D string Used to display shortcut buttons
Position"
quick_use
"Ptz_QuickUse_Aut
oFocus"
291
"Ptz_QuickUse_Ptz
Reset"
"Ptz_QuickUse_Wa
tchMode"
"Ptz_QuickUse_Ma
nualHumanTrace"
"Ptz_QuickUse_Len
sReset"
0-256 Array Number of preset array
preset_point_obj
JSON show as follow Table-12.3.2.6
"Mode_Default_Cr string Seclections in watch mode
uise"
"Mode_Watch_Poi
nt"
watch_mode_mode "Mode_Line_Scan"
"Mode_Trace"
"Mode_Pattern_Sc
an"
Table-12.3.2.3(light_siren_paramJSON)
KEY VALUE COMMENT
RANGE TYPE
channel string
Floodlight real-time switch, false: close true:
floodlight_switch true false bool
open
floodlight_mode 0-1 int Floodlight mode, 0:lighting,1:blink
floodlight_value 1 - 100 int Brightness of floodlight
floodlight_strobe_freque Enable in blink mode,0:low; 1:middle; 2:high
0-2 array
ncy
floodlight_value_range 1-100 int Floodlight brightness range
audioAlarm _switch true false bool Audio real-time switch false: close true: open
audioAlarm _value 1 - 10 int Audio value
audioAlarm_value_range 1-10 int Audio value range
"Floodlight", Operation type
"AudioAlarm"
operation_type string
“RedBlueLight”
“All”
292
redBlueLight_switch bool redBlueLight_switch
Table-12.3.2.4(manulalarm_param JSON)
KEY VALUE COMMENT
RANGE TYPE
Local->1 bool Local->1 channel alarm switch
…… ……
Local->x bool Local->x channel alarm switch
IP_CH1->1 bool IP_CH1->1 channel alarm switch
…… ……
IP_CHx->x bool IP_CHx->x channel alarm switch
Table-12.3.2.5(dualtalk_param JSON)
KEY VALUE COMMENT
RANGE TYPE
“CH1”…”CH1x”
“IP_CH1”…”
IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
channel string
The number of
channels depends on
the capabilities of the
device.
action int 1-open, 0-close
Table-12.3.2.6(preset_point_obj _paramJSON)
KEY VALUE COMMENT
RANGE TYPE
Number of preset point,max 255points can be
no 1-256 string
configured
name 1-31 string Name of array preset:range from 1-31bytes
add true false bool If the preset point is set
293
12.3.3 Example
12.3.3 Example
POST/API/PreviewChannel/PTZ/Get HTTP/1.1
Accept: */*
Content-type: application/json
{
"version": "1.0",
“data”:{
"channel":"IP_CH4",
"command_flag":false,
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{"result":"success","data":{"channel":"CH1","preset_point":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"belt_times_use":0,"preset_point_obj
":[{"no":1,"name":"point 1","add":false},{"no":2,"name":"point 2","add":false},{"no":3,"name":"point
3","add":false},{"no":4,"name":"point 4","add":false},{"no":5,"name":"point
5","add":false},{"no":6,"name":"point 6","add":false},{"no":7,"name":"point
7","add":false},{"no":8,"name":"point 8","add":false},{"no":9,"name":"point
9","add":false},{"no":10,"name":"point 10","add":false},{"no":11,"name":"point
11","add":false},{"no":12,"name":"point 12","add":false},{"no":13,"name":"point
13","add":false},{"no":14,"name":"point 14","add":false},{"no":15,"name":"point
15","add":false},{"no":16,"name":"point 16","add":false},{"no":17,"name":"point
17","add":false},{"no":18,"name":"point 18","add":false},{"no":19,"name":"point
19","add":false},{"no":20,"name":"point 20","add":false},{"no":21,"name":"point
21","add":false},{"no":22,"name":"point 22","add":false},{"no":23,"name":"point
23","add":false},{"no":24,"name":"point 24","add":false},{"no":25,"name":"point
25","add":false},{"no":26,"name":"point 26","add":false},{"no":27,"name":"point
27","add":false},{"no":28,"name":"point 28","add":false},{"no":29,"name":"point
29","add":false},{"no":30,"name":"point 30","add":false},{"no":31,"name":"point
31","add":false},{"no":32,"name":"point 32","add":false},{"no":33,"name":"point
33","add":false},{"no":34,"name":"point 34","add":false},{"no":35,"name":"point
35","add":false},{"no":36,"name":"point 36","add":false},{"no":37,"name":"point
294
37","add":false},{"no":38,"name":"point 38","add":false},{"no":39,"name":"point
39","add":false},{"no":40,"name":"point 40","add":false},{"no":41,"name":"point
41","add":false},{"no":42,"name":"point 42","add":false},{"no":43,"name":"point
43","add":false},{"no":44,"name":"point 44","add":false},{"no":45,"name":"point
45","add":false},{"no":46,"name":"point 46","add":false},{"no":47,"name":"point
47","add":false},{"no":48,"name":"point 48","add":false},{"no":49,"name":"point
49","add":false},{"no":50,"name":"point 50","add":false},{"no":51,"name":"point
51","add":false},{"no":52,"name":"point 52","add":false},{"no":53,"name":"point
53","add":false},{"no":54,"name":"point 54","add":false},{"no":55,"name":"point
55","add":false},{"no":56,"name":"point 56","add":false},{"no":57,"name":"point
57","add":false},{"no":58,"name":"point 58","add":false},{"no":59,"name":"point
59","add":false},{"no":60,"name":"point 60","add":false},{"no":61,"name":"point
61","add":false},{"no":62,"name":"point 62","add":false},{"no":63,"name":"point
63","add":false},{"no":64,"name":"point 64","add":false},{"no":65,"name":"point
65","add":false},{"no":66,"name":"point 66","add":false},{"no":67,"name":"point
67","add":false},{"no":68,"name":"point 68","add":false},{"no":69,"name":"point
69","add":false},{"no":70,"name":"point 70","add":false},{"no":71,"name":"point
71","add":false},{"no":72,"name":"point 72","add":false},{"no":73,"name":"point
73","add":false},{"no":74,"name":"point 74","add":false},{"no":75,"name":"point
75","add":false},{"no":76,"name":"point 76","add":false},{"no":77,"name":"point
77","add":false},{"no":78,"name":"point 78","add":false},{"no":79,"name":"point
79","add":false},{"no":80,"name":"point 80","add":false},{"no":81,"name":"point
81","add":false},{"no":82,"name":"point 82","add":false},{"no":83,"name":"point
83","add":false},{"no":84,"name":"point 84","add":false},{"no":85,"name":"point
85","add":false},{"no":86,"name":"point 86","add":false},{"no":87,"name":"point
87","add":false},{"no":88,"name":"point 88","add":false},{"no":89,"name":"point
89","add":false},{"no":90,"name":"point 90","add":false},{"no":91,"name":"point
91","add":false},{"no":92,"name":"point 92","add":false},{"no":93,"name":"point
93","add":false},{"no":94,"name":"point 94","add":false},{"no":95,"name":"point
95","add":false},{"no":96,"name":"point 96","add":false},{"no":97,"name":"point
97","add":false},{"no":98,"name":"point 98","add":false},{"no":99,"name":"point
99","add":false},{"no":100,"name":"point 100","add":false},{"no":101,"name":"point
101","add":false},{"no":102,"name":"point 102","add":false},{"no":103,"name":"point
103","add":false},{"no":104,"name":"point 104","add":false},{"no":105,"name":"point
105","add":false},{"no":106,"name":"point 106","add":false},{"no":107,"name":"point
107","add":false},{"no":108,"name":"point 108","add":false},{"no":109,"name":"point
109","add":false},{"no":110,"name":"point 110","add":false},{"no":111,"name":"point
111","add":false},{"no":112,"name":"point 112","add":false},{"no":113,"name":"point
113","add":false},{"no":114,"name":"point 114","add":false},{"no":115,"name":"point
115","add":false},{"no":116,"name":"point 116","add":false},{"no":117,"name":"point
117","add":false},{"no":118,"name":"point 118","add":false},{"no":119,"name":"point
119","add":false},{"no":120,"name":"point 120","add":false},{"no":121,"name":"point
121","add":false},{"no":122,"name":"point 122","add":false},{"no":123,"name":"point
123","add":false},{"no":124,"name":"point 124","add":false},{"no":125,"name":"point
295
125","add":false},{"no":126,"name":"point 126","add":false},{"no":127,"name":"point
127","add":false},{"no":128,"name":"point 128","add":false},{"no":129,"name":"point
129","add":false},{"no":130,"name":"point 130","add":false},{"no":131,"name":"point
131","add":false},{"no":132,"name":"point 132","add":false},{"no":133,"name":"point
133","add":false},{"no":134,"name":"point 134","add":false},{"no":135,"name":"point
135","add":false},{"no":136,"name":"point 136","add":false},{"no":137,"name":"point
137","add":false},{"no":138,"name":"point 138","add":false},{"no":139,"name":"point
139","add":false},{"no":140,"name":"point 140","add":false},{"no":141,"name":"point
141","add":false},{"no":142,"name":"point 142","add":false},{"no":143,"name":"point
143","add":false},{"no":144,"name":"point 144","add":false},{"no":145,"name":"point
145","add":false},{"no":146,"name":"point 146","add":false},{"no":147,"name":"point
147","add":false},{"no":148,"name":"point 148","add":false},{"no":149,"name":"point
149","add":false},{"no":150,"name":"point 150","add":false},{"no":151,"name":"point
151","add":false},{"no":152,"name":"point 152","add":false},{"no":153,"name":"point
153","add":false},{"no":154,"name":"point 154","add":false},{"no":155,"name":"point
155","add":false},{"no":156,"name":"point 156","add":false},{"no":157,"name":"point
157","add":false},{"no":158,"name":"point 158","add":false},{"no":159,"name":"point
159","add":false},{"no":160,"name":"point 160","add":false},{"no":161,"name":"point
161","add":false},{"no":162,"name":"point 162","add":false},{"no":163,"name":"point
163","add":false},{"no":164,"name":"point 164","add":false},{"no":165,"name":"point
165","add":false},{"no":166,"name":"point 166","add":false},{"no":167,"name":"point
167","add":false},{"no":168,"name":"point 168","add":false},{"no":169,"name":"point
169","add":false},{"no":170,"name":"point 170","add":false},{"no":171,"name":"point
171","add":false},{"no":172,"name":"point 172","add":false},{"no":173,"name":"point
173","add":false},{"no":174,"name":"point 174","add":false},{"no":175,"name":"point
175","add":false},{"no":176,"name":"point 176","add":false},{"no":177,"name":"point
177","add":false},{"no":178,"name":"point 178","add":false},{"no":179,"name":"point
179","add":false},{"no":180,"name":"point 180","add":false},{"no":181,"name":"point
181","add":false},{"no":182,"name":"point 182","add":false},{"no":183,"name":"point
183","add":false},{"no":184,"name":"point 184","add":false},{"no":185,"name":"point
185","add":false},{"no":186,"name":"point 186","add":false},{"no":187,"name":"point
187","add":false},{"no":188,"name":"point 188","add":false},{"no":189,"name":"point
189","add":false},{"no":190,"name":"point 190","add":false},{"no":191,"name":"point
191","add":false},{"no":192,"name":"point 192","add":false},{"no":193,"name":"point
193","add":false},{"no":194,"name":"point 194","add":false},{"no":195,"name":"point
195","add":false},{"no":196,"name":"point 196","add":false},{"no":197,"name":"point
197","add":false},{"no":198,"name":"point 198","add":false},{"no":199,"name":"point
199","add":false},{"no":200,"name":"point 200","add":false},{"no":201,"name":"point
201","add":false},{"no":202,"name":"point 202","add":false},{"no":203,"name":"point
203","add":false},{"no":204,"name":"point 204","add":false},{"no":205,"name":"point
205","add":false},{"no":206,"name":"point 206","add":false},{"no":207,"name":"point
207","add":false},{"no":208,"name":"point 208","add":false},{"no":209,"name":"point
209","add":false},{"no":210,"name":"point 210","add":false},{"no":211,"name":"point
211","add":false},{"no":212,"name":"point 212","add":false},{"no":213,"name":"point
296
213","add":false},{"no":214,"name":"point 214","add":false},{"no":215,"name":"point
215","add":false},{"no":216,"name":"point 216","add":false},{"no":217,"name":"point
217","add":false},{"no":218,"name":"point 218","add":false},{"no":219,"name":"point
219","add":false},{"no":220,"name":"point 220","add":false},{"no":221,"name":"point
221","add":false},{"no":222,"name":"point 222","add":false},{"no":223,"name":"point
223","add":false},{"no":224,"name":"point 224","add":false},{"no":225,"name":"point
225","add":false},{"no":226,"name":"point 226","add":false},{"no":227,"name":"point
227","add":false},{"no":228,"name":"point 228","add":false},{"no":229,"name":"point
229","add":false},{"no":230,"name":"point 230","add":false},{"no":231,"name":"point
231","add":false},{"no":232,"name":"point 232","add":false},{"no":233,"name":"point
233","add":false},{"no":234,"name":"point 234","add":false},{"no":235,"name":"point
235","add":false},{"no":236,"name":"point 236","add":false},{"no":237,"name":"point
237","add":false},{"no":238,"name":"point 238","add":false},{"no":239,"name":"point
239","add":false},{"no":240,"name":"point 240","add":false},{"no":241,"name":"point
241","add":false},{"no":242,"name":"point 242","add":false},{"no":243,"name":"point
243","add":false},{"no":244,"name":"point 244","add":false},{"no":245,"name":"point
245","add":false},{"no":246,"name":"point 246","add":false},{"no":247,"name":"point
247","add":false},{"no":248,"name":"point 248","add":false},{"no":249,"name":"point
249","add":false},{"no":250,"name":"point 250","add":false},{"no":251,"name":"point
251","add":false},{"no":252,"name":"point 252","add":false},{"no":253,"name":"point
253","add":false},{"no":254,"name":"point 254","add":false},{"no":255,"name":"point
255","add":false}],"watch_mode_time":20,"watch_mode_mode":"Mode_Default_Cruise","watch_mode_num":0,"l
ine_scan_area":false,"line_scan_speed":"low","trace_interval":20,"trace_number":0,"trace_preset_point":[[],[],[],[]
],"pattern_scan_number_isset":[true,false,false,false],"pattern_scan_number":0,"current_cruise_mode":"No_Cruise
"}}
POST/API/PreviewChannel/PTZ/Control HTTP/1.1
Accept: */*
Content-type: application/json
{
"version": "1.0",
“data”:{
"channel":"IP_CH4",
"preset_index":1,
"command_flag":true,
"speed":5,
"cmd":19,
"ctl_stop":false
}
}
297
POST/API/PreviewChannel/PTZ/Control HTTP/1.1
Accept: */*
Content-type: application/json
{
"version": "1.0",
"data": {
"channel": "CH1",
"cmd": "Ptz_PresetPoint_ChangeName",
"speed": 5,
"zoom_step": 1,
"zoom_slider": 50,
"focus_step": 1,
"focus_slider": 50,
"preset_point_no": 3,
"preset_point_name": "sdcsdc",
"preset_point_time": 3
}
}
POST/API/PreviewChannel/PTZ/Control HTTP/1.1
Accept: */*
Content-type: application/json
{
"version": "1.0",
"data": {
"channel": "CH1",
"cmd": "Ptz_Cmd_AddPreset",
"speed": 5,
"zoom_step": 1,
"zoom_slider": 50,
"focus_step": 1,
"focus_slider": 50,
"preset_point_no": 3,
"preset_point_name": "sdcsdc",
"preset_point_time": 3
}
}
POST/API/PreviewChannel/PTZ/Control HTTP/1.1
Accept: */*
Content-type: application/json
{
"version": "1.0",
"data": {
298
"channel": "CH1",
"cmd": "Ptz_WatchMode_CruiseStop",
"speed": 5,
"zoom_step": 1,
"zoom_slider": 50,
"focus_step": 1,
"focus_slider": 50,
"watch_mode_time": 15,
"watch_mode_mode": "Mode_Pattern_Scan",
"watch_mode_num": 2
}
}
POST/API/PreviewChannel/PTZ/Control HTTP/1.1
Accept: */*
Content-type: application/json
{
"version": "1.0",
"data": {
"channel": "CH1",
"cmd": "Ptz_WatchMode_CruiseStart",
"speed": 5,
"zoom_step": 1,
"zoom_slider": 50,
"focus_step": 1,
"focus_slider": 50,
"watch_mode_time": 15,
"watch_mode_mode": "Mode_Line_Scan",
"watch_mode_num": "high"
}
}
POST/API/PreviewChannel/PTZ/Control HTTP/1.1
Accept: */*
{
"version": "1.0",
"data": {
"channel": "CH1",
"cmd": "Ptz_QuickUse_WatchModeStart",
"speed": 5,
"zoom_step": 1,
"zoom_slider": 50,
"focus_step": 1,
"focus_slider": 50
}
}
299
POST/API/PreviewChannel/PTZ/Control HTTP/1.1
Accept: */*
{
"version": "1.0",
"data": {
"channel": "CH1",
"cmd": "Ptz_Tour_Start",
"speed": 5,
"zoom_step": 1,
"zoom_slider": 50,
"focus_step": 1,
"focus_slider": 50,
"trace_number": 1,
"trace_preset_point": [
[
1,
2
],
[
5,
8
],
[],
[]
],
"trace_interval": 15
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result":"success",
"data":{}
}
12.4 LogOut
Request message:
POST/API/Web/Logout HTTP/1.1
Accept: */*
300
Cookie: session=xxxxx
X-csrftoken: xxxx
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: xx
Connection: keep-alive
Content-Type: application/json
{
"result":"success"
}
12.5.1 Description
Get
URL POST/API/Login/CertFile/Token
Description Get token
Request Body None
Successful Response Information JSON (show as follow Table-12.5.1.1)
Get
URL POST/API/Login/CertFile/Get
Description Download root certificate file
Request Body Request Data (show as follow example 12.5.3.2)
Successful Response Root certificate data (show as follow example 12.5.3.2)
12.5.2Syntax
Table-12.5.1.1(Request JSON)
KEY VALUE COMMENT
RANGE TYPE
token 0-32 string Token value
301
12.5.3 Example
12.5.3.1 Gettokenvalue
POST/API/Login/CertFileToken HTTP/1.1
Accept: */*
Content-type: application/json
{}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {
"token": " 6aea9ef8744f"
}
}
Body:
Token=6aea9ef8744f
Response message:
HTTP/1.1 200 OK
Content-disposition: attachment; filename="root_cert.cer"
Body:
-----BEGIN CERTIFICATE-----
MIIEDjCCAnagAwIBAgIBATANBgkqhkiG9w0BAQsFADAvMQswCQYDVQQGEwJDTjEP
MA0GA1UECgwGSHVhd2VpMQ8wDQYDVQQDDAZIdWF3ZWkwHhcNMjAwMjEzMTExMjUw
WhcNMzAwMjEwMTExMjUwWjAvMQswCQYDVQQGEwJDTjEPMA0GA1UECgwGSHVhd2Vp
MQ8wDQYDVQQDDAZIdWF3ZWkwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIB
gQCj8ai3pFrK9l4LlzhWLvWqQavhj+3yro00+4K/TugZIYd/DRA8d1Zx4Js+6nPA
SuO/64ej2uYszHUVVXUYRI/BBVfF+V4zUW7C6YhArsuAfOFPcmzUC1vtrgBCYpsq
JWQl6asXeduMwOILtJG8gErcm0QkMRWxl1FQ7v3i9CyYoWLF89Ck3w6b6N8A3dIC
302
DNFLDZxLVtI+fWKb41Ed9vpmQ9jB0d2wGptA7JPmhUe5Vvo527MuoA/qN69KjylE
1nU/+jlnUIEuEai0cZH+lQ5Aog0zhyUHgOp1RDxWYZedEjK3IXg+KOXDa/9s6BKy
xgkqZCON6zLmS3SzI4AVzsEM5YXs08CjHl3vs7ecijfdfD+NOwxCKPsr4GA27PWS
9wMFGGgeR7GDR+S55GGjDM1UMq8Lj3PRN0AQh58xNbFc+BZwcAmw4veCxyeY4Trl
0wopk3u1q+c+UNI3VTsTiNJQvLreFR9NRkDvYIcOFudyQSAwapIm/XDPA4QjqDPL
BVMCAwEAAaM1MDMwCwYDVR0PBAQDAgKkMA8GA1UdEwEB/wQFMAMBAf8wEwYDVR0l
BAwwCgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQADggGBAAMYCNGfKZGvnsHqWTP5
rtCyH6kIxxbYvS+nUJZCQXCDCTPDx2qz8CPi6TFMcR+rQbkKSRynU5kYev3bkDfZ
eJcpBfhErnzoZ/06QeR9xcJRqDEAKH1S+No5Jx+KtRm4AkDKMEbRx6ZMZycKGq5q
pWPmjulm/uM+PWtQSsoBa1NVUZH2OIIoKxNYJMU7vOzHcozuUIzJJLPNzaMRC2Kg
b6/XVurS7NjxGLs/QN7KZBa+fW2Bse2C0FbKtOiwl43G/eFF37ASa+SqOCoCS51i
75Q77jNPJxfkapyrzGPe2Y68A2BxfNEzvdeB06CNtnOFMpJbkxGEGQsvrPeFzp6g
3eFEmpgvgSuffgt3C5lL39hDMcDnDxHqc9B99ZbW8LyCGsYXLjXWzEm6dkJlXF0z
/7e7SxqOXHeBj8FGjHzUcURIhiLEf+lOvbVwBgGZ2Tjnb4Y2bbNLA5h6egovxCjy
k8SoeEMZ+uJEnZKugx2w4G6ATB73BvNT2PSj1yEgtnLOFw==
-----END CERTIFICATE-----
12.6.1 Description
Get
URL POST/API/AccountRules/Get
Description Get user rule restrictions
Request Body None
Successful Response Information JSON (show as follow Table-12.6.2.1)
12.6.2 Syntax
12.6.3 Example
Request message:
POST /API/AccountRules/Get HTTP/1.1
Accept: */*
Content-type: application/json
{
"version": "1.0",
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {
"username": {
"min_length": 1,
"character_combinations": [
"Alpha",
"digit",
"special"
],
"special": "_"
},
"password": {
"min_length": 8,
"not_same_username": true,
304
"character_combinations_num": 2,
"character_combinations": [
"ALPHA",
"alpha",
"digit",
"special"
],
"special": "`~!@#$%^&*()-_=+\\|[{}];:'\",<.>/?"
}
}
}
12.7.1 Description
Get
URL POST/API/Maintenance/TransKey/Get
Description The user password is requested to transmit the encrypted key or a random
number for the PBKDF2_SHA256
Request Body Information JSON (show as follow Table-12.7.2.1)
Successful Response Information JSON (show as follow Table-12.7.2.2)
Get
URL POST/API/Login/TransKey/Get
Description The user password is requested to transmit the encrypted key. Used before
login when device isnot activated.
Request Body Information JSON (show as follow Table-12.7.2.1)
Successful Response Information JSON (show as follow Table-12.7.2.2)
(1)Request
URL : POST/ API / Login / TransKey / Get
{
"version": "1.0",
"data" : {
"type": [
"base_x_public"
]
}
}
(2)Response(JSON)
{
305
"result": "success",
"data" : {
"Key_lists": [
{
"type": "base_x_public",
"key" : "0mkSa7soBJ/WewVVn3J8Y/TsI9+MvAY+8Elds6UqNTyw=",
"seq" : 0
}
]
}
}
12.7.2 Syntax
306
the encrypted data is transmitted
12.7.3 Example
Request message:
POST/API/Maintenance/TransKey/Get
Accept: */*
Content-type: application/json
{
"version": "1.0",
"data": {
"type": [
"base_salt",
" base_x_public "
]
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
307
{
"result": "success",
"data": {
"Key_lists": [
{
"type": "base_salt",
"key": " NZLNvhZyfhHdVsUGL8GfVbUifQHIDiJ3oueTLiAGN54= ",
"iter": 10086,
"seq": 19
},
{
"type": " base_x_public,
"key": " 0mkSa7soBJ/WewVVn3J8Y/TsI9+MvAY+8Elds6UqNTyw= ",
"seq": 0
}
]
}
}
12.7.4 INSTRUCTION
Passwords are transmitted in various scenarios. For example, when formatting a hard disk, enter the current
password for secondary authentication, set a user password, and set an email password.
Secondary
base_salt PBKDF2_SHA256 /API/Maintenance/TransKey/Get
certification
Add a user
/API/Maintenance/TransKey/Get
Modify use name base_x_public RSA
/API/SystemConfig/User/Set
and password
(1)The client uses the PBKDF2_SHA256 encryption password for secondary authentication as follows:
salt = base64_decode(key);
outlen = 32;
enc = PBKDF2(salt, pwd, iter, outlen); --------> openssl PKCS5_PBKDF2_HMAC , and EVP_sha256()
cipher = base64_encode(enc);
308
(2)The client uses X25519 to encrypt and transmit the password as follows:
encryption algorithm:aes_256_gcm
source of Key and iv: the secret is calculated through X25519, and then the key and iv are expanded
through hkdf
device_peer_key = base64_decode(key_1);
Output:
peer_key = “0” + base64(EVP_PKEY_get_raw_public_key (evp_pkey)) // Here to pass the public key to the
devicecipher = base64( aes_256_gcm(password, key, iv) + aes_256_gcm_iv + tag )
pbkdf2.html
x25519.html
These pages are designed to help you determine whether the cipher calculation is correct
1. pbkdf2.html
Open the gadget page, enter the value of word, salt, iter in turn, and click commit to start running. Where word
is the password that needs to be encrypted, salt is the random string used to mess with the real password, and iter is
the number of iterations. The final result of the run will be printed in Result, and the encrypted value is the
calculated ciphertext.
2. x25519.html
Open the gadget web page, input the value of word, peer public in turn, and click commit to start running.
Where word is the password to be encrypted and peer public is the public key obtained from the nvr. The final
result of the run is printed in Result. In encrypted, the value of public is the public key generated by the client,
which will be sent to the nvr for decryption, and the value of encrypted is the calculated ciphertext。
309
Guidelines for the development of specific secondary authentication scenarios are provided in Appendixes A.2
Guidance for the development of specific scenarios for password encryption are provided in Appendixes A.3
13 MutexParam
13.1 MutexParam
GET
URL POST/API/MutexParam/Get
Description Get the system log information
Request Body Request JSON (show as follow Table-13.1.1)
Successful Response Factory Information JSON (show as follow Table-13.1.1)
Table-14.1.1(Request JSON)
KEY VALUE COMMENT
RANGE TYPE
0~MAX_PARA_C array Channel number to enable video
cloud_video_is_used
HN_NUM uploading to cloud
MAX_CLOUD_VI int Maximum number of video recordings of
max_cloud_video_upload_
DEO_RECORD_N cloud storage
num
UM
14 Function
14.1 Snapshot
Range
URL POST /API/Snapshot/Range
Description Get the information of Snapshot
Request Body None
Successful Response Snapshotinformation JSON (show as follow Table-14.1.1)
GET
URL POST /API/Snapshot/Get
Description Get the information of Snapshot
Request Body Snapshotinformation JSON (show as follow Table-14.1.2)
310
Successful Response Snapshotinformation JSON (show as follow Table-14.1.3)
Example:
Request message:
POST/API/Snapshot/Range HTTP/1.1
{
"version": "1.0"
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
311
Content-Length: xx
Connection: keep-alive
{
"version": "1.0",
"channel_info": {
"type": "array",
"min_size": 0,
"max_size": 8,
"items": [
{
"channel": "IP_CH1",
"snapshot_resolution": {
"description": "The resolution of the image is no more than 1920*1080",
"type": "string",
"mode": "rw",
"items": [
"640 x 480",
"1280 x 720",
"1920 x 1080"
]
}
}
{
"channel": "IP_CH3",
"snapshot_resolution": {
"description": "The resolution of the image is no more than 1920*1080",
"type": "string",
"mode": "rw",
"items": [
"320 x 240",
"640 x 480",
"1280 x 720",
"1920 x 1080"
]
}
}
]
},
"result": "success"
}
312
14.2 Request I Frame
Note:NVR privateprotocol change to API requesting IFame command
Range
URL POST /API/RequestIDR
Description Requset I Frame
Request Body Channel Information JSON (show as follow Table-14.2.1)
Successful Response The successful result response that described in 2.5
Example:
Request message:
POST/API/RequestIDR HTTP/1.1
{
“data”: {
"chn_no": 0,
“stream_type”:” Mainstream”
}
}
14.3 ANR
SET
URL POST/API/ANRConfig/GetClientMac
Description Get Client Mac
Request Body Request JSON( show as follow Table-14.3.1 )
Successful Response The successful result response that described in 2.5
SET
URL POST/API/ANRConfig/SetANRInfo
Description Set ANR Info
Request Body Request JSON( show as follow Table-14.3.2)
Successful Response The successful result response that described in 2.5
GET
URL POST/API/ANRConfig/GetANRTimeInfo
313
Description Get ANR TimeInfo
Request Body Request JSON( show as follow Table-14.3.2)
Successful Response Parameter Information JSON (show as follow Table -14.3.3)
Table-14.3.3
KEY VALUE COMMENT
RANGE TYPE
start_time unsigned int
end_time unsigned int
Example:
Request message:
POST/ API/ANRConfig/GetANRTimeInfo
{
"data": {
" device_flag ": "88-DF-58-18-4F-47 "
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
"start_time":1481290144,
"end_time":1481290249
}
}
14.4 ETR
SET
URL POST/API/StreamConfig/EventStreamState/Set
314
Description Get Client Mac
Request Body Request JSON( show as follow Table-14.4.1 )
Successful Response The successful result response that described in 2.5
15 Event
15.1 event check
Get
URL POST /API/Event/Check
Description Get the push server parameters
Request Body See Table-15.1.1
Successful Response Show as Table-15.1.2
Table-15.1.1(request JSON)
VALUE COMMENT
KEY
RANGE TYPE
Optional,without input, the local side
unsigned
reader_id checks all alarm information and outputs
int
readerID
Optional,without input, the local side
unsigned
sequence checks all alarm information and outputs
int
readerID
Optional,without input, the local side
unsigned
lap_number checks all alarm information and outputs
int
readerID
Table-15.1.2(alarm JSON)
VALUE COMMENT
KEY
RANGE TYPE
Optional , when request no readerID ,
reader_id int
readerID created and return.
sequence int The current latest sequence
lap_number unsigned Current sequence position lap number
315
int
Optional, subscribe to the video flag by
default. If the field passes true or does not
subscribe_record_sig
bool pass this field, it means that the video flag
n
is subscribed. If the field passes false, it
means that the video flag is not subscribed
Subscribe to smart alert events by default.
Fields that pass true or do not pass this
subscribe_intelligenc
bool field indicate subscription, and fields that
e
pass false indicate no subscription to smart
alert events
Single alarm show as table
alarm_list Json array
Table-15.1.2(alarm JSON)
VALUE COMMENT
KEY
RANGE TYPE
system_alarm Json array Optional see table15.1.3 (Optional)
Single channel alarm see table15.1.5
channel_alarm Json array
(Optional )
“MM/DD/YYYYhh:mm:ss”
time string
317
not recording status
IO Alarm
i “R”“G” string “R”:alrm recording“G”:alarm not
recoding
PIR Alarm
p “R”“G” string “R”:alrm recording“G”:alarm not
recoding
Intelligent Alarm
s “R””G” string “R”:alrm recording“G”:alarm not
recoding
Recording
r “SR””MR” string “SR”:schedule recording
”MR”:manual recodring
SDcardAlarm
h “R” string
“R”:HD alarm recoding
VideoTampering
c “R””G” string “R”:alrm recording“G”:alarm not
recoding
Table-15.1.7camera_connect_status json
VALUE COMMENT
KEY
RANGE TYPE
“NotConfigured” string Channel connecting
“Online”,
connect_status ”Offline”
“Sleep”
“NotPaired”
Normal IPC、
A01
NVR/DVR
“FaceAlarm” “Fisheye”
“VehicleAlar “Binoculars”
m” “Ptz”
“Fisheye” “NewPtz”(not
“Binoculars” for NVR/DVR)
“Light”, “HkPtz”
string
ability ”Audio”, “Iris”
array
”DualTalk”, “Mainstream”
“Siren”, “Substream”
“Ptz”, “Mobilestream”
“Newptz” “FloodLight”
“Iris” “AudioAlarm”
“Hkptz” “AlarmOutNum”
“Mainstream “TalkHalf”
” “TalkFull”
318
“Substream” “Color”
“IO” “RedBlueLight”
“NotAutoReconn
ect”
“Pir”
“Cover”
protocol Max length: 15byte string IPC access protocol
input_num Alarm input
output_num Alarm output
“CrossCount”
“HeatMap”
“SOD”
“LCD”
“PVD”
“FD”
intelligent_ability
“PID”
“CrowdDensity”
“LPD”
“RSD”
“QD”
“AttributeDetect”
Table-15.1.11 error_code
error_code COMMENT
readerID_invalid
position_invalid
320
array
X-csrftoken: 14559384d58d55d9d80bf4baf048684f366c77905d665d99ba1bde2cdcf81b08
Content-Length: 2438
Cookie: session=cc3ec99c6f1295489c86f8842e1dd719c194c637af5b965a23932c41188a3acc
"data":{}
Reply:
HTTP/1.1 200 OK
Content-Type: application/json
321
Content-Length: 2976
{"result":"success","data":{"alarm_list":[{"time":"10/17/2020
14:16:31","system_alarm":[{"device_name":"NVR800","hdd":{"hdd_alarm_type":"Ok","hdd_alarm_info":""}}],"channel_alarm":[{"ch
annel":"CH1","motion_alarm":false,"io_alarm":false,"ptz_alarm":{"ptz_cruise_state":false,"ptz_line_scan_state":false},"videoloss":fal
se,"camera_connect_status":{"connect_status":"Online","offline_reason":"Online","ability":["Ptz","Mainstream","Substream"],"prot
ocol":"Onvif","alarm_in_num":0,"alarm_out_num":0},"channel_name":"ok","camera_type":"dome","record_flag":{"r":"SR"}},{"chan
nel":"CH2","motion_alarm":false,"io_alarm":false,"ptz_alarm":{"ptz_cruise_state":false,"ptz_line_scan_state":false},"videoloss":true,
"camera_connect_status":{"connect_status":"NotConfigured","offline_reason":"NotConfigured","ability":[],"alarm_in_num":0,"alar
m_out_num":0},"channel_name":"","camera_type":"Uknown","record_flag":{}},{"channel":"CH3","motion_alarm":false,"io_alarm":f
alse,"ptz_alarm":{"ptz_cruise_state":false,"ptz_line_scan_state":false},"videoloss":true,"camera_connect_status":{"connect_status":
"NotConfigured","offline_reason":"NotConfigured","ability":[],"alarm_in_num":0,"alarm_out_num":0},"channel_name":"","camera_
type":"Uknown","record_flag":{}},{"channel":"CH4","motion_alarm":false,"io_alarm":false,"ptz_alarm":{"ptz_cruise_state":false,"ptz
_line_scan_state":false},"videoloss":true,"camera_connect_status":{"connect_status":"NotConfigured","offline_reason":"NotConfigu
red","ability":[],"alarm_in_num":0,"alarm_out_num":0},"channel_name":"","camera_type":"Uknown","record_flag":{}},{"channel":"
CH5","motion_alarm":false,"io_alarm":false,"ptz_alarm":{"ptz_cruise_state":false,"ptz_line_scan_state":false},"videoloss":true,"cam
era_connect_status":{"connect_status":"NotConfigured","offline_reason":"NotConfigured","ability":[],"alarm_in_num":0,"alarm_out
_num":0},"channel_name":"","camera_type":"Uknown","record_flag":{}},{"channel":"CH6","motion_alarm":false,"io_alarm":false,"p
tz_alarm":{"ptz_cruise_state":false,"ptz_line_scan_state":false},"videoloss":true,"camera_connect_status":{"connect_status":"NotCo
nfigured","offline_reason":"NotConfigured","ability":[],"alarm_in_num":0,"alarm_out_num":0},"channel_name":"","camera_type":"
Uknown","record_flag":{}},{"channel":"CH7","motion_alarm":false,"io_alarm":false,"ptz_alarm":{"ptz_cruise_state":false,"ptz_line_s
can_state":false},"videoloss":true,"camera_connect_status":{"connect_status":"NotConfigured","offline_reason":"NotConfigured","a
bility":[],"alarm_in_num":0,"alarm_out_num":0},"channel_name":"","camera_type":"Uknown","record_flag":{}},{"channel":"CH8","
motion_alarm":false,"io_alarm":false,"ptz_alarm":{"ptz_cruise_state":false,"ptz_line_scan_state":false},"videoloss":true,"camera_co
nnect_status":{"connect_status":"NotConfigured","offline_reason":"NotConfigured","ability":[],"alarm_in_num":0,"alarm_out_num"
:0},"channel_name":"","camera_type":"Uknown","record_flag":{}}]}],"reader_id":3,"sequence":58,"lap_number":0}}
X-csrftoken: 14559384d58d55d9d80bf4baf048684f366c77905d665d99ba1bde2cdcf81b08
Content-Length: 2438
Cookie: session=cc3ec99c6f1295489c86f8842e1dd719c194c637af5b965a23932c41188a3acc
"data":{
"reader_id":3,
"sequence":58,
"lap_number":0
322
}
Reply:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 97
"result":"success",
"data":{
"heat_alarm":"HeatAlarm",
"reader_id":3,
"sequence":58,
"lap_number":0
323
Table-1.1.1.3 (Channel Information JSON)
KEY VALUE COMMENT
RANGE TYPE
username string Username, keep empty if no
password string password,kepp empty if no
addr string Server address
port 1-65535 int Sever port
url 0-128 string Sever API interface,keep empty if no
enable true, false bool Switch of alarm push
GET HTTP push method
method String
POST
OFF Keep alive interval
1min
keep_alive_interval String
5min
10min
HTTP Push way
push_way string
UDP
Unicast UDP push method
udp_method Multicast string
Broadcast
udp_addr string UDP server address
udp_port 1-65535 int UDP sever port
Table -1.1.1.10
KEY VALUE COMMENT
RANGE TYPE
VideoMotion IPC alarm event type
EventType VideoBlind string
SoundDetect
324
SOD
LCD
PID
PD_VD
FD
CC
AD
CD
QD
LPD
RSD
EventTime string Event triggered time
Start IPC alarm status
EventAction string
stop
MACAddress string IPC MAC address,like D094662C1A8D
The client receives IPC data when alarm triggered:
GET /API/AlarmEvent/EventPush?EventType=VideoMotion&EventTime=2022-5-26
11:5:0&EventAction=start&MACAddress=5C-F2-07-49-0F-24 HTTP/1.1
Host: 172.16.8.63:123
Accept: */*
Content-Type: application/json;charset=UTF-8
325
FD
CC
AD
CD
QD
LPD
RSD
EventTime string Alarm triggered time
Start IPC alarm status
EventAction string
stop
ChannelName string Channel number
DeviceName string IPC device name
IPAddress string IPC IP address
MACAddress string IPC MACaddress
Push data of intelligent alarm is shown in Table-
PicData Json Object
1.1.1.5 below
Table-1.1.1.6
KEY VALUE COMMENT
RANGE TYPE
Chn 0 int IPC use 0 channel only
StrChn "CH1" string Channel name
StartTime long long Start time,used for image
EndTime long long End time,used for image
SnapId int Image id
Type ACPT_Face = 0,
ACPT_HumanBody = 1,
ACPT_Vehicle = 2,
Type int ACPT_PIDHumanBody = 3,
ACPT_PIDVehicle = 4,
ACPT_LCDHumanBody = 5,
ACPT_LCDVehicle = 6,
ObjectImage string Base64 Encoding image data
Background string Base64 Coded background data
326
Table-1.1.1.7
KEY VALUE COMMENT
RANGE TYPE
Id 1-15characters string license plate number, unique identification
GrpId int Group ID
SnapId unsigned int Snap ID while IPC capturing
Type 0 int Type of face capture object
StrChn string channel
Capture start time,for example : 2018-10-25
unsigned long
StartTime 13:08:36, Unix time stamp(displayed in UTC time
long
zone)
Capture end time , for example : 2018-10-25
unsigned long
EndTime 13:08:46, Unix stamp(displayed in UTC time
long
zone)
Chn int channel
Plate color,values as below:
enum AIPlateColor_e {
APC_Blue = 0, // blue
APC_Green = 1, // green
APC_Yellow = 2, // yellow
PlateColor 0-5 int
APC_Black = 3, // black
APC_White = 4, // white
APC_Other = 5, // other
APC_Max
};
CarBrand string Car brand
CarType string Car type
Sex int Gender of car owner:0-male,1-female
Owner "Mike" string Owner name
"415025199203050916 ID code
IdCode string
"
Job "Software" string Job
Phone "12345678902" string Phone number
"Guangdong,Zhuhai,Xi Current address
Domicile string
angzhou ..."
"Detail of this remark
Remark string
person ..."
PlateImg "base64(imgData)" string Plate license image
BgImg "base64(imgData)" string Background imgae
Table-1.1.1.8
KEY VALUE COMMENT
327
RANGE TYPE
Id int Face Id,unique identification (nvr only)
GrpId int Group Id(nvr only)
SnapId unsigned int IPC capaturing image ID
Type 0 int Type of face capture object
Start time to capture,for example:2018-10-25
unsigned long
StartTime 13:08:36, Unix timestamp(displayed in UTC time
long
zone)
Capature end time,for example : 2018-10-25
unsigned long
EndTime 13:08:46, Unix timestamp(displayed in UTC time
long
zone)
Score int Image score(confidence coefficient)
Sex int Gender:0-male, 1-female
Age int Age
Gender int Face gender:0-female, 1-male
fAttrAge int Face attribute age
Glass type,0:without glass,1:with glass(currently
GlassesType int no distinction between sunglasses and ordinary
glasses, and all glasses are default )
Expression int Expression type,0:no exp,1:smile,2:laugh
MouthMask int Mouthmask or not,0:without,1:with
Race int race, 0:yellow,1:white,2:black,3:Arabian
Chn int channel
“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
StrChn string channel
The number of
channels depends on
the capabilities of the
device.
The number of modifications, the upper level is
read-only, which is updated by the device in real
ModifyCnt int
time every time the face information is
modified(nvr only)
Image2 "base64(imgData)" string Face capture pictures
Image4 "base64(imgData)" string Background capture pictures
Name "Mike" string Name (nvr only)
Country "China" string Country(nvr only)
Nation "Han" string Nation(nvr only)
NativePlace "Guangdong,Zhuhai" string Native Place(nvr only)
IdCode "415025199203050916 string ID card(nvr only)
328
"
Job "Software" string Job(nvr only)
Phone "12345678902" string Phone(nvr only)
Email "[email protected]" string Email(nvr only)
"Guangdong,Zhuhai,Xi Current address(nvr only)
Domicile string
angzhou ..."
"Detail of this Comment(nvr only)
Remark string
person ..."
FtVersion
{"result":"success","data":{"EventType":"VideoMotion","EventTime":"2022-5-26
11:6:3","EventAction":"start","DeviceName":"SSC339G","IPAddress":"172.16.11.170",
"MacAddress":"5C-F2-07-49-0F-24"}}
MOTION notification:
{
"EventType":"VideoMotion",
"EventTime":"2022-4-14 9:12:46",
"EventAction":"start",
"ChannelName":"badroom",
" DeviceName":"IPC_123",
"IPAddress":"172.16.11.30",
"MACAddress":"fe80::223:63ff:fe0a:901b"
}
329
Sound notification:
{
"EventType":"SoundDetect",
"EventTime":"2022-4-14 9:12:46",
"EventAction":"start",
"ChannelName":"badroom",
" DeviceName":" IPC_123",
"IPAddress":"172.16.11.30",
" MACAddress ":"fe80::223:63ff:fe0a:901b"
}
Intelligence notification:
{
"EventType":" LCD ",
"EventTime":"2022-4-14 9:12:46",
"EventAction":"start",
"ChannelName":"badroom",
" DeviceName":"IPC_123",
"IPAddress":"172.16.11.30",
" MACAddress ":"fe80::223:63ff:fe0a:901b"
" PicData" ":{
"SnapedObjInfo":[
{
"Chn":0,
"StrChn":"CH1",
"StartTime":1649936559,
"EndTime":1649936569,
"SnapId":54,
"Type":1,
"ObjectImage":
"Background":
}
]
}
}
POST
URL POST /API/HttpListening/KeepLive
Description The device initiates a live request to the client server
Request Body See Table -1.1.1.4
330
Successful Response The successful result response that described in 2.5
Example:
Request message:
The client receives IPC data when alarm triggered
POST /API/HttpListening/KeepLive HTTP/1.1
Host: 172.16.8.63:123
Accept: */*
Content-Type: application/json;charset=UTF-8
Content-Length: 30
Response message:
{"result":"success","data":{}}
16 Custom
16.1 Push server
Get
URL POST /API/Custom/PushConfig/Get
Description Get the push server parameters
Request Body none
Successful Response Show as Table-16.1.1
Set
URL POST /API/Custom/PushConfig/Set
Description Set the push server parameters
Request Body Show as Table-16.1.1
Successful Response The successful result response that described in 2.5
Table-16.1.1
KEY VALUE COMMENT
RANGE TYPE
server Max length:128byte string Server address
port 0~65535 int Server port
331
16.2 Shared Cloud(A01only
GET
URL POST /API/StorageConfig/SharedCloud/Get
Description It is used to get the Shared Cloud parameters
Request Body none
Successful Response Shared Cloud JSON( show as follow Table-16.2.1 )
SET
URL POST /API/StorageConfig/SharedCloud/Set
Description It is used to set the Shared Cloud parameters
Request Body Shared Cloud JSON( show as follow Table-16.2.1 )
Successful Response The successful result response that described in 2.5
Table-16.3.1
KEY VALUE COMMENT
RANGE TYPE
sub_type "manual_capture" string
"start_manual_record"
"stop_manual_record"
"picture_backup"
“write_logstr”
channel “CH1”…”CH1x” string array
“IP_CH1”…”
IP_CH1x”
“WIFI_CH1”…”
332
WIFI_CH1x”
The number of
channels depends on
the capabilities of the
device.
detail_log string
POST
URL POST /API/Maintenance/CloudUpgrade/Upgrade
Description Upgrade system new version
Request Body show as follow Table-16.4.3
Successful Response The successful result response that described in 2.5
GET
URL POST /API/Maintenance/CloudUpgrade/Upgrade/Progress
Description Cloud upgrade progress
Request Body NULL
Successful Response show as follow Table-11.10.4
333
upgrade_memory_not_enough /*memory not enough*/
upgrade_file_error /*file error*/
upgrade_upgrade_succeed /*upgrading succeed*/
upgrade_parameter_error /*parameter error*/
upgrade_no_u_disc /*no u disk*/
upgrade_no_upgrade_software /*no software upgrading*/
upgrade_software_is_new /*no need upgrading if firmware is
latest version */
upgrade_software_packet_error /* Error in package operation */
upgrade_language_version_error /* Error in firmware language */
upgrade_file_name_too_long
upgrade_failed /*upgrading failed*/
upgrade_exit
upgrade_uncipher
upgrade_download_faild /*downloading failed*/
upgrade_download_network_error /*network error*/
upgrade_environmentvar_different /* Startup parameters with
updating*/
upgrade_usbtype_error /*udisk format error*/
Table-16.4.1(Cloud Upgrade)
KEY VALUE COMMENT
RANGE TYPE
is_detect bool ture: Detect; false:only get data, not Detect
SET
URL POST /API/Maintenance /DevelopMode /Set
Description It is used to set the develop parameters
Request Body ( show as follow Table-16.5.1 )
Successful Response The successful result response that described in 2.5
Token
URL POST /API/Maintenance /DevelopMode/Token
Description Get token
Request Body none
Successful Response The successful result response that described in 2.5, X-Download-Token
return at respond header
Download
URL POST /API/Maintenance /DevelopMode /Download
Description It is used to set the develop parameters
Request Body ( show as follow Table-16.5.2 )
Successful Response The successful result response that described in 2.5
Table16.5.1
KEY VALUE COMMENT
RANGE TYPE
enable_sdk_log bool Switch of Sdk log
enable_cloud_lo Switch of cloud log
bool
g
enable_dev_log bool Switch of device log
Table-16.5.2
KEY VALUE COMMENT
RANGE TYPE
x-download-token 0-32 string Token value
x-csrftoken string csrftoken
335
16.6Cert Manage(A01 only)
SET
URL POST /API/NetworkConfig/CertManage/Set
Description It is used to install or uninstall cert
Request Body ( show as follow Table-16.6.1 )
Successful Response The successful result response that described in 2.5
Table16.6.1
KEY VALUE COMMENT
RANGE TYPE
cert_info json Certificate,check in 16.6.2
Table16.6.2
KEY VALUE COMMENT
RANGE TYPE
cloud json Certificate,check in 16.6.3
sdk json
device json
Table-16.6.3
KEY VALUE COMMENT
RANGE TYPE
operate "Upload ""Restore" string Set need
root_cert 0-4096 string Uninstall not need
0-2048 string Uninstall not need, Device
local_cert
type not need
0-2048 string Uninstall not need, Device
local_private_key
type not need
0-128 string Uninstall not need, Device
local_private_key_passwd
type not need
true false bool Uninstall not need.When the
root certificate contains an
install_unsafe_cert invalid certificate or the
certificate is unsafe, the user
chooses whether to install it.
SET
URL POST /API/SystemConfig/Zero/Set
Description Set System Zero Channel Information
Request Body Zero Channel information JSON (show as follow Table-16.7.1)
Successful Response The successful result response that described in 2.5
337
on the capabilities of the device.
SET
URL POST /API/ PreviewChannel/ZeroChnState/Set
Description Set PreviewChannel Zero Channel State Information
Request Body Zero Channel State information JSON (show as follow Table-16.8.1)
Successful Response The successful result response that described in 2.5
SET
URL POST /API/SystemConfig/ Serail/Set
Description Set System Serail Information
Request Body Serail information JSON (show as follow Table-16.9.1)
Successful Response The successful result response that described in 2.5
339
Table-16.10.3 (Single Channel Information JSON)
KEY VALUE COMMENT
RANGE TYPE
force_iframe false:off, true:on bool If force frame
stream_type "Mainstream","Substream" string Stream type
Example:
Request message:
POST /API/ForceIFrame/Set HTTP/1.1
{
"data": {
"channel_info": {
"CH1": {
"force_iframe": true,
"stream_type": "Mainstream"
},
"IP_CH1": {
"force_iframe": true,
"stream_type": "Mainstream"
}
}
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 30
{
"result": "success",
"data": {}
}
17 AI
17.1 Setup
340
17.1.1 Face Detection
GET
URL POST /API/AI/Setup/FD/Get
Description It is used to get the FD config parameters
Request Body See Table -17.1.1.1
Successful Response Channel Information JSON (show as follow Table-17.1.1.2)
SET
URL POST /API/AI/Setup/FD/Set
Description It is used to set theFD parameters
Request Body Channel Information JSON (show as follow Table-17.1.1.2)
Successful Response The successful result response that described in 2.5
24
Table-17.1.1.x (Channel Information JSON)
KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-17.1.1.3
… Json Object
IP_CH1 Json Object
341
… Json Object
WIFI_CH1 Json Object
… Json Object
The number of
channels depends on
the capabilities of the
device.
"5s","10s","20s", Alarm latch tijme :Ipc value 5 10 20 30
latch_time string
"30s"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm out channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"OFF","5s","10s", Post recording time Ipc value 0 5 10 20 30
post_recording string
"20s","30s"
send_email true, false bool Send Email switch
switch,false: close
switch true, false bool
true: open
" RealTimeMode " Snap mode,
"OptimalMode" IntervalMode JSON show as follow Table-
snap_mode string
"IntervalMode" 17.1.1.4
Example:
Request message:
POST /API/AI/Setup/FD/Get HTTP/1.1
{
"version": "1.0",
“data”:{
"channel":["CH1"]
}
}
Response message:
{
"result": "success",
344
"data": {
"channel_info": {
"CH1": {
"status": "Online",
"switch": true,
"snap_mode": "IntervalMode",
"snap_num": "Unlimited",
"snap_frequency": 2,
"min_pixel": 64,
"max_pixel": 320,
"face_enhance": true,
"face_attribute ": true,
"apply_mode": "MultiiView",
"roll_range": 180,
"pitch_range": 180,
"yaw_range": 180,
"picture_quality": 100,
"frontal_roll_range": 30,
"frontal_pitch_range": 30,
"frontal_yaw_range": 45,
"frontal_blur_stage": 100,
"multi_roll_range": 180,
"multi_pitch_range": 180,
"multi_yaw_range": 180,
"multi_blur_stage": 100,
"detection_mode": "StaticMode",
"rule_info": {
"rule_number1": {
"rule_type": "A->B",
"rule_kind": "Rect",
"detection_range": "FullScreen",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 575,
"y3": 575,
"y4": 0
}
}
}
}
}
}
345
}
GET
URL POST /API/AI/Setup/PVD/Get
Description It is used to get the PD config parameters
Request Body See Table -17.1.2.1
Successful Response Channel Information JSON (show as follow Table-17.1.2.2)
SET
URL POST /API/AI/Setup/PVD/Set
Description It is used to set thePD parameters
Request Body Channel Information JSON (show as follow Table-17.1.2.2)
346
channel_max int Maximal channel number
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm out latch time
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm out channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Post recording
post_recording string
"300"
send_email true, false bool Send Email switch
bool Switch for channel capature FTP
ftp_picture_upload true, false
uploading(NVR only)
bool Switch for channel recording FTP
ftp_video_upload true, false
uploading(NVR only)
347
bool Switch for picture uploading(NVR
picture_to_cloud true, false
only)
Switch for video cloud uploading
video_to_cloud true, false bool
(NVR only)
full_screen bool FullScreen switch(NVR only)
"0","10","20","40", Buzzer working time(NVR only)
Buzzer string
"60"
show_message true, false bool Show Message switch(NVR only)
switch,false: close
switch true, false bool
true: open
sensitivity 0-100 int Sensitivity detection(IPC G2)
"Low","Medium","Hi Sensitivity detection (IPC G1)
sensitivity string
gh"
"Default" Snap mode,
"RealTimeMode" IntervalMode JSON show as follow Table-
snap_mode string
"IntervalMode" 17.1.2.4
348
Table-17.1.2.6 (rule_number Information JSON)
"FullScreen" Detection range
detection_range "Customize" string
Example:
Request message:
POST /API/AI/Setup/PVD/Get HTTP/1.1
{
"version":"1.0",
“data”:{
"channel":["CH1"],
"page_type":"ChannelConfig"
}
Response message:
349
{
"result": "success",
"data": {
"channel_info": {
"CH1":{
"switch": false,
"snap_mode": "IntervalMode",
"snap_num": "1",
"snap_frequency": 2,
"min_pixel": 64,
"max_pixel": 320,
"sensitivity": 60,
"detection_type": "Pedestrian",
"detection_mode": "StaticMode",
"rule_info": {
"rule_number1": {
"detection_range": "FullScreen",
"rule_rect": {
"x1": 1,
"y1": 1,
"x2": 0,
"y2": 576,
"x3": 704,
"y3": 576,
"x4": 704,
"y4": 0
}
}
}
}
}
}
}
Request message:
POST /API/AI/Setup/PVD/Get HTTP/1.1
{
"version":"1.0",
"channel":["CH2"],
"page_type":"AlarmConfig"
}
Response message:
{
350
"result": "success",
"data": {
"channel_info": {
"CH2": {
"buzzer": "0",
"alarm_out": [
"Local->1",
"IP_CH2->1",
"IP_CH3->1",
"IP_CH5->1"
],
"latch_time": "10",
"record_enable": true,
"record_channel": [
"CH2"
],
"post_recording": "30",
"show_message": true,
"send_email": true,
"full_screen": false,
"ftp_picture_upload": true,
"ftp_video_upload": false,
"picture_to_cloud": true,
"video_to_cloud": false
}
}
}
}
GET
URL POST /API/AI/Setup/PID/Get
Description It is used to get the PID config parameters
Request Body See Table -17.1.3.1
Successful Response Channel Information JSON (show as following Table-17.1.3.2)
SET
URL POST /API/AI/Setup/PID/Set
Description It is used to set thePID parameters
Request Body Channel Information JSON (show as following Table-17.1.3.2)
Successful Response The successful result response that described in 2.5
351
Error_Code Response Error Information JSON (show as following Table-17.1.3.7)
(cloud_video_upload_chn_limitreturn information attached to error code)
352
, channels.
“Nonsupport” Note: no such strings when the channel is
online
“Local->1”… Alarm output channel
”Local->x”
“IP_CH1->1”… Each array bit represents aalarm output channel
“IP_CH1->2”… with a string.
” IP_CHx->1” Camera:
alarm_out ” IP_CHx->2” array Local->1:enable null: disable
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm output time
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Recording time-lapse
post_recording string
"300"
send_email true, false bool Send Email switch
bool Channel capture FTP upload switch
ftp_picture_upload true, false
(NVR specific)
bool Channel recording FTP upload
ftp_video_upload true, false
switch (NVR specific)
bool Picture Cloud upload switch (NVR
picture_to_cloud true, false
specific)
Video Cloud upload switch (NVR
video_to_cloud true, false bool
specific)
full_screen bool FullScreenswitch (NVR specific)
"0","10","20","40", Buzzer beeping time (NVR specific)
buzzer string
"60"
show_message bool Show Message switch (NVR specific)
PID enable switch, false: close
switch true, false bool
true: open.
"Motion" Detection type, human and vehicle(Normal
"Pedestrian" detection type)
detection_type string
"Vehicle"
"Pedestrian &Vehicle"
“Pedestrian” Detection type, pedestrian, motor vehicle and
detection_type array
"Motor Vehicle" non-motor vehicle(machine not human type)
353
"Non-motorized
Vehicle"
sensitivity 1-4 int Detection sensitivity
0 not draw lines Whether the preview and playback will
iva_lines bool
1 draw lines appear the lines
JSON Single Channel Information JSON show as
rule_info
object following Table-17.1.3.4
354
pload_num EO_RECORD_NUM cloud video upload
Example:
Request message:
POST /API/AI/Setup/PID/Get HTTP/1.1
{
"version": "1.0",
“data”:{
"channel":["CH1"]
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {
"channel_info": {
"CH1": {
"status": "Online",
"switch": false,
"sensitivity": 2,
"detection_type": "Off",
"latch_time": "5",
"post_recording": "5",
"alarm_out": [],
"send_email": false,
"record_enable": false,
"rule_info": {
"rule_number1": {
"rule_switch": false,
"rule_type": "A->B",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
355
}
},
"rule_number2": {
"rule_switch": false,
"rule_type": "A->B",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
},
"rule_number3": {
"rule_switch": false,
"rule_type": "A->B",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
},
"rule_number4": {
"rule_switch": false,
"rule_type": "A->B",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
}
356
}
}
}
}
}
GET
URL POST /API/AI/Setup/LCD/Get
Description It is used to get the LCD config parameters
Request Body See Table -17.1.4.1
Successful Response Channel Information JSON (show as following Table-17.1.4.2)
SET
URL POST/API/AI/Setup//LCD/Set
Description It is used to set theLCD parameters
Request Body Channel Information JSON (show as following Table-17.1.4.2)
Successful Response The successful result response that described in 2.5
Error_Code Response Error Information JSON (show as following Table-17.1.4.7)
(cloud_video_upload_chn_limit (return information attached to error code))
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm output time
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120","3 Recording time-lapse
post_recording string
00"
358
send_email true, false bool Send Email switch
bool Channel capture FTP upload switch (NVR
ftp_picture_upload true, false
only)
bool Channel recording FTP upload switch
ftp_video_upload true, false
(NVR only)
picture_to_cloud true, false bool Picture Cloud upload switch (NVR only)
video_to_cloud true, false bool Video Cloud upload switch (NVR only)
full_screen bool FullScreen Switch (NVR only)
"0","10","20","40", Buzzer beeping time (NVR only)
buzzer string
"60"
show_message bool Show Message Switch(NVR only)
Switch,false: close
switch true, false bool
true: open
sensitivity 1-4 int Detection sensitivity
"Motion" Detection type, pedestrian and vehicle(normal
"Pedestrian" detection type)
detection_type string
"Vehicle"
"Pedestrian &Vehicle"
“Pedestrian” Detection type, pedestrian, motor vehicle and
"Motor Vehicle" non-motor vehicle(machine not human type)
detection_type array
"Non-motorized (ipc AI II version only)
Vehicle"
0 not draw lines Live and playback whether shows line or
iva_lines int
1 draw lines not (ipc AI II version only)
JSON Single Channel Information JSON show as
rule_info
object following Table-17.1.4.4
359
coordinates, that is 32 lines. If it is
an accompanying line, only the first
line is used. If it is a perimeter, these
8 lines are connected in sequence to
form a closed figure
Information JSON show as following Table-
17.1.4.6
Example:
Request message:
POST /API/AI/Setup/LCD/Get HTTP/1.1
{
"version": "1.0",
“data”:{
"channel":["IP_CH2"]
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"IP_CH2": {
"status": "Online",
"switch": false,
"sensitivity": 2,
"latch_time": "5",
"post_recording": "10",
360
"send_email": false,
"record_enable": false,
"alarm_out": [],
"rule_info": {
"rule_number1": {
"rule_switch": false,
"rule_type": "A->B",
"rule_line": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0
}
},
"rule_number2": {
"rule_switch": false,
"rule_type": "A->B",
"rule_line": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0
}
},
"rule_number3": {
"rule_switch": false,
"rule_type": "A->B",
"rule_line": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0
}
},
"rule_number4": {
"rule_switch": false,
"rule_type": "A->B",
"rule_line": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0
}
}
361
}
}
}
}
}
GET
URL POST/API/AI/Setup/CrossCount/Get
Description It is used to get the CC config parameters
Request Body See Table -17.1.5.1
Successful Response Channel Information JSON (show as following Table-17.1.5.2)
SET
URL POST /API/AI/Setup/CrossCount/Set
Description It is used to set the CC parameters
Request Body Channel Information JSON (show as following Table-17.1.5.2)
Successful Response The successful result response that described in 2.5
Error_Code Response Error Information JSON (show as following Table-17.1.5.8)
(cloud_video_upload_chn_limit return information attached to error code)
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm output time Ipc value 5 10 20 30
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Recording time-lapse,Ipc value 0 5 10 20
post_recording string
"300" 30
send_email true, false bool Send Email switch
363
bool Channel capture FTP upload switch(NVR
ftp_picture_upload true, false
only)
bool Channel recording FTP upload
ftp_video_upload true, false
switch(NVR only)
picture_to_cloud true, false bool Picture Cloud upload switch(NVR only)
video_to_cloud true, false bool Video Cloud upload switch(NVR only)
full_screen bool FullScreenswitch(NVR only)
"0","10","20","40", Buzzer beeping time(NVR only)
buzzer string
"60"
show_message bool Show Message switch(NVR only)
switch,false: close
switch true, false bool
true: open
"Motion" Rule type: 0-motion 1- Person 2
"Person" string veichle(Normal detection type)
"Vehicle"
"Motion" Detection type, pedestrian, motor vehicle and
type
“Pedestrian” non-motor vehicle(machine not human type)
"Motor Vehicle" string
"Non-motorized
Vehicle"
“Pedestrian” Detection type, pedestrian, motor vehicle
"Motor Vehicle" and non-motor vehicle(machine not human
detection_type array
"Non-motorized type)
Vehicle"
The number of alarms, if exceeds the
alarm_num 1 - 255 int
number, an alarm will be issued
start_time string Starting time
end_time string Ending time
true: clear the analysis data of the line
reset_count true, false bool
crossing statistics
sensitivity 1-4 int Detection sensitivity
Object Information JSON show as following
rule_info
Table-17.1.5.5
364
Table-17.1.5.7
rectangle, Information JSON show as following
rule_rect Object
Table-17.1.5.8
Example:
Request message:
POST /API/AI/Setup/CrossCount/Get HTTP/1.1
{
"version": "1.0",
“data”:{
"page_type":"ChannelConfig "
}
365
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH5": {
"switch": false,
"type": "Person",
"alarm_num": 1,
"start_time": "03:00:00",
"end_time": "22:22:22",
"reset_count": false,
"rule_info": {
"rule_number1": {
"rule_switch": true,
"rule_type": "A->B",
"rule_line": {
"x1": 585,
"y1": 42,
"x2": 557,
"y2": 538
}
}
}
}
}
}
}
GET
URL POST/API/AI/Setup/HeatMap/Get
Description It is used to get the Heat Map config parameters
Request Body See Table -17.1.6.1
Successful Response Channel Information JSON (show as following Table-17.1.6.2)
SET
URL POST /API/AI/Setup/HeatMap/Set
Description It is used to set the Heat Map parameters
366
Request Body Channel Information JSON (show as following Table-17.1.6.2)
Successful Response The successful result response that described in 2.5
367
Table-17.1.6.5 (rule_info Information JSON)
Rule number 1,Information JSON show as
rule_number1 Object
following Table-17.1.6.6
Example:
Request message:
POST /API/AI/Setup/CrossCount/Get HTTP/1.1
{
"version": "1.0",
“data”:{
"channel":["CH5"]
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH5": {
"switch": true,
"rule_info": {
"rule_number1": {
"rule_switch": true,
"rule_rect": {
"x1": 8,
368
"y1": 3,
"x2": 699,
"y2": 7,
"x3": 698,
"y3": 557,
"x4": 5,
"y4": 562
}
}
}
}
}
}
}
GET
URL POST/API/AI/Setup/SOD/Get
Description It is used to get the SOD config parameters
Request Body See Table -17.1.7.1
Successful Response Channel Information JSON (show as following Table-17.1.7.2)
SET
URL POST /API/AI/Setup/SOD/Set
Description It is used to set theSOD parameters
Request Body Channel Information JSON (show as following Table-17.1.7.3)
Successful Response Like example
Error_Code Response Error Information JSON (show as following Table-17.1.7.7)
(cloud_video_upload_chn_limitreturn information attached to error code)
369
“AlarmConfig” channel configuration page or an alarm
configuration page
The number of
channels depends on
the capabilities of the
device.
370
"10","20","40", Alarm output time
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Recording time-lapse
post_recording string
"300"
send_email true, false bool Send Email switch
bool Channel capture FTP upload
ftp_picture_upload true, false
switch(NVR only)
bool Channel recording FTP upload
ftp_video_upload true, false
switch(NVR only)
bool Picture Cloud upload switch(NVR
picture_to_cloud true, false
only)
video_to_cloud true, false bool Video Cloud upload switch(NVR only)
full_screen bool FullScreenswitch(NVR only)
"0","10","20","40" Buzzer beeping time(NVR only)
buzzer string
,"60"
show_message bool Show Message switch(NVR only)
switch,false: close
switch true, false bool
true: open
sensitivity 1-4、0-100 int Detection sensitivity
"Default" Snapshot mode,
"RealTimeMode" IntervalMode JSON show as following
snap_mode string
"IntervalMode" Table-17.1.7.4
372
analog_channel_is_ 0~MAX_ANALOG_ The analog channel number of which the
array
used CHN intelligent switch has enabled
max_intelligent_ana The maximum number of analog channels
1 int
log_channel_num supported by the intelligent switch
Example:
Request message:
POST/API/AI/Setup/SOD/Get HTTP/1.1
{
"version": "1.0",
“data”:{
"channel":["IP_CH2"]
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH1": {
"status": "Online",
"switch": false,
"sensitivity": 2,
"latch_time": "5",
"post_recording": "10",
"send_email": false,
"record_enable": false,
"alarm_out": [],
"rule_info": {
"rule_number1": {
"rule_switch": false,
"rule_type": "Legacy",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
373
}
},
"rule_number2": {
"rule_switch": false,
"rule_type": "Legacy",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
},
"rule_number3": {
"rule_switch": false,
"rule_type": "Legacy",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
},
"rule_number4": {
"rule_switch": false,
"rule_type": "Legacy",
"rule_rect": {
"x1": 0,
"y1": 0,
"x2": 0,
"y2": 0,
"x3": 0,
"y3": 0,
"x4": 0,
"y4": 0
}
}
374
}
}
}
}
}
GET
URL POST /API/AI/Setup/CD/Get
Description It is used to get the CD config parameters
Request Body See Table -17.1.8.1
Successful Response Channel Information JSON (show as following Table-17.1.8.2)
SET
URL POST /API/AI/Setup/CD/Set
Description It is used to set theCD parameters
Request Body Channel Information JSON (show as following Table-17.1.8.2)
Successful Response The successful result response that described in 2.5
375
Table-17.1.8.x (Channel Information JSON)
KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as following Table-17.1.8.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object
The number of
channels depends on
the capabilities of the
device.
"5","10","20", Alarm output time
latch_time string
"30"
record_enable true, false bool Record channel switch
"30","60","120", Recording time-lapse
post_recording string
"300"
send_email true, false bool Send Email switch
ftp_picture_upload true, false bool Channel capture FTP upload switch
bool Channel recording FTP upload
ftp_video_upload true, false
switch
picture_to_cloud true, false bool Picture Cloud upload switch
light_linkage true, false bool Alarm linkage switch
CD ENABLE switch,false: close
switch true, false bool
true: open
376
sensitivity 1-4 int Detection sensitivity
0 not draw lines Whether the preview and playback will
iva_lines bool
1 draw lines appear the lines
max_pixel 320-1080 int Maximum resolution
min_pixel 64-1080 int Minimum resolution
max_detection_num 1-100 int Detection number alarm threshold
Detection range
"FullScreen"
detection_range string /*0 : Full Screen mode , 1 : Customize
"Customize"
mode*/
JSON Single Channel Information JSON show as
rule_info
object following Table-17.1.8.4
377
y8 0-576 short y8 coordinates
Example:
Request message:
POST /API/AI/Setup/PID/Get HTTP/1.1
{
"version": "1.0",
“data”:{
"channel":["CH1"]
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {"channel_info": {"CH1": {
"status": "Online",
"switch": false,
"sensitivity": 2,
"iva_lines": true,
"max_pixel": 640,
"min_pixel": 64,
"max_detection_num": 50,
"rule_info": {"rule_number1": {
"rule_switch": true,
"rule_rect": {
"x1": 31,
"y1": 20,
"x2": 38,
"y2": 532,
"x3": 597,
"y3": 529,
"x4": 590,
"y4": 338,
"x5": 405,
"y5": 349,
"x6": 404,
"y6": 481,
"x7": 320,
"y7": 478,
378
"x8": 315,
"y8": 18
}
}}
}}}
}
GET
URL POST /API/AI/Setup/QD/Get
Description It is used to get the QD config parameters
Request Body See Table -17.1.9.1
Successful Response Channel Information JSON (show as following Table-17.1.9.2)
SET
URL POST /API/AI/Setup/QD/Set
Description It is used to set theQD parameters
Request Body Channel Information JSON (show as following Table-17.1.9.2)
Successful Response The successful result response that described in 2.5
379
Table-17.1.9.x (Channel Information JSON)
KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as following Table-17.1.9.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object
The number of
channels depends on
the capabilities of the
device.
"5","10","20", Alarm output time
latch_time string
"30"
record_enable true, false bool Record channel switch
"30","60","120", Recording time-lapse
post_recording string
"300"
send_email true, false bool Send Email switch
ftp_picture_upload true, false bool Channel capture FTP upload switch
bool Channel recording FTP upload
ftp_video_upload true, false
switch
picture_to_cloud true, false bool Picture Cloud upload switch
light_linkage true, false bool Alarm linkage switch
QD enable switch,false: close
switch true, false bool
true: open
380
sensitivity 1-4 int Detection sensitivity
0 not draw lines Whether the preview and playback will
iva_lines bool
1 draw lines appear the lines
max_pixel 320-1080 int Maximum resolution
min_pixel 64-1080 int Minimum resolution
max_detection_num 1-100 int Detection number alarm threshold
Single person processing time alarm
max_pro_time 1-3600 int
threshold
Detection range
"FullScreen"
detection_range string /*0 : Full Screen mode , 1 : Customize
"Customize"
mode*/
JSON Single Channel Information JSON show as
rule_info
object following Table-17.1.9.4
381
y7 0-576 short y7 coordinates
x8 0-704 short x8 coordinates
y8 0-576 short y8 coordinates
Example:
Request message:
POST /API/AI/Setup/PID/Get HTTP/1.1
{
"version": "1.0",
“data”:{
"channel":["CH1"]
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {"channel_info": {"CH1": {
"status": "Online",
"switch": false,
"sensitivity": 2,
"iva_lines": true,
"max_pixel": 640,
"min_pixel": 64,
"max_detection_num": 10,
"max_pro_time": 10,
"rule_info": {"rule_number1": {
"rule_switch": true,
"rule_rect": {
"x1": 36,
"y1": 96,
"x2": 59,
"y2": 356,
"x3": 170,
"y3": 361,
"x4": 170,
"y4": 472,
"x5": 465,
"y5": 472,
"x6": 496,
382
"y6": 337,
"x7": 446,
"y7": 180,
"x8": 133,
"y8": 106
}
}}
}}}
}
GET
URL POST /API/AI/Setup/LPD/Get
Description It is used to get the LPD config parameters
Request Body See Table -17.1.10.1
Successful Response Channel Information JSON (show as following Table-17.1.10.2)
SET
URL POST /API/AI/Setup/LPD/Set
Description It is used to set the LPD parameters
Request Body Channel Information JSON (show as following Table-17.1.10.2)
Successful Response The successful result response that described in 2.5
The number of
channels depends
on the capabilities
of the device.
"10","20","40", Alarm output time
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
record_channel “IP_CH1”…” array Channel alarm linkage switch.
IP_CH1x”
384
“WIFI_CH1”…”
"0","5","10", Recording time-lapse
post_recording string
"20","30"
send_email true, false bool Send Email switch
bool Channel capture FTP upload
ftp_picture_upload true, false
switch(NVR only)
bool Channel recording FTP upload
ftp_video_upload true, false
switch(NVR only)
bool Picture Cloud upload switch(NVR
picture_to_cloud true, false
only)
video_to_cloud true, false bool Video Cloud upload switch(NVR only)
full_screen bool FullScreenswitch(NVR only)
"0","10","20","40", Buzzer beeping time(NVR only)
buzzer string
"60"
show_message true, false bool Show Message switch(NVR only)
switch,false: close
switch true, false bool
true: open
sensitivity 0-100 int Detection sensitivity
"Default" Snapshot mode,
"RealTimeMode" IntervalMode JSON show as following Table-
snap_mode string
"IntervalMode" 17.1.10.4
0 not draw lines Whether the preview and playback will appear
iva_lines int
1 draw lines the lines
lpd_enhance bool Licence plate detection enhance
day_enhance_level 0-255 int Increase level during the day
night_enhance_level 0-255 Int Increase level at night
Information JSON show as following Table-
rule_info Object
17.1.10.5
385
Table-17.1.10.5 (rule_info Information JSON)
Rule number 1,Information JSON show as
rule_number1 Object
following Table-17.1.10.6
Example:
Request message:
POST /API/AI/Setup/PVD/Get HTTP/1.1
{
"version":"1.0",
“data”:{
"channel":["CH1"],
"page_type":"ChannelConfig"
}
Response message:
{
386
"result": "success",
"data": {
"channel_info": {
"CH1":{
"switch": false,
"snap_mode": "IntervalMode",
"snap_num": "1",
"snap_frequency": 2,
"min_pixel": 64,
"max_pixel": 320,
"sensitivity": 60,
"detection_type": "Pedestrian",
"detection_mode": "StaticMode",
"rule_info": {
"rule_number1": {
"detection_range": "FullScreen",
"rule_rect": {
"x1": 1,
"y1": 1,
"x2": 0,
"y2": 576,
"x3": 704,
"y3": 576,
"x4": 704,
"y4": 0
}
}
}
}
}
}
}
Request message:
POST /API/AI/Setup/PVD/Get HTTP/1.1
{
"version":"1.0",
"channel":["CH2"],
"page_type":"AlarmConfig"
}
Response message:
{
"result": "success",
387
"data": {
"channel_info": {
"CH2": {
"buzzer": "0",
"alarm_out": [
"Local->1",
"IP_CH2->1",
"IP_CH3->1",
"IP_CH5->1"
],
"latch_time": "10",
"record_enable": true,
"record_channel": [
"CH2"
],
"post_recording": "30",
"show_message": true,
"send_email": true,
"full_screen": false,
"ftp_picture_upload": true,
"ftp_video_upload": false,
"picture_to_cloud": true,
"video_to_cloud": false
}
}
}
}
GET
URL POST /API/AI/Setup/RSD/Get
Description It is used to get the RSD config parameters
Request Body See Table -17.1.1.1
Successful Response Channel Information JSON (show as following Table-17.1.1.2)
SET
URL POST /API/AI/Setup/RSD/Set
Description It is used to set the RSD parameters
Request Body Channel Information JSON (show as following Table-17.1.1.2)
388
Successful Response The successful result response that described in 2.5
389
“Local->1”… Alarm output channel
”Local->x”
“IP_CH1->1”… Each array bit represents aalarm output channel
“IP_CH1->2”… with a string.
” IP_CHx->1” Camera:
alarm_out ” IP_CHx->2” array Local->1:enable null: disable
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Alarm output time
latch_time string
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Alarm output channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"0","5","10", Recording time-lapse
post_recording string
"20","30"
send_email true, false bool Send Email switch
ftp_picture_upload true, false bool Channel capture FTP upload switch(NVR only)
bool Channel recording FTP upload switch(NVR
ftp_video_upload true, false
only)
picture_to_cloud true, false bool Picture Cloud upload switch(NVR only)
video_to_cloud true, false bool Video Cloud upload switch(NVR only)
full_screen bool FullScreenswitch(NVR only)
"0","10","20","40", Buzzer beeping time(NVR only)
buzzer string
"60"
show_message true, false bool Show Message switch(NVR only)
switch,false: close
switch true, false bool
true: open
sensitivity 1-100 int Detection sensitivity
“Baby Crying Sound” Detection type, Baby crying, dog barking,
detection_type "Dog Barking" array gunshot
"Gunshot"
Example:
Request message:
POST /API/AI/Setup/PVD/Get HTTP/1.1
{
"version":"1.0",
390
“data”:{
"channel":["CH1"],
"page_type":"ChannelConfig"
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH1":{
"switch": false,
"snap_mode": "IntervalMode",
"snap_num": "1",
"snap_frequency": 2,
"min_pixel": 64,
"max_pixel": 320,
"sensitivity": 60,
"detection_type": "Pedestrian",
"detection_mode": "StaticMode",
"rule_info": {
"rule_number1": {
"detection_range": "FullScreen",
"rule_rect": {
"x1": 1,
"y1": 1,
"x2": 0,
"y2": 576,
"x3": 704,
"y3": 576,
"x4": 704,
"y4": 0
}
}
}
}
}
}
}
Request message:
POST /API/AI/Setup/PVD/Get HTTP/1.1
391
{
"version":"1.0",
"channel":["CH2"],
"page_type":"AlarmConfig"
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH2": {
"buzzer": "0",
"alarm_out": [
"Local->1",
"IP_CH2->1",
"IP_CH3->1",
"IP_CH5->1"
],
"latch_time": "10",
"record_enable": true,
"record_channel": [
"CH2"
],
"post_recording": "30",
"show_message": true,
"send_email": true,
"full_screen": false,
"ftp_picture_upload": true,
"ftp_video_upload": false,
"picture_to_cloud": true,
"video_to_cloud": false
}
}
}
}
GET
392
URL POST /API/AI/Setup/AISchedule/Get
Description It is used to get the AI Func Schedule parameters
Request Body none
Successful Response AI Schedule JSON (show as following Table-17.1.12.1)
SET
URL POST /API/AI/Setup/AISchedule/Set
Description It is used to set the AI Func Schedule parameters
Request Body AI Schedule JSON (show as following Table-17.1.12.1)
Successful Response The successful result response that described in 2.5
Table-17.1.12.4(CategoryJSON)
KEY VALUE COMMENT
RANGE TYPE
"fd", Schedule Types Allowed to be Configured
"pvd", Note: Depending on device capabilities, actual
"pid", schedule types may be less than allowable
schedule_type string
"lcd", configurations
"sod",
"cc",
393
"cd",
"qd",
"lpd",
"hm",
“rsd”
Table-17.1.12.5(WeekJSON)
KEY VALUE COMMENT
RANGE TYPE
Sun,Mon,Tue,Wed, Identify the day of the week
day string
Thu,Fri,Sat
0: Closing period Each array bit (int) identifies half an hour.
time array
1: Opening period
Request message:
POST /API/AI/Setup/AISchedule/Get HTTP/1.1
{
"version":"1.0","data":{}
}
Response message:
{"result":"success","data":{"channel_info":{"CH1":{"AI_Schedule":false,"category":[{"schedule_type":"fd","mute
x_type":["pid","lcd","sod","pvd","cc","cd","qd","lpd"],"week":[{"day":"Sun","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Mon","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Tue","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Wed","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Thu","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Fri","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Sat","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]},{"schedule_type":"pvd","mutex_type":["pid","lcd","sod","
fd","cc","cd","qd","lpd"],"week":[{"day":"Sun","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
394
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Mon","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Tue","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Wed","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Thu","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Fri","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Sat","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0]}]},{"schedule_type":"pid","mutex_type":["sod","pvd","fd","cc","cd","qd","lpd"],"week":[{
"day":"Sun","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"
day":"Mon","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"
day":"Tue","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"d
ay":"Wed","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"d
ay":"Thu","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"da
y":"Fri","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day"
:"Sat","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]},{"sche
dule_type":"lcd","mutex_type":["sod","pvd","fd","cc","cd","qd","lpd"],"week":[{"day":"Sun","time":[0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Mon","time":[0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Tue","time":[0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Wed","time":[0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Thu","time":[0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Fri","time":[0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Sat","time":[0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]},{"schedule_type":"sod","mutex_type":["p
id","lcd","pvd","fd","cc","cd","qd","lpd"],"week":[{"day":"Sun","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Mon","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Tue","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Wed","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Thu","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Fri","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Sat","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]},{"schedule_type":"cc","mutex_type":["pid","lcd","sod","pvd","fd","cd",
"qd","lpd"],"week":[{"day":"Sun","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0]},{"day":"Mon","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0]},{"day":"Tue","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0]},{"day":"Wed","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0]},{"day":"Thu","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0]},{"day":"Fri","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0]},{"day":"Sat","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0]}]},{"schedule_type":"cd","mutex_type":["pid","lcd","sod","pvd","fd","cc","qd","lpd"],"week":[{"day":"
Sun","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"
Mon","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"
Tue","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"
Wed","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"
Thu","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"F
ri","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Sat"
395
,"time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]},{"schedule_t
ype":"qd","mutex_type":["pid","lcd","sod","pvd","fd","cc","cd","lpd"],"week":[{"day":"Sun","time":[0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Mon","time":[0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Tue","time":[0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Wed","time":[0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Thu","time":[0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Fri","time":[0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Sat","time":[0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]},{"schedule_type":"lpd","mutex_type":["pi
d","lcd","sod","pvd","fd","cc","cd","qd"],"week":[{"day":"Sun","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Mon","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Tue","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Wed","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Thu","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Fri","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Sat","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]},{"schedule_type":"hm","mutex_type":[],"week":[{"day":"Sun","time":[
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Mon","time":[
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Tue","time":[0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Wed","time":[0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Thu","time":[0,0
,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Fri","time":[0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"day":"Sat","time":[0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]},{"schedule_type":"rsd","mut
ex_type":[],"week":[{"day":"Sun","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0]},{"day":"Mon","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0]},{"day":"Tue","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0]},{"day":"Wed","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0]},{"day":"Thu","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0,0,0,0,0,0,0]},{"day":"Fri","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0]},{"day":"Sat","time":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0]}]}]}}}}
17.2 Recognition
GET
URL POST /API/AI/Model/Get
Description It is used to get the Face Model Configuration parameters
Request Body none
396
Successful Response Model Configuration JSON (show as following Table-17.2.1.1)
SET
URL POST /API/AI/Model/Set
Description It is used to set the Face Model Configuration parameters
Request Body Model Configuration JSON (show as following Table-17.2.1.1)
Successful Response The successful result response that described in 2.5
Response message:
{
"result": "success",
"data": {
"rows": [
{
"channel": "local",
"face_recognition": "------",
"face_detection": "------",
397
"enable_face_recognition": false
},
{
"channel": "CH1",
"face_recognition": "V0.2.0.0.1-release",
"face_detection": "V0.2.1.2.1-release",
"enable_face_recognition": true
}
]
}
}
17.2.2Face Group
GET
URL POST/API/AI/FDGroup/Get
Description It is used to get the Face Group parameters
Request Body See Table -17.2.2.1
Successful Response Face Group JSON (show as following Table-17.2.2.2)
Error_Code Response Error Information JSON (show as following Table-17.2.2.x)
GET
URL POST/API/AI/FDGroup/GetId
Description It is used to get the Face Group id
Request Body See Table -17.2.2.12
Successful Response Face Group JSON (show as following Table-17.2.2.13)
Error_Code Response Error Information JSON (show as following Table-17.2.2.x)
ADD
URL POST /API/AI/FDGroup/Add
Description It is used to add the Face Group parameters
Request Body See Table -17.2.2.3
Successful Response Face Group JSON (show as following Table-17.2.2.2)
Error_Code Response Error Information JSON (show as following Table-17.2.2.x)
Modify
URL POST /API/AI/FDGroup/Modify
Description It is used to modify the Face Group parameters
Request Body Face Group JSON (show as following Table-17.2.2.2)
Successful Response Response JSON (show as following Table-17.2.2.9)
398
Remove
URL POST /API/AI/FDGroup/Remove
Description It is used to remove the Face Group
Request Body Remove Face Group JSON (show as following Table-17.2.2.7)
Successful Response Response JSON (show as following Table-17.2.2.9)
401
255, 255], ...], a total of 48 bits, set a bit to represents recording,
[[255, 255, 255, 255, otherwise no recording
255, 255] ...]
Table-17.2.2.9(Response JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
0,-1,-2,….-23, - Return a result or an error code. See Table-
Result int
24 17.x.x
Table-17.2.2.10
KEY VALUE COMMENT
RANGE TYPE
"Local->1" Local alarm linkage.
"Local->2"
"Local->3"
……
Local string array
The number of Locals
depends on the
capabilities of the
device.
Front-end alarm linkage. IPC JSON show as
Ipc JSON array
following Table-17.2.2.11
402
RANGE TYPE
The channel associated with the front-end alarm
Channel int
output
Indicates which front-end alarm output, the
AlarmOutCnt int
front-end supports 2 alarm outputs
Example:
Request message:
POST /API/AI/FDGroup/Get HTTP/1.1
{
"data": {
"MsgId": null,
"TypeFlags": 1,
"DefaultVal": 0,
"WithInternal": 1,
"SimpleInfo": 0
"GroupsId": [
2,
]
}
}
Response message:
Success:
{
"data": {
"MsgId": null,
"Result": 0,
"Count": 5,
"Group": [
{
"Id": 2,
"Name": "Block List",
"DetectType": 0,
"Policy": 0,
"Enabled": 1,
"CanDel": 0,
"Similarity": 70,
"PolicyConfigs": [
{
"ChnAlarmOut": [
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ],
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ],
...
404
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ]
],
"ChnBuzzerOpt": [0, 1, 1, 2, 3, 4, 0, 1, 1, 3, 2, 2 ],
"LatchTimeOpt": [0, 1, 1, 2, 3, 4, 0, 1, 1, 3, 2, 2 ],
"SaveImg": [255, 255, 255, 255],
"SendEmail": [0, 0, 0, 0],
"UploadToFtp": [255, 255, 255, 255],
"UploadToCloud": [0, 0, 0, 0],
"ShowThumbnail": [255, 255, 255, 255],
"Record": [255, 255, 255, 255],
"Push": [0, 0, 0, 0],
"AlarmSchedule": [
[
[255, 255, 255, 255, 255, 255],
...
],
[
[255, 255, 255, 255, 255, 255],
...
],
...
]
},
{
"ChnAlarmOut": [
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ],
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ],
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ],
...
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ]
],
"ChnBuzzerOpt": [0, 1, 1, 2, 3, 4, 0, 1, 1, 3, 2, 2 ],
"LatchTimeOpt": [0, 1, 1, 2, 3, 4, 0, 1, 1, 3, 2, 2 ],
"SaveImg": [255, 255, 255, 255],
"SendEmail": [0, 0, 0, 0],
"UploadToFtp": [255, 255, 255, 255],
"UploadToCloud": [0, 0, 0, 0],
"ShowThumbnail": [255, 255, 255, 255],
"Record": [255, 255, 255, 255],
"Push": [0, 0, 0, 0],
"AlarmSchedule": [
[
[255, 255, 255, 255, 255, 255],
...
405
],
[
[255, 255, 255, 255, 255, 255],
...
],
...
]
}
],
"EnableChnAlarm": [255, 255, 255, 255],
"AlarmOut": {
"Local": ["Local->1"],
"Ipc": [{
"Channel": 1,
"AlarmOutCnt": 1
}, {
"Channel": 4,
"AlarmOutCnt": 1
}, {
"Channel": 5,
"AlarmOutCnt": 1
}]
}
},
...
]
}
}
Fail:
{
"data": {
"MsgId": null,
"Result": -1,
"Count": 0,
"Group": []
}
}
Example:
Request message:
POST /API/AI/FDGroup/GetId HTTP/1.1
{
"version": "1.0",
"data": {
406
"MsgId": "",
"DefaultVal": 0,
"SimpleInfo": 0,
"TypeFlags": 1,
"WithInternal": 0
}
}
Response message:
Success:
{"data": {
"MsgId": "",
"Result": 0,
"GroupsId": [
2,
3,
4
]
}}
Example:
Request message:
POST /API/AI/FDGroup/Modify HTTP/1.1
{
"data": {
"MsgId": null,
"Group": [
{
"Id": 2,
"Name": "Block List",
"DetectType": 0,
"Policy": 0,
"Enabled": 1,
"CanDel": 0,
"Similarity": 70,
"PolicyConfigs": [
{
"ChnAlarmOut": [
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ],
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ],
...
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ]
],
"ChnBuzzerOpt": [0, 1, 1, 2, 3, 4, 0, 1, 1, 3, 2, 2 ],
"LatchTimeOpt": [0, 1, 1, 2, 3, 4, 0, 1, 1, 3, 2, 2 ],
407
"SaveImg": [255, 255, 255, 255],
"SendEmail": [0, 0, 0, 0],
"UploadToFtp": [255, 255, 255, 255],
"UploadToCloud": [0, 0, 0, 0],
"ShowThumbnail": [255, 255, 255, 255],
"Record": [255, 255, 255, 255],
"Push": [0, 0, 0, 0],
"AlarmSchedule": [
[
[255, 255, 255, 255, 255, 255],
...
],
[
[255, 255, 255, 255, 255, 255],
...
],
...
]
},
{
"ChnAlarmOut": [
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ],
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ],
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ],
...
[ [255, 255, 0, 255], [255, 255, 0, 255], [255, 255, 0, 255] ]
],
"ChnBuzzerOpt": [0, 1, 1, 2, 3, 4, 0, 1, 1, 3, 2, 2 ],
"LatchTimeOpt": [0, 1, 1, 2, 3, 4, 0, 1, 1, 3, 2, 2 ],
"SaveImg": [255, 255, 255, 255],
"SendEmail": [0, 0, 0, 0],
"UploadToFtp": [255, 255, 255, 255],
"UploadToCloud": [0, 0, 0, 0],
"ShowThumbnail": [255, 255, 255, 255],
"Record": [255, 255, 255, 255],
"Push": [0, 0, 0, 0],
"AlarmSchedule": [
[
[255, 255, 255, 255, 255, 255],
...
],
[
[255, 255, 255, 255, 255, 255],
...
408
],
...
]
}
],
"EnableChnAlarm": [255, 255, 255, 255]
},
...
]
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0
}
}
Example:
Request message:
POST /API/AI/FDGroup/Remove HTTP/1.1
{
"data": {
"MsgId": null,
"Group": [
{
"Id": 4,
}
]
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0
}
}
409
17.2.3 Face
ADD
URL POST /API/AI/Faces/Add
Description It is used to add the Faces
Request Body See Table-17.2.3.1
Successful Response Faces Information JSON (show as following Table-17.2.3.5)
Modify
URL POST /API/AI/Faces/Modify
Description It is used to Modify the faces
Request Body See Table-17.2.3.1
Successful Response Faces Information JSON (show as following Table-17.2.3.5)
Change
URL POST /API/AI/FDGroup/Change
Description It is used to Change the group the face belongs to
Request Body Faces JSON (show as following Table-17.2.3.3)
Successful Response Faces Information JSON (show as following Table-17.2.3.5)
Remove
URL POST /API/AI/Faces/Remove
Description It is used to remove the Faces
Request Body Faces JSON (show as following Table-17.2.3.3)
Successful Response Faces Information JSON (show as following Table-17.2.3.5)
GET
URL POST/API/AI/Faces/GetImagesFeature
Description Get Image Feature Value
Request Body Images info JSON( show as following Table-17.2.3.7 )
Successful Response Feature Value info JSON( show as following Table-17.2.3.8)
Table-17.2.3.1
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Count int Add the count of multiple face information
Add Faces JSON show as following Table-
FaceInfo JSON array
17.2.3.2
410
Table-17.2.3.2
KEY VALUE COMMENT
RANGE TYPE
MsgId null
64-bit signed face ID, unique identifier, the Id
Id int field must be valid when modifying face
information
GrpId int Group ID
Time int Starting time
Similarity unsigned int Similarity
Sex int Gender: 0-male, 1-female
Age int Age
Chn int Channel
The number of revisions, the upper layer is read-
ModifyCnt int only, and is updated in real time by the device
every time the face information is modified
It must be specified when adding, which is the
main face image in the database. If "Image1" and
"Feature" are given during Modify, the given
"Image1" and "Feature" will be used directly
Image1 "base64(imgData)" string (note that the feature value version also needs to
be given). If only "Image1" is given, "Feature"
will be recalculated. If "Image1" is not given,
only fields other than "Image1" and "Feature"
will be modified.
Image2 null string This parameter is only valid for real-time alarm
Image3 null string This parameter is only valid for real-time alarm
Feature "base64(feature)" string Characteristics
Feature value version, it is meaningful only when
FtVersion int comparing feature values with the same version,
if return feature value, please return this field
Name "Mike" string Name
Country "China" string Country
Nation "Han" string Nation
NativePlace "Guangdong,Zhuhai" string NativePlace
"41502519920305091 ID card
IdCode string
6"
Job "Software" string Job
Phone "12345678902" string Telephone number
Email "[email protected]" string Email address
"Guangdong,Zhuhai, current residence
Domicile string
Xiangzhou ..."
411
"Detail of this Evaluate
Remark string
person ..."
Special permission control, which controls which
channels the face is allowed to alarm, and uses it
according to the bit position. When the bit
EnableChnAlarm [255, 255, 255, 255] array position is set, it means that the corresponding
channel is allowed to alarm. If this field does not
exist or is empty, it means that special permission
control is not used.
412
D",
"0194F781438F2DE8
FBE5B0469895036D
"]
Example:
Request message:
POST /API/AI/Faces/Add HTTP/1.1
{
"data": {
"MsgId": null,
"Count": 2,
"FaceInfo": [
{
"Id": -1,
"GrpId": 1,
"Time": 0,
"Similarity": 0,
"Sex": 0,
"Age": 26,
"Chn": 0,
413
"ModifyCnt": 0,
"Image1": "base64(imgData)",
"Image2": null,
"Image3": null,
"Feature": "base64(feature)",
"FtVersion": 0
"Name": "Mike",
"Country": "China",
"Nation": "Han",
"NativePlace": "Guangdong,Zhuhai",
"IdCode": "415025199203050916",
"Job": "Software",
"Phone": "12345678902",
"Email": "[email protected]",
"Domicile": "Guangdong,Zhuhai,Xiangzhou ...",
"Remark": "Detail of this person ...",
"EnableChnAlarm": [255, 255, 255, 255]
}
]
}
}
Response message:
{
"data": {
"MsgId": null,
"Count": 2,
"Result": [0, 0],
"Id": [2, 3],
"MD5": ["F74C70ADB0B63B00E279E71B4143704D",
"0194F781438F2DE8FBE5B0469895036D"]
}
}
Example:
Request message:
POST /API/AI/Faces/Remove HTTP/1.1
{
"data": {
"MsgId": null,
"Count": 2,
"FaceInfo": [
{
"Id": 2,
414
"MD5": "F74C70ADB0B63B00E279E71B4143704D"
},
{
"Id": 3,
"MD5": "0194F781438F2DE8FBE5B0469895036D"
}
]
}
}
Response message:
{
"data": {
"MsgId": null,
"Count": 2,
"Result": [0,0],
"Id": [ 2,3],
"MD5": [
"F74C70ADB0B63B00E279E71B4143704D",
"0194F781438F2DE8FBE5B0469895036D"
]
}
}
Add
URL POST /API/AI/CompareFaces/Add
Description It is used to add compareFaces
Request Body See Table-17.2.4.1
Successful Response Faces JSON (show as following Table-17.2.4.3) & Like example
Table-17.2.4.1
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Count int Add the total number of comparison face images
FaceInfo JSON array show as following Table-17.2.4.2
WithImage 0 int Whether need a picture, 1- yes, 0- no
Whether need Characteristics, 1-required, 0-not
WithFeature 1 int
required
415
Table-17.2.4.2
KEY VALUE COMMENT
RANGE TYPE
MsgId null
64-bit signed face ID, unique identification, the
Id -1 int ID field must be valid when modifying face
information
GrpId int Group
Time int Starting time
Similarity int Similarity
Sex 0 int Gender: 0-male, 1-female
Age int Age
Chn int Channel
Number of revisions, the upper layer is read-only,
ModifyCnt int and is updated in real time by the device side
every time the face information is modified
It must be specified when adding, which is the
main face image in the database. If "Image1" and
"Feature" are given during Modify, the given
"Image1" and "Feature" will be used directly
Image1 "base64(imgData)" string (note that the feature value version also needs to
be given). If only "Image1" is given, "Feature"
will be recalculated. If "Image1" is not given,
only fields other than "Image1" and "Feature"
will be modified.
Image2 "" string This parameter is only valid for real-time alarm
Image3 "" string This parameter is only valid for real-time alarm
Feature "base64(feature)" string Characteristics
Feature value version, it is meaningful only when
FtVersion int comparing feature values with the same version,
if return feature value, please return this field
Name "" string Name
Country "" string Country
Nation "" string Nation
NativePlace "" string NativePlace
IdCode "" string ID Card
Job "" string Job
Phone "" string Telephone number
Email "" string Email address
Domicile "" string current residence
Remark "" string Evaluate
416
Table-17.2.4.3(Faces JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Result refer to Table-17.x.x,GetByIndex,
Result int
GetById is valid for this field
The total number of queried faces, GetByIndex,
Count int
GetById is valid for this field
Add Faces JSON show as following Table-
FaceInfo JSON array
17.2.4.4
Table-17.2.4.4
KEY VALUE COMMENT
RANGE TYPE
Face ID, unique identifier, GetByIndex, Id field
Id int must be valid when GetById face information,
there is no such field in Search
GrpId int Group ID
unsigned long Unix timestamps, such as: 1540444116
StartTime
long
unsigned long Unix timestamps, such as: 1540444116
EndTime
long
Similarity float Similarity
Sex 0 int Gender: 0-male, 1-female
Age int Age
Chn int Channel
“CH1”…”CH1x” string channel number
“IP_CH1”…”
IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
StrChn string
The number of
channels depends on
the capabilities of the
device.
Number of revisions, the upper layer is read-only,
ModifyCnt int and is updated in real time by the device side
every time the face information is modified
Image1 "base64(imgData)" string Database face master image.
Feature "base64(feature)" string Characteristics.
FtVersion int Feature value version, it is meaningful only when
417
comparing feature values with the same version.
If you return feature values, please return this
field as well. The FtVersion field is valid for
GetByIndex and GetById face information, but
not for Search
Name "Mike" string Name
Country "China" string Country
Nation "Han" string Nation
NativePlace "Guangdong,Zhuhai" string NativePlace
"41502519920305091 ID Card
IdCode string
6"
Job "Software" string Job
Phone "12345678902" string Telephone number
Email "[email protected]" string Email address
Example:
Request message:
POST /API/AI/CompareFaces/Add HTTP/1.1
{
"data": {
"MsgId": null,
"Count": 2,
"WithImage": 0,
"WithFeature": 1
"FaceInfo": [
{
"Image1": "base64(imgData)",
"Feature": "base64(feature)",
"FtVersion": 0
418
},
{
"Image1": "base64(imgData)",
"Feature": null,
"FtVersion": 0
}
]
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": [0, -3],
"Count": 3,
"FaceInfo": [
{
"Id": 5,
"GrpId": 0,
"Time": 0,
"Similarity": 0,
"Sex": 0,
"Age": 0,
"Chn": 0,
"StrChn":"1",
"ModifyCnt": 0,
"Image1": "base64(imgData)",
"Image2": null,
"Image3": null,
"Feature": "base64(feature)",
"FtVersion": 0 ,
"Name": "",
"Country": "",
"Nation": "",
"NativePlace": "",
"IdCode": "",
"Job": "",
"Phone": "",
"Email": "",
"Domicile": "",
"Remark": "",
"MD5": "294C703DB05F3B00E279E71B41437E46"
},
419
{
"Id": -1,
"GrpId": 0,
"Time": 0,
"Similarity": 0,
"Sex": 0,
"Age": 0,
"Chn": 0,
"StrChn":"1",
"ModifyCnt": 0,
"Image1": null,
"Image2": null,
"Image3": null,
"Feature": null,
"FtVersion": 0 ,
"Name": "",
"Country": "",
"Nation": "",
"NativePlace": "",
"IdCode": "",
"Job": "",
"Phone": "",
"Email": "",
"Domicile": "",
"Remark": "",
"MD5": "397E503DB05F3B00E279E71B41437E46"
}
]
}
}
Search
URL POST /API/AI/AddedFaces/Search
Description It is used to searchAddedFaces
Request Body Faces JSON (show as following Table-17.2.5.1)
Successful Response Response JSON (show as following Table-17.2.5.3)
GetByIndex
420
URL POST /API/AI/AddedFaces/GetByIndex
Description It is used to getAddedFaces
Request Body See Table-17.2.5.4
Successful Response Faces JSON (show as following Table-17.2.5.1)
GetById
URL POST /API/AI/AddedFaces/GetById
Description It is used to getAddedFaces
Request Body See Table-17.2.5.5
Successful Response Faces JSON (show as following Table-17.2.5.1) & Like example
Table-17.2.5.1(Faces JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Result refer to Table-17.x.x,GetByIndex,
Result int
GetById is valid for this field
channel_max int Maximum number of channels
The total number of faces queried, GetByIndex
Count int
and GetById are valid for this field
Add Faces JSON show as following Table-
FaceInfo JSON array
17.2.5.2
Table-17.2.5.2
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Face ID, unique identifier, GetByIndex, ID field
Id int must be valid when GetById face information,
there is no such field in Search
GrpId int Group Id
unsigned long Unix timestamp, such as: 1540444116
StartTime
long
unsigned long Unix timestamp, such as: 1540444116
EndTime
long
Similarity float Similarity
Sex 0 int Gender: 0-male, 1-female
Age int Age
Chn int Channel
“CH1”…”CH1x” String channel number
StrChn string
“IP_CH1”…”
421
IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
The number of
channels depends on
the capabilities of the
device.
Number of revisions, the upper layer is read-only,
ModifyCnt int and is updated in real time by the device side
every time the face information is modified
Database face master image. The Image1 field is
Image1 "base64(imgData)" string valid for GetByIndex and GetById face
information, but not for Search
This field is only valid for real-time alarms, but
Image2 null string
not for Search
This parameter is only valid for real-time alarm,
Image3 null string
but not for Search
Characteristics. The Feature field is valid for
Feature "base64(feature)" string GetByIndex and GetById face information, but
not for Search
Feature value version, it is meaningful only when
comparing feature values with the same version.
If you return feature values, please return this
FtVersion int
field as well. The FtVersion field is valid for
GetByIndex and GetById face information, but
not for Search
Name "Mike" string Name
Country "China" string Country
Nation "Han" string Nation
NativePlace "Guangdong,Zhuhai" string NativePlace
"41502519920305091 ID Card
IdCode string
6"
Job "Software" string Job
Phone "12345678902" string Telephone number
Email "[email protected]" string Email address
Table-17.2.5.3(Response JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Result int Result refer to Table-17.x.x
channel_max int Maximum number of channels
Count int Search for the total number of faces added
Table-17.2.5.4
KEY VALUE COMMENT
RANGE TYPE
MsgId null
The starting index of the request, for example, the
StartIndex 0 int first time: 0-19, the second time: 20-39, then the
StartIndex is 0, 20 respectively
Count 20 int The number of face information requested
Obtain brief information, each face information
in the response message only contains Id, GrpId
SimpleInfo 0 int
and Name fields, 1-simplified mode, 0-normal
mode
WithImage 1 int Whether need a picture, 1- yes, 0- no
Whether to need characteristic s, 1-required, 0-
WithFeature 1 int
not required
Whether MD5 is required, MD5 will also be
NeedMD5 0 int
given in non-abbreviated mode
Table-17.2.5.5
KEY VALUE COMMENT
RANGE TYPE
423
MsgId null
A list of face IDs that need to be requested, each
FacesId [1, 5, 6, 20, 53, 25…] array array bit corresponds to an ID with an integer
number.
["F75C70ADB0B63B Face MD5 value
00E279E71B4143704
D","B74C70ADB0B6
3B00E279B71B4193
704F","A29B70ADB
0B63B00E2793C1B4
123504D","B34C70A
FacesMD5 array
3B0B53B00E279571
B4143704F","AC3C7
0ADB3B63B40E279
EE1B41F3C04D","B7
4A70ADB0B63400E
279E71B4143804F"
…]
Obtain brief information, each face information
in the response message only contains Id, GrpId
SimpleInfo 0 int
and Name fields, 1-simplified mode, 0-normal
mode
WithImage 1 int Whether need a picture, 1- yes, 0- no
Whether need characteristics, 1-required, 0-not
WithFeature 1 int
required
Whether MD5 is required, 1-required, 0-not
NeedMD5 0 int required, MD5 will also be given in non-
abbreviated mode
Example:
Request message:
POST /API/AI/AddedFaces/Search HTTP/1.1
{
"data": {
"MsgId": null,
"FaceInfo": [
{
"GrpId": 1,
"Time": 0,
"Similarity": 0,
"Sex": 0,
"Age": 0,
"Chn": 0,
424
"ModifyCnt": 0,
"Name": "",
"Country": "",
"Nation": "",
"NativePlace": "",
"IdCode": "",
"Job": "",
"Phone": "",
"Email": "",
"Domicile": "",
"Remark": ""
}
]
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"Count": 153
}
}
Example:
Request message:
POST /API/AI/AddedFaces/GetById HTTP/1.1
{
"data": {
"MsgId": null,
"FacesId": [1, 5, 6, 20, 53, 25],
"FacesMD5": ["F75C70ADB0B63B00E279E71B4143704D",
"B74C70ADB0B63B00E279B71B4193704F",
"A29B70ADB0B63B00E2793C1B4123504D",
"B34C70A3B0B53B00E279571B4143704F",
"AC3C70ADB3B63B40E279EE1B41F3C04D",
"B74A70ADB0B63400E279E71B4143804F"],
"SimpleInfo": 0
"WithImage": 1,
"WithFeature": 1,
"NeedMD5": 0
425
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"Count": 1,
"FaceInfo": [
{
"Id": 1,
"GrpId": 1,
"Time": 0,
"Similarity": 0,
"Sex": 0,
"Age": 26,
"Chn": 0,
"StrChn":"1",
"ModifyCnt": 0,
"Image1": "base64(imgData)",
"Image2": null,
"Image3": null,
"Feature": "base64(feature)",
"FtVersion": 0 ,
"Name": "Mike",
"Country": "China",
"Nation": "Han",
"NativePlace": "Guangdong,Zhuhai",
"IdCode": "415025199203050916",
"Job": "Software",
"Phone": "12345678902",
"Email": "[email protected]",
"Domicile": "Guangdong,Zhuhai,Xiangzhou ...",
"Remark": "Detail of this person ...",
"MD5": "F75C70ADB0B63B00E279E71B4143704D"
}
]
}
}
426
17.2.6 Additional Face Image
Get
URL POST /API/AI/ExtraFaces/Get
Description It is used to GetExtraFaces
Request Body See Table-17.2.6.1
Successful Response ExtraFaces JSON (show as follow Table-17.2.6.2)
GetById
URL POST /API/AI/ExtraFaces/GetById
Description It is used to getExtraFacesById
Request Body See Table-17.2.6.1
Successful Response Extra Faces JSON (show as follow Table-17.2.6.2)
Add
URL POST /API/AI/ExtraFaces/Add
Description It is used to getAddedFaces
Request Body Extra Faces JSON (show as follow Table-17.2.6.2)
Successful Response Like example Add
Remove
URL POST /API/AI/ExtraFaces/Remove
Description It is used to getAddedFaces
Request Body Extra Faces JSON (show as follow Table-17.2.6.2)
Successful Response Like example Remove
Table-17.2.6.1
KEY VALUE COMMENT
RANGE TYPE
MsgId null
The Id of the additional face to be
requested. Note that it is the face Id of the
FaceId int
additional face. This field is valid when
getting.
The Id of the additional face to be
requested. Note that it is not the face Id to
Id int
which it belongs. This field is valid when
GetById
Do you need pictures?
WithImage 1 int 1 - Yes,
0 - No
WithFeature 1 int Do you need the characteristic value?
427
1 - Yes,
0 - No
Table-17.2.6.2(ExtraFaces JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
See Table-17. x.x for the results. This field is
Result int valid for Get and GetById, but no field for Add
and Remove
Count int Total faces you searched.
ExtFaceInfo JSON array ExtraFaces JSON show as follow Table-17.2.6.3
Table-17.2.6.3(ExtraFaces JSON)
KEY VALUE COMMENT
RANGE TYPE
Refer to additional face ID The Id of the
Id int
attached face is not the face Id it belongs to
The Id of the attached face, the face Id of
FaceId int
the attached face
To attach a face image and remove an additional
Image "base64(imgData)" string face, just give the "Id" field, which uses the
default value
To add a face feature value and remove an
Feature "base64(feature)" string additional face, just give the "Id" field, which
uses the default value
The feature value version is meaningful only
when the characteristic values with the same
FtVersion 0 int
version are compared. If returning the
characteristic value, please also return this field
Example:
Request message:
POST /API/AI/ExtraFaces/Add HTTP/1.1
{
"data": {
"MsgId": null,
"Count": 2,
"ExtFaceInfo": [
{
"Id": -1,
"FaceId": 1,
"Image": "base64(imgData)",
428
"Feature": "base64(feature)",
"FtVersion": 0
},
{
"Id": -1,
"FaceId": 1,
"Image": "base64(imgData)",
"Feature": "base64(feature)",
"FtVersion": 0
}
]
}
}
Response message:
{
"data": {
"MsgId": null,
"Count": 2,
"Result": [0, 0],
"Id": [1, 2]
}
}
Example:
Request message:
POST /API/AI/ExtraFaces/Remove HTTP/1.1
{
"data": {
"MsgId": null,
"Count": 2,
"ExtFaceInfo": [
{
"Id": 1,
"FaceId": 0,
"Image": null,
"Feature": null,
"FtVersion": 0
},
{
"Id": 2,
"FaceId": 0,
"Image": null,
"Feature": null,
"FtVersion": 0
429
}
]
}
}
Response message:
{
"data": {
"MsgId": null,
"Count": 2,
"Result": [0, 0],
"Id": [1, 2]
}
}
Search
URL POST /API/AI/SnapedFaces/Search
Description It is used to searchSnapedFaces
Request Body search SnapedFaces JSON (show as follow Table-17.2.7.1)
Successful Response SnapedFaces JSON (show as follow Table-17.2.7.3)
GetByIndex
URL POST /API/AI/SnapedFaces/GetByIndex
Description It is used to getSnapedFacesByIndex
Request Body See Table-17.2.7.4
Successful Response SnapedFaces JSON (show as follow Table-17.2.7.3)
GetById
URL POST /API/AI/SnapedFaces/GetById
Description It is used to getSnapedFacesById
Request Body See Table-17.2.7.5
Successful Response SnapedFaces JSON (show as follow Table-17.2.7.3)
StopSearch
URL POST /API/AI/SnapedFaces/StopSearch
Description It is used to stopSearchSnapedFaces
Request Body StopSearch SnapedFaces JSON (show as follow Table-17.2.7.7)
Successful Response StopSearch SnapedFaces JSON (show as follow Table-17.2.7.7)
430
Table-17.2.7.1(search SnapedFaces JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Search Start time, for example:"2020-07-12
StartTime string
00:00:00"
Search End time, for example::"2020-07-12
EndTime string
23:59:59"
0~MAX_PARA_CH The channel you want to search. The value
Chn array
N_NUM stands for one channel.
The group to which the face to be displayed
belongs during real-time capture. The value
represents the group ID of the selected group. If
AlarmGroup array
it is blank, all (including deleted groups) will be
displayed. If the group is given, the result will be
filtered by the given group ID.
The similarity during matching. The faces below
this similarity will be filtered out [0, 100] as the
Similarity 0-100 int
normal value range. If the faces do not match, this
parameter can be given - 1
Considering the superposition of the search
process and operation logic (for example, after
the search results are found on the matching page,
you can open the face selection dialog box to add
a new face. At this time, the matched cache
information will be overwritten by the results of
the new search and become invalid), the device
side provides two search engines with equivalent
Engine 0 int functions (0 and 1) for this purpose. The data and
cache of the two engines are completely
independent and do not interfere with each other,
The division of labor is allocated by the client
itself. For example, the number 0 engine can be
used to realize some temporary face selection
Service (for the selection dialog box), using the
data of engine 1 to display the search or matching
results.
Count int Number of matching pictures searched
Gender:
Gender array 0- male
1- female
array Age range. The value represents the
fAttrAge [0, 1, 2, 3, 4, 5, 6] corresponding age range. [ [0, 17], [18, 25], [26,
30], [31, 35], [36, 40],[41, 50], [51, 127], [-1,
431
0] ]。 [- 1, 0] indicates that the age range found
is within 1 year old
array Face value, the value represents the
Beauty [0, 1, 2, 3, 4] corresponding value. [[0, 9], [10, 29], [30, 69],
[70, 89], [90, 100 ]]
array Type of glasses, 0: no glasses, 1: wear glasses (at
present, there is no distinction between
GlassesType [0, 1]
sunglasses and ordinary glasses, all glasses are
default)
array Expression type, 0: no expression, 1: smile, 2:
Expression [0, 1, 2]
laugh
array The value represents the search type, 0: no mask,
MouthMask [0, 1]
1: with mask
array Race, the number represents the corresponding
Race [0, 1, 2, 3]
type, 0: yellow, 1: white, 2: black, 3: Arab
search SnapedFaces JSON (show as follow
FaceInfo JSONarray
Table-17.2.7.2)
Table-17.2.7.3(SnapedFaces JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Result 0 int Result see Table-17.x.x
The total number of captured faces in this
Count int
response
Table-17.2.7.4
KEY VALUE COMMENT
432
RANGE TYPE
MsgId null
Which engine was used, 0 or 1, this will match
with <Search> interface
Engine 0 int
Which search engine to use, 0 or 1, works with
the search interface
Get the matched face or capture the face, 1 - Get
MatchedFaces 1 int the matched face, 0 - Get the captured face, only
GetByIndex has this field
The starting index of the request, for example, the
first time: 0-19, the second time: 20-39, then the
StartIndex int
StartIndex is 0 and 20 respectively. Only
GetByIndex has this field
The number of requested face information. Only
Count int
GetByIndex has this field
Get brief information or complete information. 1
- brief information, 0 - complete information. The
brief information only contains MatchedId,
SimpleInfo 1 int
Similarity and UUId at most. If no face is
matched, only UUId is included. Only
GetByIndex has this field
The unique identifier of the snapshot information
UUIds array
to be obtained. Only GetById has this field
WithFaceImage 1 int Whether face image is needed, 1 - Yes, 0 - No
Whether the human body picture is needed, 1 -
WithBodyImage 0 int
Yes, 0 - No
Whether background image is required, 1 - Yes,
WithBackgroud 0 int
0 - No
Whether the characteristic value is required, 1 -
WithFeature 1 int
Yes, 0 - No
Table-17.2.7.5(SnapedFaces JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Result 0 int Result see Table-17.x.x
The total number of faces searched or matched
TotalCount int
successfully. Only GetByIndex has this field
The total number of captured faces in this
Count int
response
SnapedFaces JSON (show as follow Table-
SnapedFaceInfo array
17.2.7.6)
Table-17.2.7.6(SnapedFaces JSON)
433
KEY VALUE COMMENT
RANGE TYPE
The unique ID of the captured face information,
UUId string which can be directly used to obtain the detailed
information of the face in the future
The matched face Id. If there is no match,
MatchedFaceId int this field is not available. Only GetByIndex
has this field
The matched face MD5. If there is no match, this
MatchedMD5 string field is not available. Only GetByIndex has this
field
Chn int channel
“CH1”…”CH1x” channel
“IP_CH1”…”
IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
StrChn string
The number of
channels depends on
the capabilities of the
device.
The similarity with the matched face. If there is
Similarity float no match, this field is not available. Only
GetByIndex has this field
unsigned long Unix time stamp,such as:1540444116
StartTime
long
unsigned long Unix time stamp,such as:1540444116
EndTime
long
FaceImage "base64(imgData)" string Captured face pictures from the front-end IPC
Captured human body pictures from the front-end
BodyImage "base64(imgData)" string
IPC
Background "base64(imgData)" string Snapshot background image from front-end IPC
Feature "base64(feature)" string Feature value
The feature value version is meaningful only
when the characteristic values with the same
FtVersion int
version are compared. If returning the
characteristic value, please also return this field
The ID of the picture when the front-end IPC
SnapId unsignedint
snaps, 32-bit unsigned integer
Type 0 int Capture face type sign
Score int Picture score (confidence)
434
0- male
1- female
Example:
Request message:
POST /API/AI/SnapedFaces/Search HTTP/1.1
{
"msgType": "AI_searchSnapedFaces",
"data": {
"MsgId": null,
"StartTime": "2018-10-20 00:00:00",
"EndTime": "2018-10-28 23:59:59",
"Chn": [0, 1, 2, 3, 4, 5, 6, 7, 8],
"AlarmGroup": [1, 2, 5, 9, 13],
"Similarity": 70,
"Engine": 0,
"Count": 2,
"FaceInfo": [
{
"Id": 2,
"MD5": "F74C70ADB0B63B00E279E71B4143704D",
"Feature": "base64(feature)",
"FtVersion": 0
435
},
{
"Id": 5,
"MD5": "294C703DB05F3B00E279E71B41437E46",
"Feature": "base64(feature)",
"FtVersion": 0
}
]
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"Count": 600
}
}
Example:
Request message:
POST /API/AI/SnapedFaces/GetByIndex HTTP/1.1
{
"data": {
"MsgId": null,
"Engine": 0,
"MatchedFaces": 1,
"StartIndex": 0,
"Count": 20,
"SimpleInfo": 1
"WithFaceImage": 1,
"WithBodyImage": 0,
"WithBackgroud": 0,
"WithFeature": 1
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"TotalCount": 600,
"Count": 20,
436
"SnapedFaceInfo": [
{
"UUId": 103,
"MatchedFaceId": 5,
"MatchedMD5": "294C703DB05F3B00E279E71B41437E46",
"Chn": 3,
"StrChn":"4",
"Similarity": 89.39759,
"StartTime": 1540444116,
"EndTime": 1540444136,
"FaceImage": "base64(imgData)",
"BodyImage": "base64(imgData)",
"Background": "base64(imgData)",
"Feature": "base64(feature)",
"FtVersion": 0
"SnapId": 2375,
"Type": 0,
"Score": 60,
"Gender": 0,
"fAttrAge": 25,
"Beauty": 51,
"GlassesType": 1,
"Expression": 0,
"MouthMask": 1,
"Race": 1
},
{
"UUId": 126,
"MatchedFaceId": 2,
"MatchedMD5": "F74C70ADB0B63B00E279E71B4143704D",
"Chn": 3,
"StrChn":"4",
"Similarity": 96.87693,
"StartTime": 1540444116,
"EndTime": 1540444136,
"FaceImage": "base64(imgData)",
"BodyImage": "base64(imgData)",
"Background": "base64(imgData)",
"Feature": "base64(feature)",
"FtVersion": 0
"SnapId": 2376,
"Type": 0,
"Score": 60,
"Gender": 0,
437
"fAttrAge": 25,
"Beauty": 51,
"GlassesType": 1,
"Expression": 0,
"MouthMask": 1,
"Race": 1
},
{
...
},
...
]
}
}
Search
URL POST /API/AI/SnapedObjects/Search
Description It is used to searchSnapedObjects
Request Body search SnapedObjects JSON (show as follow Table-17.2.8.1)
Successful Response SnapedObjects Response JSON (show as follow Table-17.2.8.2)
GetByIndex
URL POST /API/AI/SnapedObjects/GetByIndex
Description It is used to getSnapedObjectsByIndex
Request Body See Table-17.2.8.3
Successful Response SnapedObjects JSON (show as follow Table-17.2.8.4)
GetById
URL POST /API/AI/SnapedObjects/GetById
Description It is used to getSnapedObjectsById
Request Body See Table-17.2.8.3
Successful Response SnapedObjects JSON (show as follow Table-17.2.8.4)
StopSearch
URL POST /API/AI/SnapedObjects/StopSearch
Description It is used to stopSearchSnapedObjects
Request Body StopSearch SnapedObjects JSON (show as follow Table-17.2.8.6)
Successful Response StopSearch SnapedObjects JSON (show as follow Table-17.2.8.6)
438
Table-17.2.8.1(search SnapedObjects JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
"2020-07-12 Search <Start Time>
StartTime string
00:00:00"
EndTime "2020-07-1223:59:59" string Search <End Time>
0~MAX_PARA_CH The channel you searched. Value stand for
Chn array
N_NUM Channel number
The type you searched. For example:
1 – Shape
2 – Vehicle
3 – PID Human
Type [1, 2] array
4 – PID Vehicle
5 – LCD Human
6 LCD Vehicle
Table-17.2.8.3
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Which engine was used, 0 or 1, this will match
Engine 0 int
with <Search> interface
Request Start Index, For example:
1st: 0~19;
StartIndex int 2nd: 20-39
StartIndex should be 0, 20 seperately. And only
GetByIndex have this field.
Request the count for human or Car. Only
Count int
GetByIndex have this field.
Get one simple info or whole info.
SimpleInfo 1 int 1 – Simple info
0 – Whole info
439
Brief info only covers UUID, and Only
GetByIndex have this field.
Get the unique identifier of the snapshot
UUIds [103, 105, 190, 129] array
information. Only GetById has this field
Request the image of the object (such as Human
and car)
WithObjectImage 1 int
1 – Request
0 – Not request
Request the background image
WithBackgroud 0 int 1 – Request
0 – Not request
Table-17.2.8.4(SnapedObjects JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Result 0 int Refer to Table-17.x.x for the result
The total count you searched. Only GetByIndex
TotalCount int
have this field.
Count int Total response objects
SnapedObjects JSON (show as follow Table-
SnapedObjInfo array
17.2.8.5)
Table-17.2.8.5(SnapedObjects JSON)
KEY VALUE COMMENT
RANGE TYPE
The unique ID of the captured object information,
UUId string which can be directly used to get the detailed
information of the object in the future.
Chn int Channel
“CH1”…”CH1x” Channel
“IP_CH1”…”
IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
StrChn string
The number of
channels depends on
the capabilities of the
device.
unsigned long Unix Time stamp,For example:1540444116
StartTime
long
EndTime unsigned long Unix Time stamp,For example:1540444116
440
long
Captured images of Human and cars from the
ObjectImage "base64(imgData)" string
front-end IPC
Captured background images of Human and cars
Background "base64(imgData)" string
from the front-end IPC
SnapId unsigned int Captured Snap ID from the front-end IPC
The type for captured objects.
0 - face
1 – Human shape
2 – Vehicle Shape
Type 1 int
3 – PID Human shape
4 – PID Vehicle shape
5 – LCD Human shape
6 – LCD Vehicle shape
Example:
Request message:
POST/API/AI/SnapedObjects/Search HTTP/1.1
{
"data": {
"MsgId": null,
"StartTime": "2018-10-20 00:00:00",
"EndTime": "2018-10-28 23:59:59",
"Chn": [0, 1, 2, 3, 4, 5, 6, 7, 8],
"Type": [1, 2],
"Engine": 0,
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"Count": 600
441
}
}
Example:
Request message:
POST/API/AI/SnapedObjects/GetByIndex HTTP/1.1
{
"data": {
"MsgId": null,
"Engine": 0,
"StartIndex": 0,
"Count": 20,
"SimpleInfo": 1,
"WithObjectImage": 0,
"WithBackgroud": 0
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"TotalCount": 600,
"Count": 20,
"SnapedObjInfo": [
{
"UUId": 103,
"Chn": 3,
"StrChn":"CH4",
"StartTime": 1540444116,
"EndTime": 1540444137,
"ObjectImage": "base64(imgData)",
"Background": "base64(imgData)",
"SnapId": 2375,
"Type": 1
},
{
"UUId": 105,
"Chn": 6,
"StrChn":"CH7",
"StartTime": 1540444116,
"EndTime": 1540444139,
"ObjectImage": "base64(imgData)",
"Background": "base64(imgData)",
442
"SnapId": 2375,
"Type": 2
},
{
...
},
...
]
}
}
GET
URL POST/API/AI/PlateGroup/Get
Description It is used to get the License Plate Group parameters
Request Body See Table -17.2.9.1
Successful Response License Plate Group JSON (show as follow Table-17.2.9.4)
Error_Code Response Error Information JSON (show as follow Table-17.2.9.12)
GET
URL POST/API/AI/PlateGroup/GetId
Description It is used to get the License Plate Group Id
Request Body See Table -17.2.9.13
Successful Response License Plate Group JSON (show as follow Table-17.2.9.14)
Error_Code Response Error Information JSON (show as follow Table-17.2.9.12)
ADD
URL POST /API/AI/PlateGroup/Add
Description It is used to add the License Plate Group parameters
Request Body See Table -17.2.9.3
Successful Response License Plate Group JSON (show as follow Table-17.2.9.4)
Error_Code Response Error Information JSON (show as follow Table-17.2.9.12)
Modify
URL POST /API/AI/PlateGroup/Modify
Description It is used to modify the License Plate Group parameters
Request Body License Plate Group JSON (show as follow Table-17.2.9.2)
Successful Response Response JSON (show as follow Table-17.2.9.9)
Remove
443
URL POST /API/AI/PlateGroup/Remove
Description It is used to remove the License Plate Group
Request Body Remove License Plate Group JSON (show as follow Table-17.2.9.7)
Successful Response Response JSON (show as follow Table-17.2.9.9)
444
DLDT_Face,
DLDT_Object,
DLDT_Plate,
DLDT_All
};
The license plate set is fixed to 2(DLDT_Plate),
Modifying will be unvalid
Policy attribute
0 – Allow list
Policy 0-2 int
1 – Block list
2 – Unknown
PL alarm enable:
Enabled 0,1 int 0 – Disable
1 – Enable
Predefined groups cannot be deleted. They are
CanDel 0,1 int identified by the "CanDel" field. 0 cannot be
deleted
Fault tolerance rate, the maximum number of
unsigned
Similarity 0-4 characters allowed for error, for example, 0
int
means zero tolerance, require all characters
445
match
Group alarm Policy Configs
Fixed to 2 elements, only use “0” element and
JSON
PolicyConfigs use-up “1”.
array
PolicyConfigs JSON show as follow Table-
17.2.9.6
It controls which channels the corresponding
group is allowed to alarm in, and is used by bit,
EnableChnAlarm [255, 255, 255, 255] array
which indicates that the corresponding channel is
allowed to alarm
Alarm out linkage Information JSON show as
AlarmOut Object
follow Table-17.2.9.10
Table-17.2.9.9(Response JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Response result or error code.
Result integer array
See Table-17.2.9.12
Table-17.2.9.10
KEY VALUE COMMENT
RANGE TYPE
"Local->1" Local alarm linkage
"Local->2"
"Local->3"
……
Local string array
The number of Locals
depends on the
capabilities of the
device.
447
Front-end IPC alarm linkage
Ipc JSON array
IPC JSON show as follow Table-17.2.9.11
448
to be deleted.
The number of faces in the group have exceeded
AORT_GRP_FACE_OVER_MAX -26
the upper limit
AORT_NO_PERMISSION -27 No permission
The number of License Plates in the group have
AORT_GRP_PLATE_OVER_MAX -28
exceeded the upper limit
Example:
Request message:
POST /API/AI/PlateGroup/Add HTTP/1.1
449
{
"data": {
"Group": [
{
"Name": "Test Group 1"
},
{
"Name": "Test Group 2"
}
]
}
}
Response message:
{
"data": {
"Result": [
0,
0
],
"Group": [
{
"Id": 7,
"Name": "Test Group 1",
"Policy": 0,
"DetectType": 2,
"Similarity": 1,
"CanDel": 1,
"Enabled": 1,
"EnableAlarm": 1,
"PolicyConfigs": [...],
"EnableChnAlarm": [...],
"AlarmOut": {...}
},
{
"Id": 8,
"Name": "Test Group 2",
"Policy": 0,
"DetectType": 2,
"Similarity": 1,
"CanDel": 1,
"Enabled": 1,
"EnableAlarm": 1,
"PolicyConfigs": [...],
"EnableChnAlarm": [...],
450
"AlarmOut": {...}
}
]
}
}
Example:
Request message:
POST /API/AI/PlateGroup/Modify HTTP/1.1
{
"data": {
"Group": [
{
"Id": 7,
"Name": " Test group1",
"Policy": 0,
"DetectType": 2,
"Similarity": 1,
"CanDel": 1,
"Enabled": 1,
"EnableAlarm": 1,
"PolicyConfigs": [...],
"EnableChnAlarm": [...],
"AlarmOut": {...}
},
{
"Id": 8,
"Name": "Test group2",
"Policy": 0,
"DetectType": 2,
"Similarity": 1,
"CanDel": 1,
"Enabled": 1,
"EnableAlarm": 1,
"PolicyConfigs": [...],
"EnableChnAlarm": [...],
"AlarmOut": {...}
}
]
}
}
Response message:
{
"data": {
451
"Result": [
0,
0
]
}
}
Example:
Request message:
POST /API/AI/PlateGroup/Remove HTTP/1.1
{
"data": {
"Group": [
{
"Id": 7
},
{
"Id": 8
}
]
}
}
Response message:
{
"data": {
"Result": [
0,
0
]
}
}
Example:
Request message:
POST /API/AI/PlateGroup/GetId HTTP/1.1
{
"version": "1.0",
"data": {
"MsgId": "",
"DefaultVal": 0,
"SimpleInfo": 0,
"TypeFlags": 1,
"WithInternal": 0
}
452
}
Response message:
{
{"data": {
"MsgId": "",
"Result": 0,
"GroupsId": [
1,
2,
3,
4,
5,
6,
]
}}
Example:
Request message:
POST /API/AI/PlateGroup/Get HTTP/1.1
{
"data": {
"MsgId": "",
"DefaultVal": 0,
"SimpleInfo": 1,
"GroupsId": [
1,
2,
3,
…
]
}
}
Response message:
{
"data": {
"channel": [
"CH1",
"CH2",
"CH3",
...
],
"Result": 0,
"Count": 4,
"Group": [
453
{
"Id": 1,
"Name": "Allow list",
"Policy": 0,
"DetectType": 2,
"Similarity": 1,
"CanDel": 0,
"Enabled": 1,
"EnableAlarm": 1
},
{
"Id": 2,
"Name": "Block list",
"Policy": 1,
"DetectType": 2,
"Similarity": 1,
"CanDel": 0,
"Enabled": 1,
"EnableAlarm": 1
},
{
"Id": 3,
"Name": "Unknown",
"Policy": 2,
"DetectType": 2,
"Similarity": 1,
"CanDel": 0,
"Enabled": 1,
"EnableAlarm": 1
},
...
]
}
}
ADD
URL POST /API/AI/Plates/Add
Description It is used to add the license plates
Request Body See Table-17.2.10.1
Successful Response License Plates Information JSON (show as follow Table-17.2.10.5)
454
Modify
URL POST /API/AI/Plates/Modify
Description It is used to modify the license plates
Request Body See Table-17.2.10.1
Successful Response License Plates Information JSON (show as follow Table-17.2.10.5)
Change
URL POST /API/AI/Plates/ChangeGroup
Description It is used to change the group the license plate belongs to
Request Body License Plates JSON (show as follow Table-17.2.10.3)
Successful Response License Plates Information JSON (show as follow Table-17.2.10.5)
Remove
URL POST /API/AI/Plates/Remove
Description It is used to remove the License Plates
Request Body License Plates JSON (show as follow Table-17.2.3.3)
Successful Response License Plates Information JSON (show as follow Table-17.2.3.5)
Table-17.2.10.1
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Add License Plates JSON show as follow Table-
PlateInfo JSON array
17.2.3.2
Table-17.2.10.2
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Id 1-15characters string License Plate Number, Unique identity
GrpId int Group Id
Plate Color,available values are as follows:
enum AIPlateColor_e {
APC_Blue = 0, // Blue
PlateColor 0-5 int APC_Green = 1, // Green
APC_Yellow = 2, // Yellow
APC_Black = 3, // Black
APC_White = 4, // White
455
APC_Other = 5, // Other
APC_Max
};
CarBrand string Car Brand
CarType string Car Type
Gender of vehicle owner:
0– male.
Sex int
1– female
456
Table-17.2.10.4 (License Plates JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Id 1-15 characters string License Plate Id
Example:
Request message:
POST /API/AI/Plates/Add HTTP/1.1
{
"data": {
"PlateInfo": [
{
"Id": "粤CW2763",
"GrpId": 6,
"PlateColor": 0,
"Sex": 1,
"CarBrand": " Volkswagen ",
"CarType": "两厢车",
"Owner": "张三",
"IdCode": "12125180",
"Job": "职业",
"Phone": "15271859302",
"Domicile": "居住地1",
"Remark": "备注",
"EnableChnAlarm": []
},
{
"Id": "粤CK3961",
"GrpId": 6,
"PlateColor": 1,
"Sex": 1,
"CarBrand": "大众",
"CarType": "三厢车",
"Owner": "李四",
"IdCode": "12125181",
457
"Job": "职业",
"Phone": "15271859303",
"Domicile": "居住地2",
"Remark": "备注",
"EnableChnAlarm": []
}
]
}
}
Response message:
{
"data": {
"Count": 2,
"Result": [
0,
0
]
}
}
Example:
Request message:
POST /API/AI/Plates/Modify HTTP/1.1
{
"data": {
"PlateInfo": [
{
"Id": "粤CW2763",
"GrpId": 6,
"PlateColor": 1,
"Sex": 1,
"CarBrand": "大众",
"CarType": "两厢车",
"Owner": "张三三",
"IdCode": "12125180",
"Job": "职业",
"Phone": "15271859302",
"Domicile": "居住地1",
"Remark": "备注",
"EnableChnAlarm": []
},
{
"Id": "粤CK3961",
"GrpId": 6,
458
"PlateColor": 2,
"Sex": 1,
"CarBrand": "大众",
"CarType": "三厢车",
"Owner": "李四四",
"IdCode": "12125181",
"Job": "职业",
"Phone": "15271859303",
"Domicile": "居住地2",
"Remark": "备注",
"EnableChnAlarm": []
}
]
}
}
Response message:
{
"data": {
"Count": 2,
"Result": [
0,
0
]
}
}
Example:
Request message:
POST /API/AI/Plates/Remove HTTP/1.1
Body:
{
"data": {
"PlateInfo": [
{
"Id": "粤CW2763"
},
{
"Id": "粤CK3961"
}
]
}
}
Response message:
{
459
"data": {
"Count": 2,
"Result": [
0,
0
]
}
}
Example:
Request message:
POST /API/AI/Plates/ChangeGroup HTTP/1.1
Body:
{
"data": {
"Group": 1,
"PlateInfo": [
{
"Id": "粤CW2763"
},
{
"Id": "粤CK3961"
}
]
}
}
Response message:
{
"data": {
"Count": 2,
"Result": [
0,
0
]
}
}
GetCount
URL POST /API/AI/AddedPlates/GetCount
Description It is used to get added license plates count
Request Body License Plates JSON (show as follow Table-17.2.11.1)
460
Successful Response Response JSON (show as follow Table-17.2.11.3)
GetId
URL POST /API/AI/AddedPlates/GetId
Description It is used to get license plates id
Request Body See Table-17.2.11.1
Successful Response License Plates JSON (show as follow Table-17.2.11.3)
GetById
URL POST /API/AI/AddedPlates/GetById
Description It is used to get license plate information by license plates id
Request Body See Table-17.2.11.4
Successful Response License Plates JSON (show as follow Table-17.2.11.3)
Table-17.2.11.2
KEY VALUE COMMENT
RANGE TYPE
MsgId null
License Plate number
Id 1-15characters string
When searching, the field is optional.
Group Id
When searching the field is optional
GrpId int
If the word provided is within the valid range
(only - 1 will be regarded as an invalid value), it
461
will be used as the exact condition, otherwise the
field will be ignored
License Plate color
Available values are as follows:
enum AIPlateColor_e {
APC_Blue = 0, // Blue
APC_Green = 1, // Green
APC_Yellow = 2, // Yellow
APC_Black = 3, // Black
PlateColor 0-5 int APC_White = 4, // White
APC_Other = 5, // Other
APC_Max
};
When searching the field is optional
If the word provided is within the valid range, it
will be used as the exact condition, otherwise the
field will be ignored
Car brand
CarBrand string
When searching the field is optional
Car type
CarType string
When searching the field is optional
Gendar of owner
0– male.
1– female
Sex int
If the word provided is within the valid range, it
will be used as the exact condition, otherwise the
field will be ignored
Owner name
Owner "Mike" string
When searching the field is optional
"41502519920305091 Id code
IdCode string
6" When searching the field is optional
Job
Job "Software" string
When searching the field is optional
Phone number
Phone "12345678902" string
When searching the field is optional
"Guangdong,Zhuhai, Address
Domicile string
Xiangzhou ..." When searching the field is optional
"Detail of this Remark
Remark string
person ..." When searching the field is optional
Special permission control, which controls which
channels the face is allowed to alarm,
EnableChnAlarm [255, 255, 255, 255] array Used by bit, which indicates that the
corresponding channel is allowed to alarm,
This field does not exist or empty, which means
462
that special permission control is not used
The field is not used during the search.
Table-17.2.11.3(Response JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Result int See Table-17.2.9.12
Total number of eligible license plates in the
Count int
database searched
A list of eligible license plate numbers. Only the
PlatesId string array
GetId result has this field
PlateInfo JSON array Only the GetId result has this field
Table-17.2.11.4
KEY VALUE COMMENT
RANGE TYPE
MsgId null
PlatesId string array Get the License Plate list details
Example:
Request message:
POST /API/AI/AddedPlates/GetCount HTTP/1.1
{
"data": {
"PlateInfo": [
{
"Id": "粤C"
}
]
}
}
Response message:
{
"data": {
"Result": 0,
"Count": 2
}
}
Example:
POST /API/AI/AddedPlates/GetId
(1) Fuzzy query
Request message:
463
{
"data": {
"PlateInfo": [
{
"Id": "粤CW"
}
]
}
}
Response message:
{
"data": {
"Result": 0,
"Count": 1,
"PlatesId": [
"粤CW2763"
]
}
}
(2) Get from the group Id list
Request message:
{
"data": {
"GrpId": [1, 2, 6]
}
}
Response message:
{
"data": {
"Result": 0,
"Count": 2,
"PlatesId": [
"粤CW2763",
"粤CK3961"
]
}
}
Example:
Request message:
POST /API/AI/AddedPlates/GetById
{
"data": {
"PlatesId": [
464
"粤CW2763",
"粤CK3961"
]
}
}
Response message:
{
"data": {
"Result": 0,
"Count": 2,
"PlateInfo": [
{
"Id": "粤CW2763",
"GrpId": 1,
"PlateColor": 0,
"Sex": 1,
"CarBrand": "大众",
"CarType": "两厢车",
"Owner": "张三",
"IdCode": "12125180",
"Job": "职业",
"Phone": "15271859302",
"Domicile": "居住地1",
"Remark": "备注",
"EnableChnAlarm": []
},
{
"Id": "粤CK3961",
"GrpId": 1,
"PlateColor": 1,
"Sex": 1,
"CarBrand": "大众",
"CarType": "三厢车",
"Owner": "李四",
"IdCode": "12125181",
"Job": "职业",
"Phone": "15271859303",
"Domicile": "居住地2",
"Remark": "备注",
"EnableChnAlarm": []
}
]
}
}
465
17.2.12 Snaped License Plates Search and Match
SearchPlate
URL POST /API/AI/SnapedObjects/SearchPlate
Description It is used to search and match license plates
Request Body Search license plate JSON (show as follow Table-17.2.12.1)
Successful Response Search license plate Response JSON (show as follow Table-17.2.12.2)
License plate retrieval is a subtype of Snapped Object. After the search is completed, it shares the API with
Snapped Object. Please refer to Chapter 17.2.8 for the following APIs
POST /API/AI/SnapedObjects/GetByIndex
POST /API/AI/SnapedObjects/GetById
POST/API/AI/SnapedObjects/StopSearch
Table-17.2.12.1(Search license plate JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
"2020-07-12 Search start time
StartTime string
00:00:00"
EndTime "2020-07-1223:59:59" string Search end time
0~MAX_PARA_CH The channel to search, and the value represents
Chn array
N_NUM the channel
The license plate group which the comparison
AlarmGroup [1, 2] integer array
result belongs to in the real-time capturing mode
PlatesId string array License Plate list
Fault tolerance. The maximum number of
different strings are allowed when searching for
MaxErrorCharCnt 0-5 int
matching strings
Sort Type
enum AIResultSortType {
ARST_Ascending = 0, // Ascending order
SortType ARST_Descending = 1, // Descending order
ARST_None = 2,
ARST_Max
};
Engine 0,1 int Search engine(0 & 1)
Example:
Request message:
POST /API/AI/SnapedObjects/SearchPlate
{
"data": {
"StartTime": "2021-08-15 00:00:00",
"EndTime": "2021-08-17 23:59:59",
"Chn": [2, 3],
"AlarmGroup": [2, 3, 4],
"PlatesId": ["3918K"],
"MaxErrorCharCnt": 3,
"SortType": 0,
"Engine": 0
}
}
Response message:
{
"data": {
"Result": 0,
"Count": 129
}
}
Get
URL POST /API/AI/VhdLogCount/Get
Description It is used to get VHD log count
Request Body Get VHD log count JSON (show as follow Table-17.2.13.1)
Successful Response Get VHD log count Response JSON (show as follow Table-17.2.13.2)
467
N_NUM represents the channel (passing an empty array
means searching all channels)
Type to search,
for example: 0-face, 1-Human, 2-Vehicle, 3-PID
Human, 4-PID Vehicle, 5-LCD Human, 6-LCD
Type [0, 1, 2] array
Vehicle, 7-non-motor vehicle, 8-PID non-motor
vehicle, 9-LCD non-motor vehicle, 10-license
plate
Engine 0 int Search Engine, 0 or 1
Example:
Request message:
POST/API/AI/VhdLogCount/Get HTTP/1.1
{
"data": {
"MsgId": null,
"StartTime": "2018-10-20 00:00:00",
"EndTime": "2018-10-28 23:59:59",
"Chn": [0, 1, 2, 3, 4, 5, 6, 7, 8],
"Type": [0, 2],
"Engine": 0
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"Count": [300, 100]
}
}
SET
URL POST /API/AI/FDAttendance/Set
Description It is used to set the Face Attendance Configuration parameters
Request Body Face AttendanceConfiguration JSON (show as follow Table-17.3.1)
Successful Response The successful result response that described in 2.5
469
Example:
Request message:
POST /API/AI/FDAttendance/Get HTTP/1.1
{
"version": "1.0"
}
Response message:
{
"result": "success",
"data": {
"fd_atd_info": {
"enable": true,
"mode": "Week",
"mode_week": "Mon.",
"mode_month_day": "1",
"send_email": "07:30:00",
"on_duty_time": "09:30:00",
"off_duty_time": "18:30:00",
"working_days": [
"Mon.",
"Tue.",
"Wed.",
"Thu.",
"Fri.",
"Sat.",
"Sun."
],
"channel": [
"CH1",
"CH2",
"CH3",
"CH4",
"CH5",
"CH6",
"CH7",
"CH8"
],
"group": [
"1",
"2",
"4",
"5",
470
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16"
]
}
}
}
GetId
URL POST /API/AI/AddedFaces/GetId
Description It is used to get added faces id
Request Body See Table-17.3.3
Successful Response get added faces id JSON (show as follow Table-17.3.4)
Table-17.3.3
KEY VALUE COMMENT
RANGE TYPE
MsgId null
[2, 3, 7, 8, 9, 10, 11, The group that needs to obtain the face ID
GrpId 12, 13, 16, 17, 18, 19, int array
20, 21]
Table-17.3.4
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Get the result of all face IDs in a given
Result 0 int group according to the group ID,
See Table-17. x.x
Count int Face Id count in group
Each digit represents the unique identification of
[1,3,4,5,6,7,9,10,11,12
FaceIds int array the face in the group, which can be used to obtain
,13,14,15,16,23,25]
all the information of the face
471
Example:
Request message:
POST /API/AI/AddedFaces/GetId HTTP/1.1
{
"version": "1.0",
"data": {
"MsgId": "",
"GrpId": [2, 3, 7, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21]
}
}
Response message:
{
"data": {
"MsgId": "",
"Result": 0,
"Count": 16,
"FaceIds": [
1,
3,
4,
5,
6,
7,
9,
10,
11,
12,
13,
14,
15,
16,
23,
25
]
}
}
Search
472
URL POST /API/AI/FaceStatistics/Search
Description It is used to search face statistics
Request Body See Table-17.4.1.1
Successful Response Search face statistics JSON (show as follow Table-17.4.1.5)
Get
URL POST /API/AI/FaceStatistics/Get
Description It is used to get face statistics
Request Body See Table-17.4.1.2
Successful Response Face statistics JSON (show as follow Table-17.4.1.3)
Table-17.4.1.1
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Which engine was used, 0 or 1, this will match
Engine 0 int
with <Search> interface
StartTime string Start time :"2020-07-12 00:00:00"
EndTime string End time:"2020-07-12 23:59:59"
The channel to be searched, and the value
Chn [0, 1, 2, 3, 4, 5, 6, 7, 8] array
represents the channel
The group to search. The value represents the
Group [1, 2, 5, 9, 13….] array group ID of the selected group. If it is blank, all
(including deleted groups) will be searched
Table-17.4.1.2
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Which engine was used, 0 or 1, this will match
Engine 0 int
with <Search> interface
Requerst start index, For example
1st: 0-9999
StartIndex 0 int 2nd: 10000-19999
Then Start Index should be 0, 10000
473
Result 0 int See Table-17.x.x
channel_max int Max Channels
Count int Total number of objects in this response
Face statistics JSON (show as follow Table-
Statistics array
17.4.1.4)
The number of
StrChn string
channels depends on
the capabilities of the
device.
Example:
Request message:
POST /API/AI/FaceStatistics/Search HTTP/1.1
{
"data": {
"MsgId": null,
"Engine": 0,
"StartTime": "2018-10-20 00:00:00",
"EndTime": "2018-10-28 23:59:59",
"Chn": [0, 1, 2, 3, 4, 5, 6, 7, 8],
"Group": [1, 2, 5, 9, 13]
}
}
474
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"Count": 160000
}
}
Example:
Request message:
POST /API/AI/FaceStatistics/Get HTTP/1.1
{
"data": {
"MsgId": null,
"Engine": 0,
"StartIndex": 0,
"Count": 10000
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"Count": 10000,
"Statistics": [
{
"Group": 1,
"Time": 1540444116,
"Chn": 3,
"StrChn":"CH4",
},
{
"Group": 3,
"Time": 1540444119,
"Chn": 4,
"StrChn":"CH5",
},
{
...
},
...
]
475
}
}
Get
URL POST /API/AI/ObjectStatistics/Get
Description It is used to get object statistics
Request Body object statistics JSON (show as follow Table-17.4.2.1)
Successful Response object statistics JSON (show as follow Table-17.4.2.2)
Example:
Request message:
POST/API/AI/ObjectStatistics/Get HTTP/1.1
{
"data": {
"MsgId": null,
"Engine": 0,
"TimePoints":[
"2020-07-0600:00:00",
"2020-07-07 00:00:00",
"2020-07-0800:00:00",
"2020-07-09 00:00:00",
"2020-07-1000:00:00",
"2020-07-11 00:00:00",
"2020-07-1200:00:00",
"2020-07-13 00:00:00"
]
] "Chn": [0, 1, 2, 3, 4, 5, 6, 7, 8],
"Type": [1, 2]
}
}
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"ObjectCount": [3650, 1230, 1980, 1002, 5000, 8900, 8897]
}
}
477
17.4.3 Cross Counting Statistics
GET
URL POST /API/AI/CCStatistics/Get
Description It is used to getCC statistics
Request Body See Table -17.4.3.1
Successful Response Channel Information JSON (show as follow Table-17.4.3.1)
SET
URL POST /API/AI/CCStatistics/Set
Description It is used to set the CCt parameters
Request Body Channel Information JSON (show as follow Table-17.4.3.2)
Successful Response Channel Information JSON (show as follow Table-17.4.3.2)
"Offline","Online",
status string Note: This field is not available when the channel
“Nonsupport”
is online
Example:
Request message:
POST /API/AI/CCStatistics/SetHTTP/1.1
{
"data": {
"channel_info": {
"CH5": {
"search_date": "2020-08-26",
"report_type": "Daily report",
"detection_type": "Person",
"cross_type": "Cross In"
}
}
479
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH5": {
"report": [
18,
29,
0,
0,
0,
0,
0,
11,
2,
4,
3,
1,
0,
11,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0
]
}
}
}
}
GET
480
URL POST /API/AI/HeatMapStatistics/Get
Description It is used to get heat map statistics
Request Body See Table -17.4.4.1
Successful Response Channel Information JSON (show as follow Table-17.4.4.1)
SET
URL POST /API/AI/HeatMapStatistics/Set
Description It is used to set the alarm attribute detect parameters
Request Body Channel Information JSON (show as follow Table-17.4.4.2)
Successful Response Channel Information JSON (show as follow Table-17.4.4.2)
481
Table-17.4.4.4 (Channel Information JSON)
KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital channels.
"Offline","Online",
status string Note: This field is not available when the channel
“Nonsupport”
is online
date string Search date
Start hour, valid when reportType is "Daily
start_hour int
0 - 23 report"
End hour, valid when reportType is "Daily
end_hour 0 - 23 int
report"
"Daily report" Report tyep
"Weekly report"
report_type string
"Monthly report"
"Annual report"
detection_type "Motion" "face" string Detection type
Heatmap type:
heat_map_type int 1 – Space Heatmap
0 – Time heatmap
Example:
Request message:
POST /API/AI/HeatMapStatistics/SetHTTP/1.1
{
"data": {
"channel_info": {
"CH1": {
"date": "2020-08-26",
"start_hour": 0,
"end_hour": 23,
"report_type": "Daily report",
"detection_type": "Motion",
"heat_map_type": 1
}
}
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH1": {
"report_type": "Daily report",
"detection_type": "Motion",
"heat_map_type": 1,
"heat_map_width": 44,
"heat_map_height": 36,
"space_heat_map": [89,82,103,31, ... ],
"background": "base64(imgData)"
}
}
}
}
483
(NVR、IPC only, not for A01)
Get
URL POST /API/AI/processAlarm/Get
Description It is used to Get faceor objectalarm real-time appeal
Request Body none
Successful Response The face or object alarm real-time appeal JSON (show as follow Table-17.5.1)
Table-17.5.1
KEY VALUE COMMENT
RANGE TYPE
FaceInfo JSON array FaceInfo JSON show as follow Table-17.5.2
SnapedObjInfoJSON show as follow Table-
SnapedObjInfo JSON array
17.5.3
Table-17.5.2(FaceInfoJSON)
KEY VALUE COMMENT
RANGE TYPE
Id int Face Id, unique identifier (nvr only)
GrpId int Group Id (nvr only)
SnapId unsigned int The Snap Id for captured image for front-end IPC
Type 0 int Type for Face captured objects
Capturing start time, such as: 13:08:36, 2018-10-
unsigned long
StartTime 25, Unix time stamp (displayed uniformly
long
according to UTC time zone)
Capturing end time, such as: 13:08:36, 2018-10-
unsigned long
EndTime 25, Unix time stamp (displayed uniformly
long
according to UTC time zone)
Similarity float Similarity such as: 93.56932(nvr only)
Score int Image score (confidence) (nvr only)
Gender:
Sex int 0- male
1- female
Age int Age
Gender for Face attribute:
Gender int 0- male
1- female
fAttrAge int Age for face attribute
Beauty int Beauty
Glasses Type
0: no glasses
GlassesType int
1: wear glasses (at present, there is no distinction
between sunglasses and ordinary glasses, Default
484
is all glasses)
Emotion type:
0:no expression
Expression int
1:Smile
2:Laugh
Mask type
MouthMask int 0: no mask
1: wear mask
Race type:
0:Yellow,
Race int 1:White,
2:Black,
3:Arab
Chn int Channel
“CH1”…”CH1x”
“IP_CH1”…”
IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
StrChn string Channel
The number of
channels depends on
the capabilities of the
device.
The number of modifications, the upper layer is
read-only, and the device side updates the face
ModifyCnt int
information in real time each time it modifies it
(nvr only)
Image1 "base64(imgData)" string Imported face image
Image2 "base64(imgData)" string Captured face pictures
Image3 "base64(imgData)" string Captured Human pictures
Image4 "base64(imgData)" string Captured background pictures
Feature "base64(feature)" string eigenvalue (nvr only)
Name "Mike" string Name (nvr only)
Country "China" string Country (nvr only)
Nation "Han" string Nationality (nvr only)
NativePlace "Guangdong,Zhuhai" string Native Place (nvr only)
"41502519920305091 Id code (nvr only)
IdCode string
6"
Job "Software" string Job (nvr only)
Phone "12345678902" string Phone (nvr only)
Email "[email protected]" string Email (nvr only)
"Guangdong,Zhuhai, residence (nvr only)
Domicile string
Xiangzhou ..."
485
"Detail of this Remark (nvr only)
Remark string
person ..."
Table-17.5.2(SnapedObjInfo JSON)
KEY VALUE COMMENT
RANGE TYPE
chn string Channel
“CH1”…”CH1x”
“IP_CH1”…”
IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”
StrChn string Channel
The number of
channels depends on
the capabilities of the
device.
GrpId int Group Id
Capturing start time, such as: 13:08:36, 2018-10-
unsigned long
StartTime 25, Unix time stamp (displayed uniformly
long
according to UTC time zone)
Capturing end time, such as: 13:08:36, 2018-10-
unsigned long
EndTime 25, Unix time stamp (displayed uniformly
long
according to UTC time zone)
ObjectImage "base64(imgData)" string Imported face image
Background "base64(imgData)" string Captured face pictures
SnapId unsigned int Snap Id of capturing image for front-end IPC
Catpured object Type
0- face
1- Human
2- Vehicle
Type int
3- PID human
4- PID vehicle
5- LCD human
6- LCD vehicle
Example:
Response message:
{
"data": {
"FaceInfo":[
{
"Id": 1,
"GrpId": 1,
486
"SnapId": 1250,
"StartTime": 1540444116,
"EndTime": 1540444126,
"Similarity": 93.56932,
"Score": 87,
"Gender": 0,
"fAttrAge": 26,
"Chn": "CH1",
"ModifyCnt": 0,
"Image1": "base64(imgData)",
"Image2": "base64(imgData)",
"Image3": "base64(imgData)",
"Image4": "base64(imgData)",
"Feature": "base64(feature)",
"Name": "Mike",
"Country": "China",
"Nation": "Han",
"NativePlace": "Guangdong,Zhuhai",
"IdCode": "415025199203050916",
"Job": "Software",
"Phone": "12345678902",
"Email": "[email protected]",
"Domicile": "Guangdong,Zhuhai,Xiangzhou ...",
"Remark": "Detail of this person ..."
},
"SnapedObjInfo": [
{
"Chn": "CH1",
"StartTime": 1540444116,
"EndTime": 1540444137,
"ObjectImage": "base64(imgData)",
"Background": "base64(imgData)",
"SnapId": 2375,
"Type": 1
}
]
}
}
17.6Attribute Detection
GET
487
URL POST/API/AI/Alarm/AttributeDetect/Get
Description It is used to get the alarm attribute detect config parameters
Request Body See Table -17.6.1
Successful Response Channel Information JSON (show as follow Table-17.6.2)
SET
URL POST /API/AI/Alarm/AttributeDetect/Set
Description It is used to set the alarm attribute detect parameters
Request Body Channel Information JSON (show as follow Table-17.6.2)
Successful Response The successful result response that described in 2.5
488
RANGE TYPE
Channel online status, only for digital channels.
"Offline","Online", Note: This field is not available when the channel
status string
“Nonsupport” is online
Alarm type:
"Close" "NO Mask" 0 – Close
alarm_type string
"Wear Mask" 1 – No Mask
2 – Wear Mask
“Local->1”… Alarm out channel
”Local->x”
“IP_CH1->1”… Each array bit represents aalarm output channel
“IP_CH1->2”… with a string.
” IP_CHx->1” Camera:
alarm_out ” IP_CHx->2” array Local->1:Enable, empty, disable
The number of
channels depends on
the capabilities of the
device.
Latch time for IPC alarm out
"10","20","40",
latch_time string Value: 5 10 20 30
"60"
record_enable true, false bool Record channel switch
“CH1”…”CH1x” Record channel
“IP_CH1”…” Channel alarm linkage switch.
record_channel array
IP_CH1x”
“WIFI_CH1”…”
"30","60","120", Post recording time
post_recording string
"300" Ipc value: 0 5 10 20 30
send_email true, false bool Send Email switch
full_screen bool FullScreen switch(NVR only)
"0","10","20","40", Buzzer time(NVR only)
buzzer string
"60"
show_message bool Show Message switch(NVR only)
Example:
Request message:
POST /API/AI/Setup/CrossCount/Get HTTP/1.1
{
"version": "1.0",
“data”:{
"channel":["CH5"]
489
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"CH4": {
"alarm_type": "Wear Mask",
"buzzer": "10",
"alarm_out": [
"Local->1",
"IP_CH1->1",
"IP_CH4->1",
"IP_CH5->1"
],
"latch_time": "10",
"record_enable": true,
"record_channel": [
"CH1",
"CH2",
"CH3",
"CH4",
"CH5",
"CH6",
"CH7",
"CH8"
],
"post_recording": "60",
"show_message": true,
"send_email": true,
"full_screen": true,
}
}
}
}
17.7Repeat Customer
490
GET
URL POST/API/AI/SnapedFeaturesId/Get
Description It is used to get the SnapedFeaturesId parameters
Request Body See Table -17.7.1
Successful Response SnapedFeatures Information JSON (show as follow Table-17.7.2)
GET
URL POST /API/AI/FilterSnapedFaces/Get
Description It is used to get the FilterSnapedFaces parameters
Request Body See Table -17.7.3
Successful Response FilterSnapedFaces Information JSON (show as follow Table-17.7.6)
GET
URL POST /API/AI/MatchAddedFaces/Get
Description It is used to get the MatchAddedFaces parameters
Request Body See Table -17.7.7
Successful Response MatchAddedFaces Information JSON (show as follow Table-17.7.8)
Table -17.7.1
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Engine 0 int Search Engine, 0 or 1
Please be consistent with below API
/API/AI/SnapedFaces/Search
StartIndex 0 int Requerst start index, For example
1st: 0-9999
2nd: 10000-19999
Then Start Index should be 0, 10000
Table -17.7.3
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Engine 0 int Search Engine, 0 or 1
Please be consistent with below API
/API/AI/SnapedFaces/Search
MinInterval 5 int The time interval of face appearance, in
seconds. If it is less than this value, it
should not be included in the statistics.
The "bValid" field in the response results
indicates whether it should be included in
the statistics
Similarity 70 unsigned int Similarity used in filtering
Filter Json Object The target face to be filtered. JSON show
as follow Table-17.7.4
FtIdSet Json Object The collection that needs to be filtered.
JSON show as follow Table-17.7.5
Table-17.7.4
KEY VALUE COMMENT
RANGE TYPE
Unique identification for capturing faces, corresponding to
UUId 200053 unsigned int UUId in/API/AI/SnapedFeaturesId/Get
Table-17.7.5
KEY VALUE COMMENT
RANGE TYPE
unsigned int The elements in the array represent the unique
UUIds [200053, 200054, ...]
array identification of the captured face
The element in the array represents the
unsigned int
FtIds [58, 59, ...] eigenvalue Id of the captured face, which
array
corresponds to the Id in "UUIds" one by one
492
MsgId null
Returns the result of the face Id matching
Result 0 int the filter in the target set. 0 indicates
success. See Table-17. x.x for details
Count 6 int Number of filtered faces
unsigned int The elements in the array represent the unique
MatchedIds [200053, 200059, ...]
array identification of the captured face
The element in the array indicates whether the
corresponding face can be used for counting
statistics. If the occurrence interval is less than
Counting [1, 0, 0, 1, 1, ...] int array the minimum interval, the value is 0, which
should not be included in the statistics.
Otherwise, it is 1, which should be included in the
statistics
Table -17.7.7
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Engine 0 int Search Engine, 0 or 1
Please be consistent with below API
/API/AI/SnapedFaces/Search
Similarity 70 int Similarity you used during the comparison
GrpIds [1, 2, 3, 5] int array Which groups of faces in the base database
are used to identify the identity. If the
value is not given or empty, it means that
all groups (excluding Internal) are used.
Generally, the value is not given
UUIds [200053, 200059, 210010, ...] unsigned int The elements in the array represent the
array unique identification in the captured face
Response message:
{
"data": {
"MsgId": null,
"Result": 0,
"UUIds": [200053, 200054, ...],
"FtIds": [58, 59, ...]
}
}
Request message:
POST /API/AI/FilterSnapedFaces/Get HTTP/1.1
{
"version": "1.0",
"data": {
"MsgId": "",
"Engine": 0,
"MinInterval": 0,
"Similarity": 70,
"Filter": {
"UUId": 20402,
"FtId": 20402
},
"FtIdSet": {
"UUIds": [20402, 20403, 20408, 20404, 20405, ...],
"FtIds": [20402, 20403, 20408, 20404, 20405, ...]
}
494
}
}
Response message:
{
"data": {
"MsgId": "",
"Result": 0,
"Count": 189,
"MatchedIds": [20402, 20404, 20406, 20410, 20412,...],
"Counting": [1, 1, 1, 1, 1, 1, 1, 1,...]
}
}
Request message:
POST /API/AI/MatchAddedFaces/Get HTTP/1.1
{
"version": "1.0",
"data": {
"MsgId": "",
"Similarity": 70,
"GrpIds": [],
"Engine": 1,
"UUIds": [21411, 21409, 21408, 21407, 21405, ...]
}
}
Response message:
{
"data": {
"MsgId": "",
"Result": 0,
"FaceIds": [25, 25, 25, -1, 25, ...]
}
}
495
17.8.1 RealTime Info
GET
URL POST/API/AI/Scenario/CC/RealTime/Get
Description It is used to get the CrossCountingApp RealTimeInfo
Request Body See Table -17.8.1.1
Successful Response Cross Counting RealTime Information JSON (show as follow Table-17.8.1.2)
SET
URL POST/API/AI/Scenario/CC/RealTime/Set
Description It is used to clear the CrossCountingApp RealTimeInfo
Request Body See Table -17.8.1.1
Successful Response Cross Counting RealTime Information JSON (show as follow Table-17.8.1.2)
496
ChnId int Channel Id
EnterCnt int Number of entrants
ExitCnt int Number of departures
StayCnt int Number of stays
AvailableCnt int Available capacity
Triggered count Type:
ObjType int
0:Motion 1:Persion 2:Vehicle
Example:
Request message:
POST /API/AI/Scenario/CC/RealTime/Get
{
"version": "1.0",
"data": {
"msgType": "get_CCScenario_RTData"
}
}
POST /API/AI/Scenario/CC/RealTime/Set
{
497
"version": "1.0",
"data": {
"msgType": "clear_CCScenario_RTData",
"clear_type": "Group",
"groupId": 1
}
}
Response message:
{
"result": "success",
"data": {
"CCScenarioRTInfo": [
{
"Channels": [
{
"ChnId": 1,
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0,
"AvailableCnt": 10,
"ObjType": 0
}
],
"Groups": [
{
"GroupId": 0,
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0,
"AvailableCnt": 10,
"ObjType": 1,
"ChnDetail": [
{
"ChnId": 0,
"EnterCnt": 0,
"ExitCnt": 0
}
]
}
]
}
498
]
}
}
17.8.2 Map
GET
URL POST /API/AI/Scenario/CC/MapConfig/Get
Description It is used to get the Cross Counting Scenario Map
Request Body See Table -17.8.2.1
Successful Response Map Information JSON (show as follow Table-17.8.2.2)
SET
URL POST /API/AI/Scenario/CC/MapConfig/Set
Description It is used to set the Cross Counting Scenario Map
Request Body Map Information JSON (show as follow Table-17.8.2.2)
499
XPos int X-axis coordinate in the map
YPos int Y-axis coordinate in the map
Example:
Request message:
POST/API/AI/Scenario/CC/MapConfig/Get
{
"data": {
"GroupId": 0
}
}
Response message:
{
"data": {
"RefWidth": 1920,
"RefHeight: 1080,
"CamPos": [
{
"ChnId": 0,
"XPos": 362,
"YPos": 936
},
{
"ChnId": 3,
"XPos": 1830,
"YPos": 289
},
......
]
"MapImage": base64
}
}
Request message:
POST/API/AI/Scenario/CC/MapConfig/Set
{
"data": {
"GroupId": 0,
"RefWidth": 1920,
"RefHeight": 1080,
"CamPos": [
{
500
"ChnId": 0,
"XPos": 100,
"YPos": 100
},
{
"ChnId": 2,
"XPos": 100,
"YPos": 100
}
]
"MapImage": base64 (optional)
}
}
Response message:
{
"result": "success",
"data": {}
}
17.8.3 Statistics
GET
URL POST /API/AI/Scenario/CC/Statistics/Get
Description It is used to get CC Scenario Statistics
Request Body See Table -17.8.3.1
Successful Response Response Information JSON (show as follow Table-17.8.3.2)
SET
URL POST /API/AI/Scenario/CC/Statistics/Set
Description It is used to set CC Scenario Statistics
Request Body Request Information JSON (show as follow Table-17.8.3.3)
Successful Response Response Information JSON (show as follow Table-17.8.3.4)
501
the device.
502
RANGE TYPE
ChnId int Channel Number
Channel Statistics data
Num Object array
JSON show as follow Table-17.8.3.7
Example:
Request message:
POST /API/AI/Scenario/CC/Statistics/Set
{
"version": "1.0",
"data":{
"Channels" : [0,3],
"Groups": [],
"Date" : "2021-01-14",
"ReportType" : "Week",
"ChnObjType" : [1,1],
"GrpObjType" : []
}
} Response message:
{
"result": "success",
"data": {
"Channels": [
{
"ChnId": 0,
"Num": [
{
"EnterCnt": 0,
"ExitCnt": 0,
503
"StayCnt": 0
},
{
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0
},
{
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0
},
{
"EnterCnt": 11,
"ExitCnt": 3,
"StayCnt": 8
},
{
"EnterCnt": 16,
"ExitCnt": 2,
"StayCnt": 14
},
{
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0
},
{
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0
}
]
},
{
"ChnId": 3,
"Num": [
{
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0
},
{
"EnterCnt": 0,
504
"ExitCnt": 0,
"StayCnt": 0
},
{
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0
},
{
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0
},
{
"EnterCnt": 1,
"ExitCnt": 0,
"StayCnt": 1
},
{
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0
},
{
"EnterCnt": 0,
"ExitCnt": 0,
"StayCnt": 0
}
]
}
]
}
}
17.8.4 Config
GET
URL POST /API/AI/Scenario/CC/Config/Get
Description It is used to get the CC Scenario config parameters
Request Body See Table -17.8.4.1
505
Successful Response Config Information JSON (show as follow Table-17.1.4.2)
SET
URL POST /API/AI/Scenario/CC/Config/Set
Description It is used to set the CC Scenario parameters
Request Body Channel Information JSON (show as follow Table-17.1.4.2)
Successful Response The successful result response that described in 2.5
506
“IP_CH1->1”… Each array bit represents aalarm output channel
“IP_CH1->2”… with a string.
” IP_CHx->1” Camera:
” IP_CHx->2” Local->1: Enable,Empty: Disable
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Latch time for Alarm output
chn_latch_time string
"60"
The number of
channels depends on
the capabilities of the
device.
"10","20","40", Latch time for Alarm output
grp_latch_time string
"60"
Example:
Request message:
POST /API/AI/Scenario/CC/Config/Set
{
507
"version": "1.0",
"data": {
"adSwitch": false,
"ad_displayMode": false,
"ad_seqTime": 1,
"channel_info": {
"CH1": {
"channel_switch": false,
"channel_group": -1,
"channel_capacity": 11,
"chn_set_enable": false,
"chn_buzzer": "0",
"chn_alarm_out": [],
"chn_latch_time": "20"
},
"CH8": {
"channel_switch": false,
"channel_group": 4,
"channel_capacity": 33,
"chn_set_enable": false,
"chn_buzzer": "0",
"chn_alarm_out": [],
"chn_latch_time": "10"
}
},
"group_info": {
"Group1": {
"group_switch": false,
"group_capacity": 30,
"start_time": "00:00:00",
"end_time": "23:59:59",
"alarm_type": "Person",
"grp_buzzer": "0",
"grp_alarm_out": [],
"grp_latch_time": "10"
},
"Group8": {
"group_switch": false,
"group_capacity": 10,
"start_time": "00:00:00",
"end_time": "23:59:29",
"alarm_type": "Person",
"grp_buzzer": "0",
"grp_alarm_out": [],
508
"grp_latch_time": "10"
}
}
}
}
Response message:
{
"result": "success",
"data": {}
}
SET
URL POST /API/AI/Scenario/CC/Config/ImageManage
Description It is used to set the CC Scenario Image
Request Body Request Information JSON (show as follow Table-17.8.5.1)
Successful Response Response Information JSON (show as follow Table-17.8.5.2)
Example:
509
Request message:
POST /API/AI/Scenario/CC/Config/ImageManage
{
"version": "1.0",
"data": {"operate": "GetImageList"}
}
Response message:
{
"result": "success",
"data": {
"max_count": 16,
"image_list": [
"c278.png",
"c236.png",
"c263.png"
]
}
}
Request message:
POST /API/AI/Scenario/CC/Config/ImageManage
{
"result": "success",
"data": {
"operate": "AddImage",
"image_name": "eeeeee.jpg",
"image_data": " base64(imgData)"
}
}
Response message:
{
"result": "success",
"data": {}
}
Request message:
POST /API/AI/Scenario/CC/Config/ImageManage
{
"version": "1.0",
"data": {
"operate": "DeleteImage",
"image_list": [
"c278.png",
"c236.png",
510
"c263.png"
]
}
}
Response message:
{
"result": "success",
"data": {
"c278.png": "Delete success!",
"c236.png": "Delete success!",
"c263.png": "Delete success!"
}
}
Request message:
POST /API/AI/Scenario/CC/Config/ImageManage
{
"version": "1.0",
"data": {
"operate": "GetImageData",
"image_name": "c70.png"
}
}Response message:
{
"result": "success",
"data": {
"image_name": "c70.png",
"image_data": " base64(imgData)"
}
}
18 Extended Functionality
18.1 IPCVoice Prompt
18.1.1 Description
GET
URL POST /API/Extended/IPCVoicePrompts/Get
Description It is used to get the IPC voice prompt config parameters
Request Body See Table -18.1.2.1
Successful Response Parameter Information JSON (show as follow Table-18.1.2.2)
SET
URL POST /API/Extended/IPCVoicePrompts/Set
Description It is used to operate the voice prompt function of IPC
Request Body See Table -18.1.2.1
Successful Response The successful result response that described in 2.5
512
18.1.2 Syntax
513
18.1.3 Example
Request message:
POST/API/Extended/IPCVoicePrompts/Ge
{
"data": {
"command": "GetAudioFilesList "
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
"audio_list": [
"5_13227.mp3", //Each items of this list was separated to two parts by “_”, the front part is the only
one number that was distributed to the audio file by system.
"6_9528.mp3",
"7_AlienBoi.mp3"
]
}
}
POST API/Extended/IPCVoicePrompts/Get
{
"data": {
"command": "GetAudioIndex"
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"IP_CH1": {
"status": "Online",
"audio_index": 2
},
514
"IP_CH2": {
"status": "Online",
"audio_index": 3
}
}
}
}
POST API/Extended/IPCVoicePrompts/Set
{
"data": {
"command": "ConfigureAudioIndex",
"channel_info": {
"IP_CH1": {
"audio_index": 2
},
"IP_CH2": {
"audio_index": 3
}
}
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
"IP_CH1": {
"status": "Online",
"audio_index": 2
},
"IP_CH2": {
"status": "Online",
"audio_index": 3
}
}
}
}
515
18.1.3.4Request Playor Stop Audio
POST API/Extended/IPCVoicePrompts/Set
{
"data": {
"command": "PlayAudio", //”StopPlaying”
"channel": [
"CH1", “CH2”
]
}
}
Response message:
{
"result": "success",
"data": {}
}
19 Push
19.1.1 Description
GET
URL POST /API/Push/GetToken
Description Rspush get AccessToken
Request Body See Table -19.1.1.1
Successful Response Parameter Information JSON (show as follow Table -19.1.1.2)
GET
URL POST /API/Push/Query
Description Rspush Query rspush parameter
Request Body See Table -19.1.1.3
Successful Response Parameter Information JSON (show as follow Table -19.1.1.4)
SET
URL POST /API/Push/Subscribe
Description Rspush Subscribe
Request Body See Table -19.1.1.10
Successful Response The successful result response that described in 2.5
516
SET
URL POST /API/Push/Unsubscribe
Description Rspush Unsubscribe
Request Body See Table -19.1.1.1
Successful Response The successful result response that described in 2.5
GET
URL POST /API/Push/QueryDefault
Description Rspush QueryDefault
Request Body None
Successful Response Parameter Information JSON (show as follow Table -19.1.1.12)
GET
URL POST /API/PushSubscribe/Get
Description Tutkpush Subscribe Parameter Get
Request Body None
Successful Response Parameter Information JSON (show as follow Table -19.1.1.13)
SET
URL POST /API/PushSubscribe/Set
Description Tutkpush Subscribe Parameter Set
Request Body Parameter Information JSON (show as follow Table -19.1.1.13)
Successful Response The successful result response that described in 2.5
19.1.2 Syntax
Table -19.1.1.2
KEY VALUE COMMENT
RANGE TYPE
AccessToken string
517
The default parameter with this field is
returned with the parameter
Table -19.1.1.4
KEY VALUE COMMENT
RANGE TYPE
Default JSON object Default,Please refer to Table -19.1.1.5
JSON object Subscribe parameter,Please refer to
Filter
Table -19.1.1.8
518
KEY VALUE COMMENT
RANGE TYPE
Object
Group Please refer to Table -19.1.1.7
array
Table -19.1.1.12
KEY VALUE COMMENT
RANGE TYPE
JSON object Default Parameter,Please refer to Table -
Types
19.1.1.5
Table -19.1.1.13
KEY VALUE COMMENT
RANGE TYPE
HddAlarm JSON object Please refer to Table -19.1.1.14
IOAlarm JSON object Please refer to Table -19.1.1.15
LowPower JSON object Please refer to Table -19.1.1.15
MotionAlarm JSON object Please refer to Table -19.1.1.15
PIRAlarm JSON object Please refer to Table -19.1.1.15
SmartAlarm JSON object Please refer to Table -19.1.1.15
VideoLoss JSON object Please refer to Table -19.1.1.15
HumanVehicle JSON object Please refer to Table -19.1.1.15
FaceAlarm JSON object Please refer to Table -19.1.1.16
LCDAlarm JSON object Please refer to Table -19.1.1.15
PIDAlarm JSON object Please refer to Table -19.1.1.15
SODAlarm JSON object Please refer to Table -19.1.1.15
PDAlarm JSON object Please refer to Table -19.1.1.15
520
FDAlarm JSON object Please refer to Table -19.1.1.15
CCAlarm JSON object Please refer to Table -19.1.1.15
ADAlarm JSON object Please refer to Table -19.1.1.15
CDAlarm JSON object Please refer to Table -19.1.1.15
QDAlarm JSON object Please refer to Table -19.1.1.15
LPDAlarm JSON object Please refer to Table -19.1.1.15
RSDAlarm JSON object Please refer to Table -19.1.1.15
VTAlarm JSON object Please refer to Table -19.1.1.15
SDAlarm JSON object Please refer to Table -19.1.1.15
Table -19.1.1.14
KEY VALUE COMMENT
RANGE TYPE
Enabled Int
Type Int
Table -19.1.1.15
KEY VALUE COMMENT
RANGE TYPE
ChnFlags Int array
Table -19.1.1.16
KEY VALUE COMMENT
RANGE TYPE
Group object array Please refer to Table -19.1.1.17
Table -19.1.1.17
KEY VALUE COMMENT
RANGE TYPE
Id int
Name string
ChnFlags Int array
Table -19.1.1.18
KEY VALUE COMMENT
RANGE TYPE
notification_int int Time interval of notification
erval
notification_int int Notification of displaying the
erval_max maximum subscribing time for app
notification_int Int Notification of displaying the
erval_min minimum subscribing time for app
521
19.1.3 Example
Request message:
POST/API/Push/GetToken
{
"data": {
"Token": "f06214c1d9348dee11a513213c9a38d0b62c9ffd32d1c1b6f6485117d1f187b9"
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
"AccessToken":
"eyJhbGciOiJFUzI1NiIsImtpZCI6InJzdHM4Mjg1NWI4MmNmNDk0YWM5OWNiZGM4OTQ2YTQ0YWYxNy
J9.eyJhdWQiOlsicHNfZGVsIl0sIlgtc3ViIjp7IlRva2VuIjoiZjA2MjE0YzFkOTM0OGRlZTExYTUxMzIxM2M5Y
TM4ZDBiNjJjOWZmZDMyZDFjMWI2ZjY0ODUxMTdkMWYxODdiOSIsIlVVSUQiOiI2ZTMzMjJjMy01MjF
mLTQ0OWItYjk0Yy00MjE5ZGJiOTIwMmMifX0.ec_DrzO6AYidvJytmKADN9iW4sy3LqHBMJj9QEVaySquql
by43Oe5UvtqrU0y0t6o8cno6ypX9v4vzp5QGRbZw"
}
}
Request message:
POST/API/Push/Query
{
"data": {
"Token": "f06214c1d9348dee11a513213c9a38d0b62c9ffd32d1c1b6f6485117d1f187b9",
"app_support_ai_notification_subscribe":true
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
"Default": {
"notification_interval_max": 30,
"notification_interval_min": 1,
"notification_interval": 5,
"StorageError": "True",
"StorageFull": "True",
"StorageUnformatted": "True",
"StorageNull": "True",
522
"StorageReadOnly": "True",
"Motion": "True",
"IOAlarm": "True",
"PIRAlarm": "True",
"LCD": "True",
"PID": "True",
"PD&VD": "True",
"FD": "True",
"AD": "True",
"CC": "True",
"CD": "True",
"QD": "True",
"RSD": "True",
"LPD": "True",
"SOD": "True",
"VT": "True",
"SD": "True",
"AiFaceDetection": {
"Group": [
{
"Name": "Allow List",
"AutoSubscribe": "True"
},
{
"Name": "Block List",
"AutoSubscribe": "True"
},
{
"Name": "Stranger",
"AutoSubscribe": "True"
},
{
"Name": "Group 1",
"AutoSubscribe": "True"
},
{
"Name": "Group 2",
"AutoSubscribe": "True"
},
{
"Name": "Group 3",
"AutoSubscribe": "True"
}
]
523
},
"AiHuman": "True",
"AiVehicle": "True",
"VideoLoss": "True"
},
"Filter": {
"Intellect": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"IOAlarm": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"Motion": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
524
8,
9
]
},
"PIRAlarm": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"StorageError": {},
"StorageFull": {},
"StorageNull": {},
"StorageReadOnly": {},
"StorageUnformatted": {},
"VideoLoss": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
}
}
}
}
Request message:
POST/API/Push/Subscribe
{
525
"data": {
"Filter": {
"LCD": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"PID": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"PD&VD": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
526
"FD": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"AD": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"CC": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"CD": {
"Channel": [
527
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"QD": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"RSD": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"LPD": {
"Channel": [
0,
1,
528
2,
3,
4,
5,
6,
7,
8,
9
]
},
"SOD": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"VT": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"SD": {
"Channel": [
0,
1,
2,
3,
529
4,
5,
6,
7,
8,
9
]
},
"IOAlarm": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"Motion": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"PIRAlarm": {
"Channel": [
0,
1,
2,
3,
4,
5,
530
6,
7,
8,
9
]
},
"StorageError": {},
"StorageFull": {},
"StorageNull": {},
"StorageReadOnly": {},
"StorageUnformatted": {},
"VideoLoss": {
"Channel": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
}
},
"Mobile": {
"AppID": "com.RXCamView.push",
"Language": "zh-Hans",
"PushChannel": "APNS",
"Token":
"eyJhbGciOiJFUzI1NiIsImtpZCI6InJzdHM4Mjg1NWI4MmNmNDk0YWM5OWNiZGM4OTQ2YTQ0YWYxNy
J9.eyJhdWQiOlsicHNfZGVsIl0sIlgtc3ViIjp7IlRva2VuIjoiZjA2MjE0YzFkOTM0OGRlZTExYTUxMzIxM2M5Y
TM4ZDBiNjJjOWZmZDMyZDFjMWI2ZjY0ODUxMTdkMWYxODdiOSIsIlVVSUQiOiI2ZTMzMjJjMy01MjF
mLTQ0OWItYjk0Yy00MjE5ZGJiOTIwMmMifX0.ec_DrzO6AYidvJytmKADN9iW4sy3LqHBMJj9QEVaySquql
by43Oe5UvtqrU0y0t6o8cno6ypX9v4vzp5QGRbZw"
}
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
531
"data": {}
}
Request message:
POST/API/Push/Unsubscribe
{
"data": {
"Token": "f06214c1d9348dee11a513213c9a38d0b62c9ffd32d1c1b6f6485117d1f187b9"
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {}
}
Request message:
POST/API/Push/QueryDefault
null
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
"Types": {
"StorageError": "True",
"StorageFull": "True",
"StorageUnformatted": "True",
"StorageNull": "True",
"StorageReadOnly": "True",
"Motion": "True",
"IOAlarm": "True",
"PIRAlarm": "True",
"LCD": "True",
"PID": "True",
"PD&VD": "True",
"FD": "True",
"AD": "True",
"CC": "True",
"CD": "True",
"QD": "True",
"RSD": "True",
"LPD": "True",
532
"SOD": "True",
"VT": "True",
"SD": "True",
"VideoLoss": "True"
}
}
}
Request message:
POST/API/PushSubscribe/Get
{
"data": {
"app_support_ai_notification_subscribe":true
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {
"HddAlarm": {
"Enabled": 0,
"Type": 0
},
"IOAlarm": {
"ChnFlags": [
255,
255
]
},
"LowPower": {
"ChnFlags": [
255,
0
]
},
"MotionAlarm": {
"ChnFlags": [
255,
255
]
},
"PIRAlarm": {
"ChnFlags": [
533
255,
255
]
},
"LCDAlarm": {
"ChnFlags": [
255,
255
]
},
"PIDAlarm": {
"ChnFlags": [
255,
255
]
},
"SODAlarm": {
"ChnFlags": [
255,
255
]
},
"PDAlarm": {
"ChnFlags": [
255,
255
]
},
"FDAlarm": {
"ChnFlags": [
255,
255
]
},
"CCAlarm": {
"ChnFlags": [
255,
255
]
},
"ADAlarm": {
"ChnFlags": [
255,
255
534
]
},
"CDAlarm": {
"ChnFlags": [
255,
255
]
},
"QDAlarm": {
"ChnFlags": [
255,
255
]
},
"LPDAlarm": {
"ChnFlags": [
255,
255
]
},
"RSDAlarm": {
"ChnFlags": [
255,
255
]
},
"VTAlarm": {
"ChnFlags": [
255,
255
]
},
"SDAlarm": {
"ChnFlags": [
255,
255
]
},
"VideoLoss": {
"ChnFlags": [
255,
255
]
},
535
"HumanVehicle": {
"ChnFlags": [
255,
255
]
},
"FaceAlarm": {
"Group": [
{
"Id": 2,
"Name": "Allow List",
"ChnFlags": [
0,
0
]
},
{
"Id": 3,
"Name": "Block List",
"ChnFlags": [
0,
0
]
},
{
"Id": 4,
"Name": "Stranger",
"ChnFlags": [
0,
0
]
},
{
"Id": 5,
"Name": "Group 1",
"ChnFlags": [
0,
0
]
},
{
"Id": 6,
"Name": "Group 2",
"ChnFlags": [
536
0,
0
]
},
{
"Id": 7,
"Name": "Group 3",
"ChnFlags": [
255,
0
]
}
]
}
}
}
Request message:
POST/API/PushSubscribe/Set
{
"data": {
"HddAlarm": {
"Enabled": 1,
"Type": 0
},
"IOAlarm": {
"ChnFlags": [
255,
255
]
},
"LowPower": {
"ChnFlags": [
255,
0
]
},
"MotionAlarm": {
"ChnFlags": [
255,
255
]
},
"PIRAlarm": {
537
"ChnFlags": [
255,
255
]
},
"LCDAlarm": {
"ChnFlags": [
255,
255
]
},
"PIDAlarm": {
"ChnFlags": [
255,
255
]
},
"SODAlarm": {
"ChnFlags": [
255,
255
]
},
"PDAlarm": {
"ChnFlags": [
255,
255
]
},
"FDAlarm": {
"ChnFlags": [
255,
255
]
},
"CCAlarm": {
"ChnFlags": [
255,
255
]
},
"ADAlarm": {
"ChnFlags": [
255,
538
255
]
},
"CDAlarm": {
"ChnFlags": [
255,
255
]
},
"QDAlarm": {
"ChnFlags": [
255,
255
]
},
"LPDAlarm": {
"ChnFlags": [
255,
255
]
},
"RSDAlarm": {
"ChnFlags": [
255,
255
]
},
"VTAlarm": {
"ChnFlags": [
255,
255
]
},
"SDAlarm": {
"ChnFlags": [
255,
255
]
},
"VideoLoss": {
"ChnFlags": [
255,
255
]
539
},
"HumanVehicle": {
"ChnFlags": [
255,
255
]
},
"FaceAlarm": {
"Group": [
{
"Id": 2,
"Name": "Allow List",
"ChnFlags": [
0,
0
]
},
{
"Id": 3,
"Name": "Block List",
"ChnFlags": [
0,
0
]
},
{
"Id": 4,
"Name": "Stranger",
"ChnFlags": [
0,
0
]
},
{
"Id": 5,
"Name": "Group 1",
"ChnFlags": [
0,
0
]
},
{
"Id": 6,
"Name": "Group 2",
540
"ChnFlags": [
0,
0
]
},
{
"Id": 7,
"Name": "Group 3",
"ChnFlags": [
255,
0
]
}
]
}
}
}
Response message:
HTTP/1.1 200 OK
{
"result": "success",
"data": {}
}
Appendixes
A.1Additional Error Codes(A01)
Set pu_error_code_alarm_motion_detec_para_
Motion detection alarms the parameter error
up error
IPC pu_error_code_alarm_hide_para_error Hidden alarms the parameter error
Para pu_error_code_alarm_invade_para_error Invasion detection alarms the parameter error
mete pu_error_code_alarm_count_para_error Target count alarms the parameter error
r pu_error_code_alarm_disturb_para_error Disturbance alarms the parameter error
pu_error_code_privacy_para_error Parameter error of privacy protection
pu_error_code_osd_para_error OSD Parameter error
pu_error_code_para_error Parameter error
pu_error_code_mutuallyexclusive_relationship Failed to set up because of mutually exclusive
pu_error_code_alarm_audio_up_para_error Audio up alarms the parameter error
pu_error_code_alarm_audio_down_para_error Audio down alarms the parameter error
pu_error_code_ircmode_para_error Parameter error of IRCUT mode
541
pu_error_code_unsupport_error Non-supported request
pu_error_code_parameter_error Parameter error
pu_error_code_partly_support Success in setting up the parameter partly
pu_error_code_device_busy Device Busy
pu_error_code_operate_flash_error FLASH error
pu_error_code_result_unsupported_dest Unsupported Corresponding service or APP
pu_error_code_result_passwd_weak Weak grade of password
pu_error_code_not_support_ability Non-support ability parameter
pu_error_code_update System is updating
pu_error_code_reboot System is rebooting
pu_error_code_restore Default configuration is recovering
Recovering operations of the default
pu_error_code_recover_oprate_forbidden
configuration and forbidden configuration
pu_error_code_roi_error_by_mjpeg Failed to set up MJPEG under ROI
Only mainstream, failed to set up substream
pu_error_code_roi_error_by_nosubstream
ROI
Conflict happen when setting up the trip zone
pu_error_code_tz_error_by_conflict
detection
Conflict happen when setting up the object
pu_error_code_oc_error_by_conflict
counting
Conflict happen when setting up the motion
pu_error_code_md_error_by_conflict
detection
Conflict happen when setting up the trip wire
pu_error_code_tw_error_by_conflict
detection
Conflict happen when setting up the area
pu_error_code_area_error_by_conflict detection(Perimeter 、 Goods left 、 Goods
remove)
Conflict happen when setting up video
pu_error_code_vd_error_by_conflict
interference
Intelligent-switch has been opened, failed to set
pu_error_code_igt_enable_conflict up Illuminance enhancement and
shelter
Illumination switch enabling, failed to set up
pu_error_code_illumination_enable_conflict
intelligence-switch and shelter
Video masking enabled, set smart switch,
pu_error_code_videoblock_enable_conflict
failed to find enhancement
Smart switch not enabled, failed to set up smart
pu_error_code_igt_fail_by_switchoff
service
Set up the number of tripwires over the
pu_error_code_tw_error_by_over_num
maximum number
Set up the number of zones over the maximum
pu_error_code_area_error_by_over_num
number 4
pu_error_code_area_error_by_over_total_num The number of set areas exceeds the maximum
542
total by 10
pu_error_code_area_error_by_zero_num Set the number of zones to 0
Set the number of region vertices over the
pu_error_code_area_point_error_by_over_num
maximum number
Set area check item removed, legacy
pu_error_code_area_abn_error_by_conflict
enablement turned on with conflict
Set up area check items left behind, removal
pu_error_code_area_rmv_error_by_conflict
enablement is turned on with conflict
Failure to set up the global parameters for
pu_error_code_vim_global_para_error
intelligent analysis algorithm
pu_error_code_area_notsurport_error Setting the intelligent analysis area is invalid
pu_error_code_privacy_mask_area_beyond Privacy protected area over total area
Bandwidth adaptation conflicts with encoding
pu_error_code_media_adapt_bw_mutex
type or code rate type
Wide dynamic manual or automatic,
pu_error_code_wd_frame_conflict
acquisition frames cannot be set to 50, 60
Capture frames of 50, 60, wide dynamic cannot
pu_error_code_frame_wd_conflict
be set manually or automatically
pu_error_code_conflict_videoblock_or_igt_is_e Video masking or behavioural analysis
nable enabled, set illumination enhancement failed
pu_error_code_invalid_igt_area_id Intelligent analysis area does not exist
pu_error_code_invalid_igt_line_id Intelligent analysis lines do not exist
pu_error_code_invalid_privacy_id Privacy protected areas do not exist
Backlight compensation enable conflicts with
pu_error_code_set_drc_backlight_conflict
DRC enable
pu_error_code_privacymask_region_intersect Overlapping privacy protection zones
pu_error_code_conflict_with_mosaic Operation conflicts with mosaic
pu_error_code_conflict_with_osd Operation conflicts with OSD
pu_error_code_conflict_with_pic Operation conflicts with image overlay
pu_error_code_video_enc_close Video encoder not open
pu_error_code_isp_para_conflict ISP Conflicting parameters
The lower limit of colour temperature is greater
than and equal to the upper limit of colour
pu_error_code_wb_high_temp_lower
temperature in white balance auto-tracking
mode
WDR/backlight compensation is mutually
pu_error_code_isp_conflict_with_framerate
exclusive with full frame rate
50 fps/60 fps and WDR/backlight
pu_error_code_framerate_conflict_with_isp
compensation are mutually exclusive
pu_error_code_osd_string_len_err OSD length of character error
Audio anomaly detection is not supported
pu_error_code_audio_detect_mic_not_support
when the audio input is in mic-in mode
pu_error_code_cif_conflict CIF cannot be set due to mutual exclusivity
543
with the corridor
The corridor cannot be set up as it is mutually
pu_error_code_corridor_conflict
exclusive with CIF
Manual exposure and wide dynamic are
pu_error_isp_ae_manual_conflict_wd
mutually exclusive
Manual exposure is mutually exclusive with
pu_error_isp_ae_manual_conflict_flicker
the background frequency
pu_error_isp_ae_manual_conflict_hlc Manual exposure and glare suppression
Exposure modes shutter priority and wide
pu_error_isp_ae_shutpri_conflict_wd
dynamic are mutually exclusive
Exposure mode shutter priority and
pu_error_isp_ae_shutpri_conflict_flicker
background frequency mutually exclusive
Exposure modes shutter priority and glare
pu_error_isp_ae_shutpri_conflict_hlc
suppression
Backlight compensation is mutually exclusive
pu_error_isp_backlight_conflict_wd
with wide dynamic
Backlight compensation and glare suppression
pu_error_isp_backlight_conflict_hlc
are mutually exclusive
Wide dynamic and glare suppression are
pu_error_isp_wd_conflict_hlc
mutually exclusive
Fogging mode and wide dynamic mutually
pu_error_isp_defog_conflict_wd
exclusive
Strong light suppression and 50 fps 60 fps
pu_error_isp_hlc_conflict_framerate
mutually exclusive
Wide Dynamic and 50 fps 60 fps mutually
pu_error_isp_wd_conflict_framerate
exclusive
pu_error_isp_ae_manual_conflict_backlight Manual exposure and backlight compensation
Strong light suppression and slow shutter
pu_error_isp_hlc_conflict_slow_shutter
mutually exclusive
Wide dynamic and slow shutter are mutually
pu_error_isp_wd_conflict_slow_shutter
exclusive
Multiple code streams and face detection
pu_error_multi_stream_conflict_face_dt
mutually exclusive
pu_error_code_request_overtime Request timeout
pu_error_result_need_face_alg_upgrade Need to upgrade face algorithm package
Need to upgrade the machine non-human
pu_error_result_need_vhd_alg_upgrade
algorithm package
pu_error_code_custom_package_undefined Code stream package, ISP package not defined
pu_error_code_osdi_area_not_exist Area does not exist, wrong index value
pu_error_code_osdi_area_too_large Horizontal width of area over 180 degrees
Area coordinate points do not conform to the
pu_error_code_osdi_area_invalid_verdegree
bottom-left, top-right rule
pu_error_code_osdi_index_already_exist New area index number illegal, index already
544
exists
Equal horizontal or vertical coordinates of area
pu_error_code_osdi_hor_or_ver_equal
coordinate points
pu_error_code_osdi_index_invalid Area index number illegal, less than 1
pu_error_code_osdi_index_equal Duplicate regional index numbers
pu_error_code_itgt_imrs_err_vertex_illegal Point coordinates do not make sense
pu_error_code_itgt_imrs_err_resolution_unsupp
Resolution not supported
ort
pu_error_code_itgt_imrs_err_param_err Parameter error
pu_error_code_itgt_imrs_err_not_config Configuration error
pu_error_code_itgt_imrs_err_param_set Parameter setting error
Please turn off the number plate recognition
pu_result_tgt_function_mutual_lrpr
function first
pu_result_tgt_function_mutual_fd Please turn off the face detection function first
Please turn off the parking detection function
pu_result_tgt_function_mutual_cd
first
Please turn off the behaviour analysis function
pu_result_tgt_function_mutual_va
first
pu_result_tgt_function_mutual_hc Please turn off the overline statistics first
pu_result_tgt_function_mutual_at Please turn off the auto-tracking function first
Please turn off the non-person detection
pu_result_tgt_function_mutual_vhd
function first
pu_result_tgt_function_mutual_its Please turn off the Smart Traffic function first
Please turn off the queue detection function
pu_result_tgt_function_mutual_qd
first
pu_result_tgt_function_mutual_cdd Please turn off the crowd density function first
Please turn off the Smart Traffic - Illegal Ball
pu_result_tgt_function_mutual_iball
function first
Please turn off the function of multi-use by a
pu_result_tgt_function_mutual_vhdface
device first
The algorithm is not supported in the current
pu_result_itgt_mode_notsupport_alg
mode
Object Classification is not supported by the
pu_result_tgt_vhd_detection_err_wrong_video_
machine non-human, turn off corridor mode
mode
first
Please turn off Enhanced Mode behaviour
pu_result_tgt_function_mutual_beh
analysis first
pu_result_tgt_function_mutual_campus_traffice
Please close the entrance/exit operation first
vent
Please turn off the motion detection function
pu_result_tgt_function_mutual_md
first
pu_result_tgt_function_mutual_od Please turn off the object shelter function first
pu_result_tgt_function_mutual_sc Please turn off the scene change function first
545
Please turn off the virtual focus detection
pu_result_tgt_function_mutual_ood
function first
Please turn off the people gathering function
pu_result_tgt_function_mutual_ca
first
pu_result_tgt_function_mutual_hm Please turn off the heat map function first
pu_result_tgt_function_mutual_trafficevent_cam
Please close all vehicle incident services first
pus
pu_result_tgt_function_mutual_traffic_statistic_
Please turn off the traffic counting service first
campus
pu_result_tgt_function_mutual_vd Please turn off video quality diagnostics first
Please turn off the electronic stabilisation
pu_result_tgt_function_mutual_stabilizer
service first
Please turn off the face recognition function
pu_result_tgt_function_mutual_face_rec
first
pu_result_tgt_function_mutual_fc Please turn off high density faces first
Face recognition enablement failure for non-
pu_result_itgt_err_facerec_enable_fail existent algorithm package or version
mismatch
pu_result_tgt_switch_mode_err_wrong_video_m The switched mode does not support corridor
ode mode
The switched mode algorithm failed to enable,
pu_result_tgt_switch_mode_err_enable_alg
check the model first
1. Default HTTPS
protocol. Please
ignore SSL certificate
when using https to
access, the request
URL is NVR800 IP,
port is 443 by
Obtain pre-login device default, the actual
/API/Login/Range port is based on the
information (optional)
NVR800 port
configuration.
2、This interface is
used before login, no
need to use cookies
and token
authentication.
546
Calling sequence Interface name Description
1. Default HTTPS
protocol. Please
ignore the SSL
certificate when
using https access,
the request URL is
NVR800 IP, port is
443 by default, the
1、User login /API/Web/Login actual port is based
on the NVR800 port
configuration.
2. The cookie and
token returned by this
interface are used for
subsequent
authentication of
other interfaces.
1. Default HTTPS
protocol. Please
ignore SSL certificate
when using https
access, the request
URL is NVR800 IP,
port is 443 by
Obtain pre-login device default, the actual
/API/Login/Range port is based on the
information (optional)
NVR800 port
configuration.
2、This interface is
used before login, no
need to use cookies
and token
authentication.
1. Default HTTPS
protocol. Please
ignore the SSL
certificate when
using https access,
the request URL is
NVR800 IP, port is
443 by default, the
1、User login /API/Web/Login actual port is based
on the NVR800 port
configuration.
2. The cookie and
token returned by this
interface are used for
subsequent
authentication of
other interfaces.
549
FQA
Q: Why is it not feasible to develop web applications and send requests to the device via HTTP/HTTPS API?
A: As the cross-domain resource sharing strategy of the device server (CORS https://developer.mozilla.org/en-
US/docs/Web/HTTP/CORS), any cross-domain request cannot be requested on the browser, only and Only the
same-origin policy (Same-origin policy https://developer.mozilla.org/en-US/docs/Web/Security/Same-
origin_policy) web program on the device server can access the device normally. It is recommended to use other
methods to send HTTP/HTTPS API requests instead of web applications.
550