0% found this document useful (0 votes)
4 views550 pages

HTTP API Protocol For IP Media Device-23.02.14

The document outlines the HTTP API protocol for IP media devices, detailing various components such as transmission mechanisms, JSON usage, URL structure, and HTTP header fields. It includes comprehensive sections on system configuration, network settings, channel management, streaming, alarms, storage, and maintenance. Additionally, it provides references and an overview of error codes and command categories relevant to the API.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views550 pages

HTTP API Protocol For IP Media Device-23.02.14

The document outlines the HTTP API protocol for IP media devices, detailing various components such as transmission mechanisms, JSON usage, URL structure, and HTTP header fields. It includes comprehensive sections on system configuration, network settings, channel management, streaming, alarms, storage, and maintenance. Additionally, it provides references and an overview of error codes and command categories relevant to the API.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

HTTP API Protocol For IP Media Device

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

16.7 Zero Channel(B09 customizated)............................................................................................................ 336

16.8 Zero Channel State(B09 customizated) ................................................................................................... 338

16.9 Serail(B09 customizated) ........................................................................................................................ 338

16.10 Force I Frame ......................................................................................................................................... 339


17 AI ......................................................................................................................................................................... 340
17.1 Setup ........................................................................................................................................................ 340
17.1.1 Face Detection .............................................................................................................................. 341
17.1.2 Human & Vehicle Detection .......................................................................................................... 346
17.1.3 Perimeter Intrusion Detection ....................................................................................................... 351
17.1.4 Line Crossing Detection ............................................................................................................... 357
17.1.5 Cross Counting ............................................................................................................................. 362
17.1.6 Heat Map ...................................................................................................................................... 366
17.1.7 Stationary Object Detection ......................................................................................................... 369
17.1.8 Crowd Density Detection .............................................................................................................. 375
17.1.9 Queue Lenght Detection ............................................................................................................... 379
17.1.10 License Plate Detection............................................................................................................... 383
17.1.11 Rare Sound Detection ................................................................................................................. 388
17.1.12 AI Func Schedule ......................................................................................................................... 392
17.2 Recognition .............................................................................................................................................. 396
17.2.1 Model Configuratuon.................................................................................................................... 396
17.2.2Face Group ..................................................................................................................................... 398
17.2.3 Face ............................................................................................................................................... 410
17.2.4Add Compare Face Image ........................................................................................................ 415
17.2.5 Database face information query ............................................................................................. 420
17.2.6 Additional Face Image............................................................................................................... 427
17.2.7Snaped Faces Search and Match ................................................................................................... 430
17.2.8 Snaped Objects Search ................................................................................................................. 438
17.2.9 License Plate Group ...................................................................................................................... 443
17.2.10 License Plate ............................................................................................................................... 454
17.2.11 Database license plate information query ............................................................................ 460
17.2.12 Snaped License Plates Search and Match .......................................................................... 466
17.2.13 Snaped Faces and Objects Count Get (VHD)............................................................................... 467
17.3 Face Attendance(NVR only) ..................................................................................................................... 468
17.4 Statastics (NVR only) ................................................................................................................................ 472
17.4.1 Face Search ................................................................................................................................... 472
17.4.2 Hman & Vehicle Search ................................................................................................................. 476

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>://<host>[:port][/fixed string]</cmd name>

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:

HTTP Request with message body:


Except for the few APIs before login, other APIs need to be authenticated with the cookie and X-csrftoken fields
returned by login in the http header. See chapter 12.1 for login. The format of the API request is as follows, where
the requested data and the returned data are in the data field, and version is the version number. Because it is a
reserved field and is not really used, the value "1.0" is temporarily fixed. When the server returns data, it will return
the error code and error reason if there is an error.
POST/API/SystemInfo/Base/Get HTTP/1.1
Content-Type: application/json
X-csrftoken: 14559384d58d55d9d80bf4baf048684f366c77905d665d99ba1bde2cdcf81b08
Cookie: session=cc3ec99c6f1295489c86f8842e1dd719c194c637af5b965a23932c41188a3acc
Content-Length: 1234,
{
"version": "x.x"
“data” : {
}
}

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” : {
}
}

2.5 Response Messages Body


The response message from the IP device is a standard HTTP response, information can be
included in the entity body field in JSON format. This information includes the result to a request
message, or the detailed parameters that required by a request message.
A successful response that don’t includes any parameters is as follows:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 40
{
“result”:”success”,
“data” : {
}
}
In case of failure, the return format is as follows, where reason is the more detailed error reason,
error_ code is an error code. Please refer to Chapter 2.9 for the specific error code. The client can make
corresponding prompt according to the error code. If there is still data to return in case of error, the
returned data is stored in the data field.
HTTP/1.1 400 OK
Content-Type: application/json
Content-Length: 40

{
“result”:”failed”,
“reason”:”xxxxxxxx”
“error_code”: “user_blocked”
“data” : {
}
}

A part of channel failed response that is as follows:


HTTP/1.1 400 OK
Content-Type: application/json

10
Content-Length: 40

{
"version": "x.x",
“error_code”: “part_failed”,
“reason”:”xxxxxxxx”
“ch_error_code”: [{“error_code”:” no_support”, “channel”:” IP_CH1”},],
“data” : {
}
}

cloud_video_upload_chn_limit Return information attached to the error code


{
"result":"failed",
"reason":"Save parameter failed",
"error_code":"cloud_video_upload_chn_limit",
"data":{
"cloud_video_is_used":[
"CH1",
"CH3"
],
"max_cloud_video_upload_num":2
}
}

Smart mutex return example:


{
"result":"failed",
"channel_max":1,
"error_code":"part_failed",
"ch_error_code":[
{
"channel":"CH1",
"error_code":"illegal_operation",
"reason":"Illegal Operation, aganist the intelligent mutual exclusion !",
"mutual_array":[
"PID",
"LCD"
]
}
],
"data":{

11
}

Server enable mutex return example:


{
"result": "failed",
"error_code": "server_mutually",
"reason": "The server is mutually exclusive !",
"mutual_array": [
"DROPBOX",
"Google Drive"
],
"data": {}
}

2.6 Command Categories


This specification is divided into different command categories. Thefollowing command is defined:

Command Description
Configure and operate the general system
System
functions.
Network Configure network interfaces and parameters

Channel Configure channel parameters

Stream Configure and control the streaming media content


Alarm Configure and control alarm functions and parameter
Storage Configure device storage
Schedules Configure schedules
Record Configure and control record functions and parameter
Maintenance Configure maintenanceinformation

2.7 Error Code


As with any other protocol, errors may occur during communications, protocol or message processing. Errors
may contain header value or be received in a not expected or experience a socket timeout. To indicate and interpret
protocol error, HTTP protocol has defined a set of standard status codes. According to this specification, the IP

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

2.9 Common error_code


Common error_code include channel Table-2.9.1
General param_error Request parameter error
no_permission No permission
first_login First login, mandatory password change
part_failed Channel save part failed
no_support No support
frequent_operation Frequent operation
passwd_expired_login Login with expired password and force password
change
default_failed Failed to restore default value
token_generation_failed Failed to generate token
token_invalid token invalid
device_busy The device is processing the maximum number of
13
APIs
user_expired_login User expired login
data_saving_busy The device is busy saving
user_locked_login User locked login
function_busy Function busy
network_port_conflict Network port conflict
group_name_error Group name error
Session no_login No login
expired Login expired
one_IE Only one user can log in to a browser
logout Logout
login_at_other Account login in other places
device_reboot Device reboot
passwd_expired Password expired
param_changed User parameter changed
network_changed Network port changed
ssl_error Certificate re-signing
netip_limited After the logged in IP is added to the blacklist
forced_offline Forced offline
user_expired User expired
no_heartbeat Heartbeat timeout failure
disk_changed Hardware status or parameters change
ipc_state_changed Upgrade IPC online, IPC state changed
have_login The current number of logins has exceeded the
maximum number of logins set by the user
Secondary current_pwd_error_ntime If the authentication fails for more than a certain
certification number of times, the data will be attached with
"retain"_ lo…cked_ Time field, representing the
remaining lock time
Save parameters save_failed Save failed
pwd_weak Modified IPC password has low complexity (IPC)
modify_failed Modify failed
modify_failed_pwd_err Error in modifying the IP user name or password of
the IPC
modify_failed_syntax_err Modify the IP syntax configuration error of IPC
(mask or gateway)
search search_failed Search failed
playback device_play_locked The board end is playing back and rejecting the
web request
operation operation_failed Operation failed
User name, session_invalid
password and illegal_request Illegal request
permission overreach Sub-users can only set their own information

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

Table-3.1 (System general information JSON)


VALUE COMMENT
KEY
RANGE TYPE
device_name Max length: 31byte string Device name
menu_timeouts 0,30,60,120,300,600 int Menu auto lock Time. Unit:Second
FisheyeOrAI "Fisheye" "AI" string AI fisheye mutual exclusion (NVR only)
cert_warn_time 0-90 Int Certificate alert time(A01 only)
root_cert_warn bool Enable alert for device root certificate(A01 only)
session_timeout 5-1440 int Web session timeout (minutes)
preview_session_ti bool Preview/playback session timeout
meout

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

Table-3.2 (Date& Time information JSON)


VALUE COMMENT
KEY
RANGE TYPE
System date
date string
Format is: yyyy/mm/dd
System time
time
Format is:hh:mm:ss.
synchronize_c Synchronize computer time
Bool
omputer_time (IPC only)
"MM/DD/YYYY", Date format
date_format "YYYY-MM-DD", string
"DD/MM/YYYY"
time_format 12,24 int Time format, Unit: hour
"GMT-12:00", Time zone
"GMT-11:00",
"GMT-10:00",
"GMT-9:00",
"GMT-8:00",
"GMT-7:00",
time_zone string
"GMT-6:00",
"GMT-5:00",
"GMT-4:30",
"GMT-4:00",
"GMT-3:30",
"GMT-3:00",
18
"GMT-2:00",
"GMT-1:00",
"GMT",
"GMT+1:00",
"GMT+2:00",
"GMT+3:00",
"GMT+3:30",
"GMT+4:00",
"GMT+4:30",
"GMT+5:00",
"GMT+5:30",
"GMT+5:45",
"GMT+6:00",
"GMT+6:30",
"GMT+7:00",
"GMT+8:00",
"GMT+9:00",
"GMT+9:30",
"GMT+10:00",
"GMT+11:00",
"GMT+12:00",
"GMT+13:00"

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

Table-3.3 (NTP information JSON)


VALUE COMMENT
KEY
RANGE TYPE
ntp_enable bool NTP enable flag
Network server address

"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

Table-3.4 (DST information JSON)


VALUE COMMENT
KEY
RANGE TYPE
dst_enable bool DST function switch
support_crossyear bool Whether it supports cross-year
time_offset 1,2 int DST offset value.Unit: hour
dst_mode "Week", "Date" string DST mode
DST startdate.
start_date string
The date format is MM/DD/YYYY
DST end date.
end_date string
The date format is MM/DD/YYYY
DST start time.
start_hour string
The time format is hh:mm:ss
DST end time. For example : "00:20:00”
end_hour string
The time format is hh:mm:ss
"Jan", Start month
"Feb",
start_month "Mar", string
"Apr",
"May",
"Jun",
End month
end_month "Jul", string
"Aug",
21
"Sep",
"Oct",
"Nov",
"Dec"
"1st", The week of the month
start_week "2nd", string
"3rd",
"4th", The week of the month
end_week string
"Last"
"Sun", Which day start from.
start_weekday "Mon", string
"Tue",
"Wed",
Which day end of.
"Thu",
end_weekday "Fri", string
"Sat"

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
}
}

3.5 Output Configuration


(NVR only)
GET
URL POST /API/SystemConfig/Output/Get
Description Get System Output Information
Request Body None
Successful Response Output information JSON (show as follow Table-3.5.1)

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

Table-3.5.1 (Output information JSON)


KEY VALUE COMMENT
RANGE TYPE
Json Output information JSON(show as follow
output
Object Table-3.5.2)

Table-3.5.2 (OutputInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
LIVE-OUT Json Object Output information JSON(show as follow
Table-3.5.3)

Table-3.5.3 (SingleOutput information JSON)


VALUE COMMENT
KEY
RANGE TYPE
"1024x768", The VGA resolution of the current output
"1280x1024", display, the maximum range is determined
"1440x900", according to the highest resolution supported by
"720P(1280x720)", the actual.
output_resolution,
"1080P(1920x1080)" string
"1600x1200",
"1920x1200",
"2K(2560x1440)",
"4K(3840x2160)"

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

Table-3.6.1 (User information JSON)


KEY VALUE COMMENT
RANGE TYPE
“SavePassword”
type “SavePermission” string
“SaveTime”
24
“GetPermission”,
“LockUser”
default_user “None”, string Automatic login user, "None" means disable
“Admin”, automatic.
“User2”, All enabled users can be set as automatic login
“User3” user by username.
… (A01 no)
pwd_unequal_to_ol "1","2" string The new password is different from the previous
d_number N historical passwords (A01 dedicated)
min_password_leng 5-16 /8-15 int Minimum password length. nvr/dvr: 5-16 IPC:
th 8-15 (A01 only)
min_password_expi 0-997 int The minimum password usage period, 0 means
res that the password can be changed immediately
(A01 only)
advice_password_e 0-998 int The recommended password usage period is 0,
xpires which means no prompt for password change. If
it is not 0, it must be longer than min_ password_
Expires large
(Special for A01)
max_password_expi 0-999 int The maximum service life of the password, 0
res which means that the password can never be
changed. When it is not 0, it must be higher than
advice_ password_ Expires large (A01 special)
user_info Singleuserinformation JSON(show as follow
Json Object
Table-3.6.2 )
secondary_authentic Max length: 16byte string Current user password
ation Setuser_info Required, not for get
base_secondary_aut Json Object Encryption auth,Table-12.7.2.4
hentication

Table-3.6.2(Singleuser user JSON)


KEY VALUE COMMENT
RANGE TYPE
ADMIN Json Object JSON show as follow Table-3.6.3
USER1 Json Object
USER2 Json Object
… Json Object
USER6 Json Object

Table-3.6.3 (Singleuserinformation JSON)


KEY VALUE COMMENT
RANGE TYPE
user_state "None" "Normal" User state
string
"NotYetStart" "None":no
25
"Expires" "Normal":normal
"ExpiresClearInfo" "NotYetStart":Expiry date is not reached
"Expires" : Expired, user information will be
cleared three days after the end time
"ExpiresClearInfo":Expired, user information
has been cleared
user_enable bool Enable user
Start date of validity.
start_date string The date format is MM/DD/YYYY
(A01 only)
Start time of validity.
start_time string The time format is hh:mm:ss
(A01 only)
Enddate of validity.
end_date string The date format is MM/DD/YYYY
(A01 only)
Endtime of validity.
end_time string The time format is hh:mm:ss
(A01 only)
username Max length: 16 byte string User name
password_enable Enable user password(A01. IPC is not used, and
bool
password must be set)
password_empty Is password empty
bool
Required for Get, not for Set
password Max length: 16 byte string User password
confirm_password Max length: 16 byte string User confirm password
Required for Set, not for Get
modify_password_ti string Date and time of last password modification
me Required for Get, not for Set (A01 only)
user_locked bool Whether the user is locked
(A01 only)
permission Json Object Userpermissioninformation JSON(show as
follow Table-3.6.4 )
[Note: [Get]For general users only]
[Note: [Set]For admin only]
Pass parameters when obtaining and setting
permissions.
login_num 1-5 int Maximum number of logins per user
base_enc_password Json Object Encrypted Password, Table-12.7.2.3

Table-3.6.4 (Userpermissioninformation JSON)


KEY VALUE COMMENT
RANGE TYP
E
26
log_search bool Log permission
parameter bool Parameter setting permission
auto_reboot bool AutoRebootpermission
manual_record bool ManualRecordpermission(A01 no)
disk bool Disk permission(A01、IPC no)
remote_login bool RemoteLoginpermission(IPC no)
seq_control bool SEQControlpermission(A01、IPC no)
manual_capture bool ManualCapturepermission(A01 no)
audio bool Audio permission(A01 no)
ip_camera_mainta Ip Camera Maintain permission(A01 only)
bool
in
ipc_channel_mana Ipc Channel Manage permission(A01 only)
bool
ge
alarm_config bool Alarm Config permission(A01 only)
record_config bool Record Config permission(A01 only)
channel_config bool Channel Config permission(A01 only)
face_search bool Face search permission(A01 only)
backup_enable bool Backup permission:(NVR only)
live_enable bool Preview permission
playback_enable bool Video playback permission
ptz_enable bool Ptz Control permission
backup_channel “CH1”…”CH1x” array Backup Channel(NVR only)
“IP_CH1”…” IP_CH1x” Each array bit represents a channel with a string.
live_channel “WIFI_CH1”…” WIFI_CH1x” array Preview Channel
Each array bit represents a channel with a string.
playback_channel The number of channels depends array Video playback Channel
on the capabilities of the device. Each array bit represents a channel with a string.
ptz_channel array Ptz Control Channel
Each array bit represents a channel with a string.
rtsp_right Bool Rtsp permission(IPC only)
license_plate bool License Plate permission

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
}
}
}
}

Scenario 2: admin turns on user 2


Request message:
POST/API/SystemConfig/User/Set HTTP/1.1

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":{}}

Scenario 3: admin sets the permissions of user 2


Request message:
POST/API/SystemConfig/User/Set HTTP/1.1
{
"version": "1.0",
"data": {
"user_info": {
"USER2": {
"username": "user2",
"permission": {
"log_search": true,
"parameter": true,
"auto_reboot": true,
"manual_record": true,
"disk": true,
"remote_login": true,
"seq_control": false,
"manual_capture": false,
"audio": true,
"face_search": true,
"backup_enable": true,
"backup_channel": [

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":{}}

3.7 System Information

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)

Table-3.7 (System Information JSON)


KEY VALUE COMMENT
RANGE TYPE
device_id string DeviceID(A01 no)
device_name string DeviceName
device_type string DeviceType
hardware_version string HardwareVersion
software_version string SoftwareVersion
build_time string Publication Time
ie_client_version string IE Client Version(A01 no)
video_format “PAL” string Video Format
“NTSC”
hdd_volume string HDD Volume
ip_address string IP Address
ipv6_address string IPv6 Address
web string Web Internal port ,Web external port
client string Client Internal port , Clientexternal port
mac_address string MAC Address
wireless_mac string Wireless MAC (Routing module address)
p2p_id string P2P ID(A01 no)
p2p_switch bool (A01no)
network_state “Connected”, string Network connection state
“Unconnected”
public_cloud_state "Disabled","Connecte string Public cloud state(A01 only)
d","Unconnected"
channel_num int Channel number(A01 only)
serialNum string Serial Number(B18)
language string Current language of the device

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

3.8 Channel Information


GET
31
URL POST/API/SystemInfo/Channel/Get
Description Get System Channel Information
Request Body None
Successful Response Channel Information JSON(show as follow Table-3.8.1)

Table-3.8.1 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info Json Object
follow Table-3.8.2
channel_max int Max channel

Table-3.8.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-3.8.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-3.8.3(Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel string Channel number
alias string IP Camera alias.
state "Offline", "Online" string IP Camera connection status.
mainstream string IP Camera's mainstream information.
substream string IP Camera's substream information.
"Resolution, FrameRate, Bitrate"
IP Camera's mobile stream
mobile_stream string
information.
motion_detection "Support"," Nonsupport" string Motion Detection.
privacy_zone "Support"," Nonsupport" string Privacy Zone.

3.9 Record Information


GET
URL POST /API/SystemInfo/Record/Get
Description Get System Channel Record Information
Request Body None
Successful Response Channel Information JSON(show as follow Table-3.9.1)

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

Table-3.9.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-3.9.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-3.9.3(Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel string Channel Number
record_state "On", "Off" string Record State
record_switch bool Record Switch
"Mainstream", Video stream type
stream_type "Substream", " string
“DualStream "
Resolution:
resolution string Format: “Main Stream Resolution | Sub Stream
Resolution”
IP Camera's mainstream frame rate.(/Fps)
fps string
Format:”Main Stream FPS | Sub Stream FPS”
IP Camera's mainstream bitrate rate.(/Kbps)
bitrate string Format:”Main Stream Bitrate | Sub Stream
Bitrate”

3.10 Network State


GET
URL POST/API/SystemInfo/Network/Get
Description Get System Network State Information
Request Body None

33
Successful Response Network state Information JSON(show as follow Table-3.10.1)

Table-3.10.1(Network state Information JSON)


KEY VALUE COMMENT
RANGE TYPE
wan JSON object Single JSON(show as follow Table-3.10.2 )
lan JSON object Single JSON(show as follow Table-3.10.3)
pppoe "Enable", "Disable" string PPPoE switch
3g "Enable", "Disable" string 3G network switch
wifi "Enable", "Disable" string WIFI switch
port JSON object Single JSON(show as follow Table-3.10.4 )
bandwidth JSON object Single JSON(show as follow Table-3.10.5 )
toe "Enable", "Disable" string TOE Acceleration sign
dns1 string Preferred DNS server, for example: 8.8.8.8
dns2 string Alternate DNS server, for example: 8.8.8.8
lan1 JSON Object Single JSON(show as follow Table-3.10.6 ) (used in the
new network card mode)
lan2 JSON Object Single JSON(show as follow Table-3.10.7 ) (used in the
new network card mode)
poe JSON Object Single JSON(show as follow Table-3.10.8 ) (used in the
new network card mode)

Table-3.10.2 (Wan info JSON)


KEY VALUE COMMENT
RANGE TYPE
dhcp "Enable", "Disable" string DHCP swith
ip_address string IP address,such as:192.168.1.24
subnet_mask string Subnet mask,such as:255.255.255.0
gateway string Default gateway, such as:192.168.1.1
mac_address string MAC address, such as:88-60-50-4E-87-29
ipv6_address Max length: 46 byte string IPv6 address
ipv6_gateway Max length: 46 byte string IPv6 gateway

Table-3.10.3 (Lan info JSON)


KEY VALUE COMMENT
RANGE TYPE
ip_address string Switch IP address
subnet_mask string Switch subnet mask

Table-3.10.4 (Port info JSON)


KEY VALUE COMMENT
RANGE TYPE
web "Port, Export, ExportState, Upnp" string format:

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”}

Table-3.10.5 (Bandwidth info JSON)


KEY VALUE COMMENT
RANGE TYPE
total_bandwidth string Total bandwidth
used_bandwidth string Used bandwidth

Table-3.10.6 (Lan1 info JSON)


KEY VALUE COMMENT
RANGE TYPE
dhcp "Enable", "Disable" string IPv4 DHCP switch
ip_address string IP address,such as:192.168.1.24
subnet_mask string Subnet mask,such as:255.255.255.0
gateway string Default gateway, such as:192.168.1.1
dhcpv6 "Enable", "Disable" string IPv6 DHCP switch
ipv6_address string IPv6 address
ipv6_prefixlen int
ipv6_gateway string IPv6 gateway
mac_address string MAC address, such as:88-60-50-4E-87-29

Table-3.10.7 (Lan2 info JSON)


KEY VALUE COMMENT
RANGE TYPE
dhcp "Enable", "Disable" string IPv4 DHCP switch
ip_address string IP address,such as:192.168.1.24
subnet_mask string Subnet mask,such as:255.255.255.0
gateway string Default gateway, such as:192.168.1.1
dhcpv6 "Enable", "Disable" string IPv6 DHCP switch
ipv6_address string IPv6 address
ipv6_prefixlen int
ipv6_gateway string IPv6 gateway
mac_address string MAC address, such as:88-60-50-4E-87-29

Table-3.10.8 (Poe info JSON)


KEY VALUE COMMENT
RANGE TYPE
poe_dhcp "Enable", "Disable" string Poe DHCP switch
poe_ip_address string POE IP address,such as:192.168.1.24

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

Table-4.1.1.1 (Network base info JSON)


KEY VALUE COMMENT
RANGE TYPE
wan JSON object Single JSON(show as follow Table-4.1.1.2 )
Single JSON(show as follow Table-4.1.1.3)
lan JSON object
(NVR only)
pppoe JSON object Single JSON(show as follow Table-4.1.1.4 )
Single JSON(show as follow Table-4.1.1.5 )
3g JSON object
(NVR only)
wifi JSON object Single JSON(show as follow Table-4.1.1.6)
port JSON array Single JSON(show as follow Table-4.1.1.7 )
Internet IP, valid when the Internet is enabled (Get
extern_ip string
only)
p2p_switch bool P2P switch
ipeye_switch bool IPEYE switch(DVR、NVR only)
device_instruction “nvr” “xvr” “dvr” string Device type description mark
“ipc”
web_compatibility_ bool Web compatibility mode
mode
toe bool Switch mode (NVR only)
video_encrypt_trans “CH1”…”CH1x” array Video Encrypt TransferChannel
fer “IP_CH1”…” Each array bit represents a channel with a string.
IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”

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)

Table-4.1.1.2 (Wan info JSON)


KEY VALUE COMMENT
RANGE TYPE
dhcp bool DHCP switch
ip_address string IP address,such as:192.168.1.24
subnet_mask string Subnet mask,such as:255.255.255.0
gateway string Default gateway, such as:192.168.1.1
ipv6_address string IPv6 address
ipv6_prefixlen int
ipv6_gateway string IPv6 gateway
dns1 string Preferred DNS server, for example: 8.8.8.8
dns2 string Alternate DNS server, for example: 8.8.8.8
main_multicast_ena Main stream multicast switch (IPC dedicated)
bool
ble
main_multicast_add (224.0.0.0- Main stream multicast switch (IPC dedicated)
string
ress 239.255.255.255)
main_multicast_por Main stream multicast switch (IPC dedicated)
1024-65535 int
t
sub_multicast_enabl Sub-stream multicast switch (IPC dedicated)
bool
e
sub_multicast_addr (224.0.0.0- string Sub-stream multicast switch (IPC dedicated)

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

Table-4.1.1.3 (Lan info JSON)


KEY VALUE COMMENT
RANGE TYPE
ip_address string Switch IP address
subnet_mask string Switch subnet mask

Table-4.1.1.4 (PPPoE info JSON)


KEY VALUE COMMENT
RANGE TYPE
enable bool PPPoE switch
username Max length: 35byte string PPPoE user name
password Max length: 35byte string PPPoE password
password_empty bool Password empty
ip_address string IP address,such as:192.168.1.24
subnet_mask string Subnet mask,such as:255.255.255.0
gateway string Default gateway, such as:192.168.1.1
dns1 string Preferred DNS server, for example: 8.8.8.8
dns2 string Alternate DNS server, for example: 8.8.8.8
pppoenewstruct bool Whether to use two sets of range control
base_enc_password Json Object Encrypted Password, Table-12.7.2.3

Table-4.1.1.5 (3G info JSON)


KEY VALUE COMMENT
RANGE TYPE
enable bool 3G network switch
apn Max length: 35 byte string 3G apn
dial_code Max length: 35 byte string 3G DialCode
username Max length: 35 byte string 3G dial-up user name
password Max length: 35 byte string 3G dial-up password
ip_address string IP address,such as:192.168.1.24
subnet_mask string Subnet mask,such as:255.255.255.0
gateway string Default gateway, such as:192.168.1.1
dns1 string Preferred DNS server, for example: 8.8.8.8
dns2 string Alternate DNS server, for example: 8.8.8.8
base_enc_password Json Object Encrypted Password, Table-12.7.2.3

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

Table-4.1.1.7 (Portinfo JSON)


KEY VALUE COMMENT
RANGE TYPE
“Web”, “Client”, Port type(A01 no)
service string
“Rtsp”, “Https”,
Protocol type
protocol "TCP" string
(Get only)
internal_port [1~65535] int Internal port
external_port [1~65535] int External port
"Inactive", Port UPnP function status
upnp_status string
"Active" (Get only)
upnp bool Port enables UPnP function
maping_strategy "Manual""Auto" string Mapping method

Table-4.1.1.8 (Lan1 JSON)


KEY VALUE COMMENT
RANGE TYPE
dhcp bool IPv4 DHCP switch
ip_address string IP address,such as:192.168.1.24
subnet_mask string Subnet mask,such as:255.255.255.0
gateway string Default gateway, such as:192.168.1.1
dhcpv6 bool IPv6 DHCP switch
ipv6_address string IPv6 address
ipv6_prefixlen int
ipv6_gateway string IPv6 gateway
Dhcp Enable switch, DHCP switch is not enabled
dhcp_enable bool
after PPPOE is turned on (NVR only)
mac_address string MAC address, such as:88-60-50-4E-87-29

Table-4.1.1.9 (Lan2 JSON)


KEY VALUE COMMENT
40
RANGE TYPE
dhcp bool IPv4 DHCP switch
ip_address string IP address,such as:192.168.1.24
subnet_mask string Subnet mask,such as:255.255.255.0
gateway string Default gateway, such as:192.168.1.1
dhcpv6 bool IPv6 DHCP switch
ipv6_address string IPv6 address
ipv6_prefixlen int
ipv6_gateway string IPv6 gateway
mac_address string MAC address, such as:88-60-50-4E-87-29

Table-4.1.1.10 (Poe JSON)


KEY VALUE COMMENT
RANGE TYPE
poe_dhcp bool Poe DHCP switch
poe_ip_address string POE IP address,such as:192.168.1.24
poe_subnet_mask string POE subnet mask,such as:255.255.255.0

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

Table-4.1.2.3(STA Parameter info JSON)


KEY VALUE COMMENT
RANGE TYPE
ssid string Route ssid
Route wifi password
base_enc_password Json Object
Encrypted Password, Table4.1.2.4
NONE/WEP/WPA-PSK/WPA2-
encryptionType string
PSK/WPA-NONE
cloudhost string
cloudport int

Table-4.1.2.4(STA Parameter info JSON)


KEY VALUE COMMENT
RANGE TYPE
seq int
peer_key string
cipher string

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

4.2.1 DDNS Parameters

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

Table-4.2.1(DDNS info JSON)


KEY VALUE COMMENT
RANGE TYPE
ddns_enable bool Host name of this device
"DDNS_3322", DDNS server IP address or
"DYNDNS", name.
server "NO_IP", string
"CHANGEIP",
"DNSEXIT"
domain Max length: 35 byte string Host name of this device
domain_suffix string Domain suffix
username Max length: 35 byte string DDNS user name
password Max length: 35 byte string DDNS user password
Whether the password is
password_empty bool
empty
service_id string B03 only
Whether to test before saving,
test_befault_save bool
the default is FALSE
base_enc_password Json Object Encrypted Password, Table-
12.7.2.3

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

4.3.1 Email Parameters

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

4.4.1 FTP Parameters

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

Table-4.4.2(Upload videoinformation JSON)


KEY VALUE COMMENT
RANGE TYPE
Upload conventional video
enable bool
switch
“CH1”…”CH1x” Channel number of regular
“IP_CH1”…” IP_CH1x” video to be uploaded
“WIFI_CH1”…” WIFI_CH1x” Each array bit represents a
channel array
channel with a string.
The number of channels depends
on the capabilities of the device.

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"
]
}
}
}

4.5 IP Filter Parameters


GET
URL POST/API/NetworkConfig/IPFilter/Get
Description It is used to get theIP Filter Parameters
Request Body none
Successful Response IP FilterJSON( show as follow Table-4.5.1 )

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.1(IP Filter JSON)


KEY VALUE COMMENT
RANGE TYPE
enable bool Control the IP Filter function .
choose "Whitelist","Blacklist" string Enable restriction mode
restricted_type "Whitelist","Blacklist" string Type of black-and-white list
whitelist JSON array Single JSON(show as follow Table-4.5.2 )
53
blacklist JSON array Single JSON(show as follow Table-4.5.2 )

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"
}
]
}
}

4.6 Https Configure


GET
URL POST/API/NetworkConfig/https/Get
Description It is used to get thehttpsParameters
Request Body none
Successful Response JSON( show as follow Table-4.6.1 )

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

4.7 Voice Assistant


GET
URL POST/API/NetworkConfig/VoiceAssistant/Get (API is not implemented yet)
Description It is used to get theVoiceAssistantParameters
Request Body JSON( show as follow Table-4.7.1 )
Successful Response JSON( show as follow Table-4.7.2 )

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

configuration, multiple APIs, and wireless channel configuration.

The digital channel configuration includes multiple scenarios such as automatically adding ipc, manually adding,

deleting, and modifying ipc.

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

Table-5.1.1 (Channel Request JSON)


KEY VALUE COMMENT
RANGE TYPE
channel “IP_CH1”…” IP_CH1x” string array Each array bit represents a channel with a string.
The number of channels
depends on the
capabilities of the device.

Table-5.1.2 (DeviceInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
device_info JSON array
follow Table-5.1.4

Table-5.1.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
operation_type "AddOrEditChannel", string Operation type: add or modify channel
"EditIPCParam", parameters, edit IPC parameters of connection,
"EditIPCPwd" and edit IPC password of connection
remove_ipc “IP_CH1”…” array Each array bit represents a channel with a string.
IP_CH1x”

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

Table-5.1.3.1 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-5.1.4
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-5.1.4 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Number of channels supported by each
channel_num int
device
"NotConfigured", Prompt when the channel is not configured
state "Offline", string
"Online"
Only POE channels have this variable. "
"ManualMode", POE channel mode, "ManualMode":
switch_mode string
"AutoMode" manual mode "AutoMode": automatic
mode
ip_address Max length: 63byte string IP address/domain name
subnet_mask Max length: 15byte string Subnet mask
gateway Max length: 15byte string gateway
dns1 Max length: 15byte string Preferred DNS server, for example: 8.8.8.8
dns2 Max length: 15byte string Alternate DNS server, for example: 8.8.8.8
port [1~65535] int Media port
web_port [1~65535] int
protocol Max length: 15byte string IPC access protocol
username Max length: 31byte string User name
password Max length: 31byte string password
password_empty bool Password if empty
"Auto", Camera mode
camera_mode "Normal", string
"Fisheye"

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

Table-5.1.3.2 (protocolRequest JSON)


KEY VALUE COMMENT
RANGE TYPE
modify_ipc_pwd_ int Number of successful IPC password
success_num modification (A01)
Example:
Scene 1:Broadcast search ipc
Request message:
POST /API/ChannelConfig/RemoteDev/Search?2020-10-28@13:28:23 HTTP/1.1
{
"version": "1.0"
}

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”:{
}
}

Scene 4:delete ipc


Request message:
POST /API/ChannelConfig/IPChannel/Set?2020-10-28@14:09:37 HTTP/1.1
{
"version": "1.0",
"data": {
"remove_ipc": ["CH6"]
}
}
Response message:
HTTP/1.1 200 OK
{
"version": "1.0",
“result”:”success”,
“data”:{
}
}

5.1.3 Custom protocol management

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

Table-5.1.6.1 (protocol Information JSON)


KEY VALUE COMMENT
RANGE TYPE
protocol1 Json Object JSON show as follow Table-5.1.7

protocol16 Json Object

Table-5.1.7 (Single protocolInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
protocol_name Max length: 15byte string
custom_stream Json array Please refer to Table-5.1.8

Table-5.1.8 (Single protocolInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
stream_name “Mainstream”“Substream” string
Enable bitstream; available for Substream
enable true, false bool only.

type “Rtsp” string

port 1-65535 int


source_path Max length: 119byte string

5.1.4 Analog channel

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.9 (analog channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
SingleInformation JSON show as follow Table-
channel_info Json Object
5.1.9.1

Table-5.1.9.1 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-5.1.10
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-5.1.10 (Single Information JSON)


KEY VALUE COMMENT
RANGE TYPE
state “Disable”“Enable” string Analog channel status
channel_name Max length: 31byte string Channel name
true: enable
switch bool false: disable

Table-5.1.11(Error Code)
error_code commet
Exceeded the max number of
Channel_limit
channels in the system

5.1.5 Wireless Channel

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

Table-5.1.11 (analog channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
SingleInformation JSON show as follow Table-
channel_info Json Object
5.1.11.1

Table-5.1.11.1 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-5.1.10
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-5.1.12 (Single Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_name Max length: 31byte string Channel name
software_version Max length: 40byte string Wireless channel version,read-only
true: enable
false: disable
switch bool
this switch only disable。(from true to
false)

Table-5.1.13 (analog channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
SingleInformation JSON show as follow Table-
channel_info Json Object
5.1.13.1
page_type "ChannelConfig" string

Table-5.1.13.1 (Channel Information JSON)


KEY VALUE COMMENT
71
RANGE TYPE
CH1 Json Object JSON show as follow Table-5.1.14
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-5.1.14 (Single Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_name Max length: 31byte string Channel name
software_version Max length: 40byte string Wireless channel version,read-only
true: enable
false: disable
switch bool
this switch only disable。(from true to
false)
"CH1"..."CHx"
chn_index "IP_CH1"..."IP_CHx" string
"WIFI_CH1"..."WIFI_CHx"

page "chn_wireChn" string

Power value
battery 0-100 int

"Continuous" "10" Recording delay time


post_recording string
"20" "30"

Matching status of wireless Ipc


pair_state -1 - 7 int

5.1.6 Digital wireless channel configuration

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

Table-5.1.6.1 (ChannelRequest JSON)


KEY VALUE COMMENT
RANGE TYPE
“CH1”…”CH1x” Each array bit represents a channel with a string.
channel string array

Table-5.1.6.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_max int Max number of channels
limit_wireless_max int Max number of wireless channel
channel_info Json Object JSON show as follow Table-5.1.6.x

Table-5.1.6.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Objec JSON show as follow Table-5.1.6.3
… Json Objec
CHx Json Objec

Table-5.1.6.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
("Digital") Mode of current channel
camera_type string
("Wireless")
Example:
Request message:
POST /API/ChannelConfig/ChannelConfig/Get HTTP/1.1
{
"version":"1.0",
"data":
{
"channel":["CH1"]
}
}
Response message:
{
"result": "success",
"data": {
"channel_info": {
73
"CH1": {
"camera_type": "Digital"
}
}
}
}

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

Table-5.2.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”

The number of channels


depends on the capabilities of
the device.

Table-5.2.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_info Json Object JSON show as follow Table-5.2.x
channel_max int Max number of channel
support_copy bool Whether support to copy(NVR、DVR)

Table-5.2.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE

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

Table-5.2.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital channels.
"Offline",
status string Note: This field is not available when the channel
"Online"
is online
name JSON Object Name JSON show as follow Table-5.2.4
datetime JSON Object DateTime JSON show as follow Table-5.2.5
alarm JSON Object Alarm_Pos JSON show as follow Table-5.2.6
covert bool Preview switch (NVR/DVR only)
"50Hz", string Refresh frequency (A01 not used)
refresh_rate
"60Hz" Note: Analog channel is not supported
int OSD transparency Note: Analog channel does
alpha 1-128
not support
"AUTO""AHD""TVI""C string Image type (dvr only)
camera_type
VI"
"AUTO""1(0~50m)""2(5 string EQ level (dvr only)
0~150m)""3(150~250m)"
eq_level
"4(250~350m)""5(350~4
50m)"
string Flag supporting channel replication (for NVR
opy_ch "digit""analog""wifi"
and DVR only)
bool Judge whether the current channel parameters
channel_enable
can be configured
osd_invert bool OSD invert switch

Table-5.2.4 (Name JSON)


KEY VALUE COMMENT
RANGE TYPE
show bool OSD show channel name or not

text Max length: 31byte string OSD text(DVR/NVR/IPC)

pos JSON object Pos JSON show as follow Table-5.2.7

Table-5.2.5 (DateTime JSON)

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

Table-5.2.6 (Alram_Pos JSON)


KEY VALUE COMMENT
RANGE TYPE
show bool Alarm_Pos whether support motion
text Max length:32/40byte string Alarm OSD text,IPC max 32byte
pos JSON object Pos JSON show as follow Table-5.2.7

Table-5.2.7 (Pos JSON)


KEY VALUE COMMENT
RANGE TYPE
x [0~704] int X oordinate
y [0~576] int y oordinate
Example:
Request message:
POST /API/ChannelConfig/OSD/Get?2020-10-28@14:13:58 HTTP/1.1
{
"version": "1.0"
}

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"
}
}
}
}

5.3 Image Control


GET
URL POST/API/ChannelConfig/ImageControl/Get
Description Get the channel image control parameters
Request Body ChannelRequest JSON(show as follow Table-5.3.1)
Successful Response Channel Information JSON (show as follow Table-5.3.2)

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)

Table-5.3.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”

The number of channels


depends on the capabilities of
the device.

Table-5.3.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON Object
Table-5.3.x
channel_max Int Max number of channel

Table-5.3.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
JSON show as follow Table-5.3.3(neutral)
CH1 Json Object
JSON show as follow Table-5.3.5(A01 only)
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-5.3.3 (camera modeInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
79
status "Offline","Online" Channel online status, only for digital
channels.
string Note: This field is not available when the
channel is online

support_default Whether restoring default values is


bool
supported
camera_param_mode “Daylight”“Night” Only supports the existence of day and
string
night
image_setting "FullColorMode", Mode selection under the new full-color
"DayNightMode", string logic
"Schedule"
FullColorMode Full-color mode parameter structure,
Json Object including parameters as shown in Table
5.3.3.1
DayNightMode Day and night mode parameter structure,
Json Object including parameters as shown in Table
5.3.3.2
image_setting_schedule JSON array Schedule mode, refer to 9.1.3 for structure
Daylight Day (or ordinary) parameter structure,
Json Object including parameters as shown in Table
5.3.4
Night The parameters included in the night
parameter structure (only exists when the
Json Object
day and night parameter mode is
supported) are shown in Table 5.3.4
ir_cut_mode "AutoMode" IR-CUT mode(using when don’t support
"ColorMode", full color)
"BlackWhiteMode", string
"VideoMode"
"TimeSchedule"
ir_cut_mode "Auto" IR-CUT mode(using when support full
"Day", color)
"Night", string
"Image"
"Schedule"
start_time string Start time
end_time string End time
ir_cut_delay 1-36 int Ir-cut delay
ir_led "Off", Ir led
"On",
"Auto", string
"Manual",

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

Table-5.3.3.1 (Full Color Mode Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"Auto", Mode of fill light
"Manual",
white_light string
"Schedule",
"OFF"
The brightness of the fill light is only valid
light_distance 0-100 Int
when (white_light=="Manual")
whitelight_schedule Refer to 9.1.3 for the structure of fill lamp
JSON array
schedule mode

Table-5.3.3.2 (Day Nigh tMode Information JSON)


KEY VALUE COMMENT
RANGE TYPE
ir_cut_mode "Auto" IR-CUT mode
"Day",
"Night", string
"Image"
"Schedule"
ircut_schedule Refer to 9.1.3 for the structure of schedule
JSON array
mode
ir_cut_delay 1-36 int Ir cut delay
ir_led "Manual", Ir led
"SmartIR", string
"OFF",
low_beam_light 0-100 int Low beam light(Ir lamp takes effect
in manual mode)
high_beam_light 0-100 int High beam light(Ir lamp takes effect
in manual mode)

Table-5.3.4 (camera mode infoJSON)


exposure_mode "Auto","Manual","ShutterFirst", string Exposure mode
81
"IrisFirst"
iris "f1.4","f1.6","f2.0","f2.4","f2.8" Iris
,"f3.4","f4.0","f4.8","f5.6","f6.8
string
","f9.6","f11","f14","f16","f19",
"f22"
iris_max 0-100 Int Iris maximum

iris_min 0-100 Iris minimum (less than aperture


Int
maximum)
shutter_min "1/5","1/8","1/15","1/25","1/30" Minimum shutter limit (less than
,"1/50","1/60","1/100","1/120"," maximum shutter limit)
1/150","1/180","1/200","1/240",
"1/250","1/300","1/360","1/480"
string
,"1/500","1/600","1/700","1/100
0","1/1500","1/2000","1/2500","
1/5000","1/10000","1/12000","1
/20000","Flickerless",
shutter_max "1/5","1/8","1/15","1/25","1/30" Maximum shutter limit
,"1/50","1/60","1/100","1/120","
1/150","1/180","1/200","1/240",
"1/250","1/300","1/360","1/480"
string
,"1/500","1/600","1/700","1/100
0","1/1500","1/2000","1/2500","
1/5000","1/10000","1/12000","1
/20000","Flickerless",
gain 0-100(A01 only)、1-128 int/stri Gain: IPC ranges from 1-128; A01
(new)/ "Disable","Low", ng ranges from 0-100
"Middle","High"(old) (old

angle_rotation "0","90","180","270" string Angle rotation
shutter_limit "1/5","1/8","1/15","1/25","1/30" Shutter limit(s)
,"1/50","1/60","1/100","1/120","
1/150","1/180","1/200","1/240",
"1/250","1/300","1/360","1/480"
string
,"1/500","1/600","1/700","1/100
0","1/1500","1/2000","1/2500","
1/5000","1/10000","1/12000","1
/20000","Flickerless",
back_light "WDR","HLC","DWDR", Back light
"BacklightCompensation", string
"Close"
wdr_hide_ai_area Whether WDR and dash box
bool
display are mutually exclusive
wdr_coefficeient 0-100、1-255 int WDR coefficient

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

blue_tuning 0-100、1-255 int Blue tuning


green_tuning 1-255 Int Green tuning
defog_mode "Disable","Auto","Manual" string Defog mode
defogging_level 0-100/(1-255) int Defogging level,( IPC:1-255)
denoising "Close", "CommonMode", Denoising switch
"ExpertMode" or "Disable", string
"Auto", "Manual"
denoising_level 0-100/(1-255) int Denosing level,( IPC: 1-255)
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
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.5 (camera mode infoJSON)


status "Offline","Online" Channel online status, only for
digital channels.
string
Note: This field is not available
when the channel is online
mirror_mode "Close", Mirror mode
"VerticalMirroring",
string
"HorizontalMirroring",
"All"
corridor_mode “Close”,"Open" string Corridor mode

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",

ir_cut_delay 1-36 int Ir cut delay


ir_led "Off", Ir led
"On", (Manual see Table-5.3.4.2)
"Auto", string
"Manual",

image_sensitivity "Low", No photosensitive control


"Middle", string sensitivity, supporting the use of
"High" photosensitive devices.
day/night_mode "SignalTriggered", Day/night mode(A01 only)
"ImageTriggered" string

sensitivity "Low","Middle","High" string Sensitivity(A01 only)


exposure_mode "Auto","Manual","ShutterFirst", Exposure mode
string
"IrisFirst"
shutter_speed "1/3","1/4","1/8","1/12","1/15"," Shutter data(A01 only)
1/25","1/30","1/50",
"1/60",,,"1/90","1/100","1/120",
"1/125","1/180","1/250","1/350"
,"1/500","1/725","1/1000","1/15 string
00","1/2000","1/3000",
"1/4000","1/6000","1/10000","1
/30000","1/100000"

iris "f1.4","f1.6","f2.0","f2.4","f2.8" Iris


,"f3.4","f4.0","f4.8","f5.6","f6.8
string
","f9.6","f11","f14","f16","f19",
"f22"
iris_max 0-100 Int Iris max

iris_min 0-100 Iris min (less than maximum iris


Int
limit)
gain 0-100(A01 only)、1-128 int/string Gain, IPC: 1-128; A01:0-100
(new)/ "Off","Low", (old)
"Middle","High"(old)
angle_rotation "0","90","180","270" string Angle rotation
coefficient 0-100 int Exposure compensation
84
coefficient (A01 only)
background_frequency "Close","50Hz","60Hz" string Background frequency (A01
only)
auto_slow_shutter “Close”,"Open" string Slow shutter switch (A01 only)
shutter_limit(s) "1/5","1/8","1/15","1/25","1/30" Shutter limit
,"1/50","1/60","1/100","1/120","
1/150","1/180","1/200","1/240",
"1/250","1/300","1/360","1/480"
string
,"1/500","1/600","1/700","1/100
0","1/1500","1/2000","1/2500","
1/5000","1/10000","1/12000","1
/20000","Flickerless",
back_light "WDR","HLC", Backlight
"BacklightCompensation", string
"Close"
wdr_coefficeient 0-100、1-255 int WDR coefficeient
hlc_coefficeient "Low", "Middle", "High" (A01 string HLT coefficeient(A01 only),
specific) / 1-255 /int IPC:1-255
hlc_strength 1-255 HLT STRENGTH coefficeient
int
(non A01 only)
blc_level 1-15 Int BLC stregth
back_light_area "Top","Left","Down","Right"," BLC area(non A01 only)
string
Center"
blc_area "Center Area""Custom" string (A01 only)
white_balance "Auto","Manual", White balance Ipc :“Auto”
"AutoTracking","OnePush", “Manual”,"Indoor"
"Indoor","Outdoor",
"FixedSodiumLamp",
string
"FluorescentLamp1",
"FluorescentLamp2",
"IncandescentLamp",
"Sunlight"
red_fine-tuning 0-100 int Red fine tuning(A01 only)
blue_fine-tuning 0-100 int Blue fine tuning (A01 only)
red_tuning 0-100、1-255 int Red tuning
blue_tuning 0-100、1-255 int Blue tuning
green_tuning 1-255 Int Green tuning
ct_upper_limit 1500-15000 Color temperature upper limit
int
(A01only)
ct_lower_limit 1500-15000 Color temperature lower limit
int (lower limit must be less than
upper limit) (A01 only)
defog_mode "Disable","Auto","Manual" string Defog mode

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

5.4 Video Color


GET
URL POST/API/ChannelConfig/Color/Get
Description Get the channel video color parameters
Request Body ChannelRequest JSON(show as follow Table-5.4.1)
Successful Response Channel Information JSON (show as follow Table-5.4.2)

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)

Table-5.4.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”

The number of channels depends


on the capabilities of the device.

Table-5.4.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON object
Table-5.4.x

Table-5.4.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-5.4.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-5.4.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital
channels.
status "Offline","Online" string
Note: This field is not available when the
channel is online
hue 0-255 int hue
bright 0-255 int bright

87
contrast 0-255 int contrast
saturation 0-255 int saturation
sharpness 0-255 int sharpness
support_default bool Whether support load default

5.5 Video Cover


GET
URL POST/API/ChannelConfig/VideoCover/Get
Description Get the channel video cover parameters
Request Body ChannelRequest JSON(show as follow Table-5.5.1)
Successful Response Channel Information JSON (show as follow Table-5.5.2)

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

Table-5.5.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”

The number of channels


depends on the capabilities of
the device.

Table-5.5.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON Object
Table-5.5.x
channel_max Int Max channel
support_copy bool Whether support copy(NVR、DVR only)

Table-5.5.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-5.5.3

88
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-5.5.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital channels.
status "Offline","Online" string Note: This field is not available when the
channel is online
privacy_zone_enable Bool Privacy zone switch
Zone JSON show as follow Table-5.5.5
zone_info_p JSON array Note: The A01 SDK protocol supports up to 4
occlusion regions(A01 only)
Zone JSON show as follow Table-5.5.6
zone_info JSON array The onvif protocol supports up to 4 occlusion
regions
string Flag supporting channel replication (NVR and
copy_ch "digit""analog""wifi"
DVR only)

Table-5.5.5 (Zone JSON-A01 SDK)


KEY VALUE COMMENT
RANGE TYPE
zone_no 1-8 int Occlusion area number
Support the maximum number of occluded
maxnum 8 int
regions
color int Rgb color value
Zone coordinates JSON show as follow Table-
point JSON array
5.5.7

Table-5.5.6 (Zone JSON-onvif)


KEY VALUE COMMENT
RANGE TYPE
zone_no 1-4 int Occlusion area number
zone_enable bool Occlusion area switch
Zone coordinates JSON show as follow Table-
rect JSON object
5.5.7

Table-5.5.7 (Zone coordinates JSON)

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

Table-5.6.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”

The number of channels


depends on the capabilities of
the device.

Table-5.6.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_max int Max channel nummber
support_copy bool Whether support copy(NVR、DVR only)
Channel Information JSON show as follow
channel_info JSON object
Table-5.6.x

Table-5.6.x (Channel Information JSON)

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

Table-5.6.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital channels.
status "Offline","Online" string Note: This field is not available when the channel
is online
signal_type “Analog” “Digital” string Signal type
protocol "PelcoD","PelcoP" string PTZ protocol
"COAX1","COAX2"
baudrate "1200","2400","4800", string Baud rate
"9600"
databit "8","7","6","5" string Data bits
stopbit "1","2" string Stop bit
parity "None","Odd","Even",
string Parity bit
"Mark","Space"
address 1-255. int Address code
string Flag supporting channel replication (for NVR
copy_ch "digit""analog""wifi"
and DVR only)

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”

The number of channels


depends on the capabilities of
the device.

Table-5.7.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON object
Table-5.7.x IPC ONLY USE CH1

Table-5.7.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-5.7.2
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-5.7.2 ((Stream Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Stream Information JSON show as follow Table-
main_stream_info Json Object
5.7.3
Stream Information JSON show as follow Table-
sub_stream_info Json Object
5.7.3
Stream Information JSON show as follow Table-
mobile_stream_info Json Object
5.7.3

Table-5.7.3 (Single Stream Information JSON)


KEY VALUE COMMENT
RANGE TYPE
region_id_1 1-8 Json object Region ID, single ROI Information JSON as

92
follow Table

… Json Object

region_id_8 Json Object

Table-5.7.4 ((ROI mainstream Information JSON)


KEY VALUE COMMENT
RANGE TYPE
roi_switch bool ROI Enable
“Lowest”,"Lower" ROI Level
roi_level "Low","Medium" string
"Higher","Highest"
main_non_roi_fps string Non ROI Zone Fps
ROI Zone Rection, Rection Information JSON as
rect Json Object
follow Table-5.7.7

Table-5.7.5 ((ROI substream Information JSON)


KEY VALUE COMMENT
RANGE TYPE
roi_switch bool ROI Enable
“Lowest”,"Lower" ROI Level
roi_level "Low","Medium" string
"Higher","Highest"
sub_non_roi_fps string Non ROI Zone Fps
ROI Zone Rection, Rection Information JSON as
rect Json Object
follow Table-5.7.7

Table-5.7.6 ((ROI mobilestream Information JSON)


KEY VALUE COMMENT
RANGE TYPE
roi_switch bool ROI Enable
“Lowest”,"Lower" ROI Level
roi_level "Low","Medium" string
"Higher","Highest"
mobile_non_roi_fps string Non ROI Zone Fps
ROI Zone Rection, Rection Information JSON as
rect Json Object
follow Table-5.7.7

Table-5.6.7 (Rection Information JSON)


KEY VALUE COMMENT
RANGE TYPE
left 0-704 int Left

93
top 0-576 int Top

width 0-704 int Width

height 0-576 int Height

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
}
}
]
}
}
}
}

5.8 POE Power


GET
URL POST/API/ChannelConfig/PoePower/Get
Description Get the wireless camera config
Request Body ChannelRequest JSON(show as follow Table-5.8.1)
Successful Response Channel Information JSON (show as follow Table-5.8.2)

Table-5.8.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”

The number of channels depends


on the capabilities of the device.

Table-5.8.2 (analog channel Information JSON)


KEY VALUE COMMENT
102
RANGE TYPE
SingleInformation JSON show as follow Table-
channel_info Json Object
5.8.2.1
actual_power string Used power
surplus_power string Residual power
total_power string Total power
channel_min_power string Minimum power per channel
channel_max_power string Maximum power per channel
channel_max int Total number of channels

Table-5.8.2.1 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-5.8.2.1.1
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-5.8.2.1.1 (Single Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_current_po Power for current channel
wer Max length: 7byte string

5.9 Video Crop


GET
URL POST/API/ChannelConfig/VideoCrop/Get
Description Get the channel video crop parameters
Request Body ChannelRequest JSON(show as follow Table-5.9.1)
Successful Response Channel Information JSON (show as follow Table-5.9.2)

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”

The number of channels


depends on the capabilities of
the device.

Table-5.9.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON Object
Table-5.9.x
channel_max Int Max channel number

Table-5.9.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-5.9.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-5.9.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital channels.
status "Offline","Online" string Note: This field is not available when the
channel is online
enable bool Enable switch
fps 1-10 int Crop Fps
Zone JSON show as follow Table-5.9.4
zone_info JSON array
Note: only support 2 zone

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

Table-5.9.5 (Zone coordinates JSON)


KEY VALUE COMMENT
RANGE TYPE
left 0-704 int X coordinate
top 0-576 int Y coordinate
width 0-704 int width
height 0-576 int heigth

5.10 Remote Pair (Wireless specific)


SET
URL POST/API/Login/ChannelPairing/Set
Description Setting up remote pairing
Request Body ChannelRequest JSON(show as follow Table-5.10.1)
Successful Response Channel Information JSON (show as follow Table-5.10.2)

Table-5.10.1 (ChannelRequest JSON)


KEY VALUE COMMENT
RANGE TYPE
channel int Channel number of remote pairing
Remote pairing operation command, 1: pair, 0:
pair_status int
unpair,1:pair,0:unpair

Table-5.10.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Status of remote pairing.
state Max_length:20 string Pairing: pairing
Device is busy:Device is busy

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

Table-6.1.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”

The number of channels depends


on the capabilities of the device.

Table-6.1.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON Object
Table-6.1.x
channel_max int Total channels of current equipment
Whether the page supports copy (NVR and DVR
support_copy bool
only)
analog_max int Maximum number of device analog channels
bandwidth object Information shows as follow Table-6.1.5

Table-6.1.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-6.1.3

106
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-6.1.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital
"Offline", channels.
status string
"Online" Note: This field is not available when the
channel is online
stream_type "Normal",“Alarm” string Stream type(A01 only)
max_frame_rate 20、25、30、50、60 int Full frame rate(A01only)
"320 x 240", resolution
"640 x 480", The resolution, frame rate and code rate
"1280x720", are linked. If one of them transmits a
"1280x960", value, the other two must follow. This
"1920x1080", linkage rule can be broken by passing the
resolution "2304x1296", string device capacity value breakStreamLink.
"2048x1520",
"2592x1520",
"2592 x 1944",
"3072 x 1728",
"3840 x 2160"
fps int Frame rate
"H.264","H.265", Video encoding type
video_encode_type "H.264+","H.265+", string
“MJPEG”
bitrate_control "CBR","VBR" string Bitrate type
Image quality
"Lowest","Lower","Low",
video_quality string Note: This parameter is only supported
"Medium","Higher","Highest"
when Type is VBR option
bitrate_mode "Predefined","UserDefined" string Bitrate mode

8,16,24,32,48,64,80,96,128,160, Preset bitrate value size


192,224,256,320,384,448,512,6
40,768,
bitrate int
896,1024,1280,1536,1792,2048,
3072,4096,5120,6144,7168,819
2,10240,12288,16384,100000
bitrate_default JSON Object JSON show as follow Table-6.1.4
107
custom_bitrate int Custom stream size
audio bool Audio switch.
i_frame_interval int I frame interval
i_frame_interval_rat I frame interval is changed to x times the
int
e frame rate
etr bool Dynamic recording switch(NVR only)
"320 x 240", Dynamic recording resolution ( NVR
"640 x 480", only)
"1280x720",
"1280x960",
"1920x1080",
etr_resolution "2304x1296", string
"2048x1520",
"2592x1520",
"2592 x 1944",
"3072 x 1728",
"3840 x 2160"
Frame rate of dynamic video recording
etr_fps int
(NVR only)
8,16,24,32,48,64,80,96,128,160, Preset stream size of dynamic video
192,224,256,320,384,448,512,6 (NVR only)
40,768,
etr_bitrate int
896,1024,1280,1536,1792,2048,
3072,4096,5120,6144,7168,819
2,10240,12288,16384,100000
Custom stream size for dynamic video
etr_custom_bitrate int
recording(NVR only)
Stream type of dynamic video recording
etr_stream_type “Alarm” string
(NVR only)
"H.264","H.265", Video encoding type of dynamic video
etr_video_encode_t
"H.264+","H.265+", string recording(NVR only)
ype
“MJPEG”
Stream type of dynamic video ( NVR
etr_bitrate_control "CBR","VBR" string
only)
Image quality of dynamic video recording
"Lowest","Lower","Low", (NVR only)
etr_video_quality string
"Medium","Higher","Highest" Note: This parameter is only supported
when Type is VBR option
etr_bitrate_mode "Predefined","UserDefined" string Dynamic video stream mode(NVR only)
etr_audio bool Audio switch. (NVR only)
frame rate interval of dynamic video
etr_i_frame_interval int
recording(NVR only)
string Flag supporting channel replication
copy_ch "digit""analog""wifi"
(NVR、DVR only)
108
Mobilestream or the fourth stream -
enable_stream bool
switch
“Baseline” Video coding level(IPC only)
string
video_encode_level “MainProfile” Note: H265 only has
“HighProfile” MainProfileMainProfile
“SUPPORT_D1”, Simulate gun mode. The copy can only be
“SUPPORT_960H“, made when the mode is consistent.
“SUPPORT_720P“, Digital channel not supported
“SUPPORT_1080P“,
“SUPPORT_3W“,
“SUPPORT_720PCIF“,
“SUPPORT_4W“,
resolution_mode “SUPPORT_3W_TVI“, string
“SUPPORT_5W“,
“SUPPORT_8W“,
“SUPPORT_3W_HALF“,
“SUPPORT_4W_HALF“,
“SUPPORT_5W_HALF“,
“SUPPORT_8WV2“,
“SUPPORT_8WCVI“,
Disable the IPC parameter settings when
rtsp_enable bool
using the RTSP protocol.

Table-6.1.4 (ResolutionInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
Resolution rate value, corresponding
“1280 * 720” JSON Object
JSON show as follow Table-6.1.4.1
Resolution rate value, corresponding
... JSON Object
JSON show as follow Table-6.1.4.1

Table-6.1.4.1 (FpsInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
Frame rate value, corresponding toJSON
“1” JSON Object
show as follow Table-6.1.4.2
Frame rate value, corresponding toJSON
... JSON Object
show as follow Table-6.1.4.2

Table-6.1.4.2 (Bitrate DefaultInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
256,320,384,448,512,640,768, Each fps corresponds to one bitrate
default_value int
896,1024,1280,1536,1792,2048, default value.
109
3072,4096,5120,6144,8192

Table-6.1.5 (Bandwidth info JSON)


KEY VALUE COMMENT
RANGE TYPE
total_bandwidth int Total bandwidth(unit:kpbs)
remaining_bandwidth int Remaining bandwidth(unit:kpbs)

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)

Table-6.2.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”

The number of channels depends


on the capabilities of the device.

Table-6.2.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON object
Table-6.2.x

Table-6.2.x (Channel Information JSON)


110
KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-6.2.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-6.2.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
auto_capture false:off, true:on bool Auto capture switch
stream_type "Mainstream","Substream" string Stream type
Normal type snapshot
normal_interval int
interval.. Unit: Second
5,10,30,60,600,1800,3600
Alarm type snapshot
alarm_interval int
interval. Unit: Second
alarm_resolution string Image resolution
“Highest","Higher","Medium","Low","Lower", Image quality
alarm_quality string
"Lowest"
Flag supporting channel
copy_ch "digit""analog""wifi" string replication ( NVR 、
DVRonly)

Table-6.2.4(Error Information JSON)


KEY VALUE COMMENT
RANGE TYPE
0~MAX_PARA_CH The channel number for which the automatic
auto_capture_used array
N_NUM capture function is enabled
max_auto_capture_ The maximum number of channels that can be
16 int
num opened for automatic capture

6.3 Rtsp Url


GET
URL POST/Preview/StreamUrl/Get
Description Gets the url used to access the device RTSP Real-time streaming
Request Body ChannelRequest JSON(show as follow Table-6.3.1)
Successful Response Channel Information JSON (show as follow Table-6.3.2)

Table-6.3.1 (ChannelRequest JSON)

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.

Table-6.3.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON object
Table-6.3.3

Table-6.3.3 single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"CH1"…"CH1x" Channel number
"IP_CH1"…" IP_CH1x"
channel string
"WIFI_CH1"…" WIFI_CH1x"

mainstream_url Max length: 63 byte string Mainstream URL


substream_url Max length: 63 byte string Substream URL
mobilestream_url Max length: 63 byte string Mobile stream URL

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)

Successful Response The successful result response that described in 2.5


Error_Code Response Error Information JSON (show as follow Table-7.1.4)
(cloud_video_upload_chn_limit Return information attached to the error code)

Table-7.1.1 (ChannelRequest JSON)


KEY VALUE COMMENT
RANGE TYPE
alarm_in “Local<-1” String array Each array bit represents a channel with a
“IP_CH1<-1” string.
The number of channels
depends on the capabilities of
the device.

Table-7.1.2 (Channel Information JSON)

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

Table-7.1.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Local<-1 Json Object JSON show as follow Table-7.1.3
… Json Object
IP_CH1<-1 Json Object
… Json Object

Table-7.1.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"NormallyOpen", I/O alarm type
alarm_type "NormallyClose", string
"Off"
"10", "20", "40", "60" Alarm out latch time
latch_time or "5", "10", "20", string
"30"
buzzer "0","10","20","40", string Buzzer time(NVR/DVR only)
"60"
“Local->1”… Alarm output channel
”Local->x” Each array bit represents aalarm output
“IP_CH1->1”… channel with a string.
“IP_CH1->2”…
” IP_CHx->1”
alarm_out ” IP_CHx->2” array

The number of channels


depends on the
capabilities of the
device.
post_recording "30", "60", "120", string Post recording time
"300" or "0", "5",
"10", "20", "30"
send_email bool Send Email switch.
ftp_picture_upload bool Channel video FTP upload switch
picture_to_cloud bool Picture upload switch
video_to_cloud bool Video cloud upload switch (NVR/DVR

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”

detect_interval 1-256 int Alarm detection interval (front-end IO,


A01 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 displayed
voice_prompts_index 0~4294967295 int 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 local,


voice_prompts_select array 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.1.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

7.2 Motion Alarm


GET
URL POST /API/AlarmConfig/Motion/Get
Description It is used to get the motion alarm parameters
Request Body ChannelRequest JSON(show as follow Table-7.2.1)
Successful Response Channel Information JSON (show as follow Table-7.2.2)
115
SET
URL POST /API/AlarmConfig/Motion/Set
Description It is used to set the motion alarm parameters
Request Body Channel Information JSON (show as follow Table-7.2.2)
Successful Response The successful result response that described in 2.5
Error_Code Response Error Information JSON (show as follow Table-7.2.4)
(cloud_video_upload_chn_limit Return information attached to the error code)

Table-7.2.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”

The number of channels


depends on the capabilities of
the device.
page_type “ChannelConfig”, string Data used to distinguish between the
“AlarmConfig” channel configuration page and the alarm
“AllConfig” configuration page.
"AllConfig" is used when nvr gets and
sets ipc parameters, which is more light
than ChannelConfig_ Linkage field

Table-7.2.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON Object
Table-7.2.x
page_type “ChannelConfig”, string It is used to distinguish the data of channel
“AarmConfig” configuration page or alarm configuration page
channel_max int Total channels of current device
support_copy bool Whether support copy(NVR、DVR only)

Table-7.2.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.2.3
… Json Object
IP_CH1 Json Object

116
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.2.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital
"Offline", channels.
status string
"Online" Note: This field is not available when the
channel is online
switch bool Motion Switch.
Motion area is divided into row * col
mbcol 1 - 44(onvif) int blocks
Decided by camera, Set does not need
Motion area is divided into row * col
mbrow 1 - 30(onvif) int blocks
Decided by camera, Set does not need
string Flag supporting channel replication (for
copy_ch "digit""analog""wifi"
NVR and DVR only)
maxrect 4 (A01 SDK) int Motion max rect num add (4) (A01 only)
curid (A01 SDK) int Number of regions currently added
rect (A01 SDK) JSON array Rect JSON show as follow Table-7.2.4
sensitivity 1 - 5、1-8 int Motion detection sensitivity
intervals 1-256 int Motion alarm detection interval (s)
smart_moiton_detecti
bool
on
"0","10","20","40", Buzzer time(NVR/DVR only)
buzzer string
"60"
“Local->1”… Alarm out channel
”Local->x” Each array bit represents aalarm output
“IP_CH1->1”… channel with a string.
“IP_CH1->2”…
” IP_CHx->1”
alarm_out ” IP_CHx->2” array

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”

"30","60","120","3 Post recording time


post_recording string
00"

Currently, region is divided into 36 lines


and 44 blocks/line.
A bit describes a block in the line.
Bit = 1: motion in this block is
region_setting array monitored..
Example:
Region[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.
snap_enable bool Snap switch(A01 only)
show_message bool Show Message switch (NVR/DVR only)
send_email bool Send Email switch
full_screen bool FullScreen switch (NVR/DVR only)
ftp_picture_upload bool Channel snapshot FTP upload switch
bool Channel recording upload FTP switch
ftp_video_upload
(NVR/DVR only)
picture_to_cloud bool Picture upload cloud switch
Video cloud upload switch (NVR/DVR
video_to_cloud bool
only)
The white light linkage switch, when the
light_linkage bool motion is triggered, triggers the white
light linkage

"Disable"
"Motion"
multiple_switch "PIR_and_Motion" string Motion switch with multiple options
"Person" (A01 not used)
"PIR_and_Person"

File index (0~4294967295, 0 is None, that is,


no audio file is selected). Each file is named as
voice_prompts_index 0~4294967295 int "index_file name" (1_i will try). When
displayed on the page, "index_" should be
hidden, such as "1_i will try", and only "i will
118
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.2.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

7.3 PTZ Linkage

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

Table-7.3.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”

The number of channels


depends on the capabilities of
the device.

Table-7.3.2 (Channel Information JSON)


119
KEY VALUE COMMENT
RANGE TYPE
channel_max int Max channel number
support_copy bool Whether support copy(NVR、DVR only)
Channel Information JSON show as follow
channel_info JSON Object
Table-7.3.x

Table-7.3.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.3.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.3.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
switch bool Channel enable switch
motion bool Motion alarm trigger switch
pir bool PIR linkage switch
IO alarm input switch
If the value obtained by channel 0(1) is 1,
io array it means that Local<-1(Local<-2) is
checked on the interface, otherwise it is not
checked.
Single Channel Information JSON show as
ptz_info array
follow Table-7.3.4
all_alarm Json Object Alarm type switch Table-7.3.5
"digit""analog" string Flag supporting channel replication(NVR、
copy_ch
"wifi" DVR only)

Table-7.3.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
ptz_chn “CH1”…”CH1x” string Channel alarm linkage
“IP_CH1”…” The channel that the alarm is linked to.
IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”

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)

Table-7.3.5 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
ptz_ motion bool Motion alarm trigger switch

pir bool PIR linkage switch


io array I O alarm output switch
If the value obtained by channel 0(1)
is 1, it means that Local<-1(Local<-2)
is checked on the interface, otherwise
it is not checked.
linkage_lcd bool LCD linkage switch
linkage_pid bool PID linkage switch
linkage_sod bool SOD linkage switch
121
linkage_pd bool PD linkage switch
linkage_pdvd bool PDVD linkage switch
linkage_fd bool FD linkage switch
linkage_cc bool CC linkage switch
linkage_sound bool Sound linkage switch
linkage_vt bool Vt linkage switch
linkage_ad bool AD linkage switch
linkage_cd bool CD linkage switch
linkage_qd bool QD linkage switch
linkage_lpd bool LPD linkage switch
linkage_rsd bool RSD linkage switch
linkage_lpr bool LPR linkage switch
linkage_fr bool FR linkage switch
linkage_ai_pid bool AI PID linkage switch
linkage_ai_lcd bool AI LCD linkage switch
linkage_ai_pdvd bool AI PDVD linkage switch

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

Table-7.4.1 (ExceptionInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
exception_info Json Object JSON show as follow Table-7.4.2

Table-7.4.2 (ExceptionInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
video_loss Json Object JSON show as follow Table-7.4.3

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

Table-7.4.3(Exception Information JSON)


KEY VALUE COMMENT
RANGE TYPE
switch bool Enable switch.(A01only)
buzzer "0","10","20", string Buzzer chirping time.
"40","60"
“Local->1”…” alarm output channel switch
Local->x” Each array bit represents aalarm
“IP_CH1->1”…” output channel with a string.
alarm_out IP_CH1->x” array
“IP_CHx->1”…”
IP_CHx->1”

latch_time "10","20","40","60" string Alarm output latch time


Alarm output, output time:
show_message bool Show Message switch(A01 only)
send_email bool Send Email switch
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).
voice_prompts_index 0~4294967295 int
When 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
voice_prompts_time array
time conflicts

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

Table-7.5.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string Data used to distinguish between channel
“AlarmConfig” configuration page and alarm
“AllConfig” configuration page
"AllConfig" is used when nvr gets and sets
ipc parameters, which is lighter than
ChannelConfig_ Linkage field

Table-7.5.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_info JSON array Information JSON show as follow Table-7.5.x
channel_max int Total channels of current equipment
Whether the page supports copy (NVR and DVR
support_copy bool
only)
page_type “ChannelConfig”, string It is used to distinguish the data of channel
“AarmConfig” configuration page or alarm configuration page

Table-7.5.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.5.3
… Json Object
IP_CH1 Json Object
… Json Object

124
WIFI_CH1 Json Object
… Json Object

Table-7.5.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital channels.
status "Offline","Online" string Note: This field is not available when the
channel is online
pir switch,false: close
switch bool
true: open
sensitivity 1-8 int Pirdetection sensitivity
Pir area is divided into row * col blocks
mbcol 1 - 44 int Decided by camera, Set does not need
Keep consistent with motion
Pir area is divided into row * col blocks
mbrow 1 - 30 int Decided by camera, Set does not need
Keep consistent with motion
The Pir area is divided into row * col blocks,
and each bit describes the value of a block (8
bits per byte)
Bit = 1: motion in this block is monitored.
region_setting 200*8 int array 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.
detect_area JSON show as follow Table-7.5.5
detect_area 8 json array Note: The polygon area of the simulation
channel is used
string Flag supporting channel replication(NVR、
copy_ch "digit""analog""wifi"
DVR only)
White light linkage switch, when PIR is
light_linkage bool
triggered, white light is triggered
"0","10","20","40", Buzzer beeping time
buzzer string
"60"
“Local->1”… Alarm output time
”Local->x” Each array bit represents aalarm output
“IP_CH1->1”… channel with a string.
alarm_out “IP_CH1->2”… array
” IP_CHx->1”
” IP_CHx->2”

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

record_enable bool Record channel switch


“CH1”…”CH1x” Alarm outpout channel
“IP_CH1”…” Channel alarm linkage switch.
IP_CH1x”
record_channel array
“WIFI_CH1”…”
WIFI_CH1x”

"30","60","120", Post recording time


"300" or“5”
post_recording string
“10”“20”
“30”
show_message bool Show Message switch
send_email bool Send Email switch
full_screen bool FullScreen switch
ftp_picture_upload bool Channel snapshot FTP upload switch
ftp_video_upload bool Channel video FTP upload switch
picture_to_cloud bool Picture upload switch
video_to_cloud bool Video cloud upload switch
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.5.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

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

Table-7.6.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” (NVR only)

The number of channels


depends on the capabilities of
the device.

Table-7.6.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_info JSON object Channel Information JSON show as follow

127
Table-7.6.x

Table-7.6.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.6.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.6.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital channels.
status "Offline","Online" string Note: This field is not available when the
channel is online
flood_light_switch true false bool White light switch,false: close true: open
White light mode, Warninglight: always on,
Strobe: flashing
And determinence_ The mode is different,
"Warninglight"
flood_light_mode String flood_ light_ Mode indicates the way the white
"Strobe"
light lights up when the white light is triggered_
Mod indicates the picture color of white light in
night vision mode
flood_light_value 1 - 100 int White brightness
bright_time 5 - 180 int White light duration
"Low","Middle", Enabled in flashing mode, 0: low; 1:middle;
strobe_frequency String
"High" 2:high
8 grades: 8-high, 7-high 1-Low
sensitivity 1-8 int Sensitivity of area detection triggering white
light
siren_switch true false bool Horn switch false: close true: open
siren_value 1 - 10 int Horn volume
siren_time 5 - 180 int Horn duration
0: Off, 1: On
When it is turned on, when white light is
triggered, IRCUT will be forced to operate in
color_image_ctrl bool
daytime mode. When it is not turned on, IRCUT
will not respond to the effect of
photosensitivity.

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)

Table-7.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string Data used to distinguish between channel
“AlarmConfig” configuration page and alarm
configuration page

Table-7.7.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_max int Maximum number of channels

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

Table-7.7.3 (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
“Nonsupport”
channel is online
Sound Detection switch,false: close
switch true, false bool
true: open
rise_switch true, false bool Sound increases detection switch
Sound detection threshold sensitivity (only for
rise_sensitivity 1 - 100 int
sound increase detection)
sound_intensity 1 - 100 int Sound increases detection sensitivity
decline_switch true, false bool Sound reduction detection switch
decline_sensitivity 1 - 100 int Sound reduces sensitivity
string Flag supporting channel replication (NVR and
copy_ch "digit""analog""wifi"
DVR only)
"0","10","20","40", Buzzer beep time (NVR only)
buzzer string
"60"
“Local->1”… Alarm output channel
”Local->x” Each array bit represents aalarm output channel
“IP_CH1->1”… with a string.
“IP_CH1->2”…
” IP_CHx->1”
alarm_out ” IP_CHx->2” array

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

Table-7.7.6(Error Information JSON)

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

7.8 Occlusion Detection


GET
URL POST /API/AlarmConfig/Intelligent/OcclusionDetection/Get
Description It is used to get the OcclusionDetectionconfig parameters
Request Body See Table -1.2.1
Successful Response Channel Information JSON (show as follow Table-7.8.2)

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)

Table-7.8.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string Data used to distinguish between channel
“AlarmConfig” configuration page and alarm
configuration page

Table-7.8.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE

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

Table-7.8.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.8.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.8.3 (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
“Nonsupport”
channel is online
Occlusion Detection switch,false: close
switch true, false bool
true: open
sensitivity 1-6 int Lens occlusion alarm detection sensitivity
string Flag supporting channel replication (NVR and
copy_ch "digit""analog""wifi"
DVR only)
“Local->1”… Alarm output channel
”Local->x” Each array bit represents aalarm output
“IP_CH1->1”… channel with a string.
“IP_CH1->2”…
” IP_CHx->1”
alarm_out ” IP_CHx->2” array

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

7.9 Perimeter Intrusion Detection


GET
URL POST /API/AlarmConfig/Intelligent/PID/Get
Description It is used to get the PID config parameters

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)

Table-7.9.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string Data used to distinguish between channel
“AlarmConfig” configuration page and alarm
configuration page

Table-7.9.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON object
Table-7.9.x
page_type “ChannelConfig”, string It is used to distinguish the data of channel
“AarmConfig” configuration page or alarm configuration page
channel_max int Maximum number of channels
Whether the page supports copy(NVR、DVR
support_copy bool
only)

Table-7.9.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.9.3
… Json Object

136
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.9.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital
"Offline","Online"
channels.
status , string
Note: This field is not available when the
“Nonsupport”
channel is online
“Local->1”… Alarm output channel
”Local->x” Each array bit represents aalarm output channel
“IP_CH1->1”… with a string.
“IP_CH1->2”… Camera:
” IP_CHx->1” Local->1: On, Null: Off
alarm_out ” IP_CHx->2” array

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

Table-7.9.4 (rule_info Information JSON)


Rule No.1,Information JSON show as follow
rule_number1 Object
Table-7.9.5
Rule No.2,Information JSON show as follow
rule_number2 Object
Table-7.9.5
Rule No.3,Information JSON show as follow
rule_number3 Object
Table-7.9.5
Rule No.4,Information JSON show as follow
rule_number4 Object
Table-7.9.5

Table-7.9.5 (rule_number Information JSON)


rule_switch bool Rule switch
"A->B", Rule type
rule_type string
"B->A",
138
"A<->B"
rectangle, Information JSON show as follow
rule_rect Object
Table-7.9.6

Table-7.9.6 (Channel Information JSON)


x1 0-704 short x1 Coordinate point
y1 0-576 short y1 Coordinate point
x2 0-704 short x2 Coordinate point
y2 0-576 short y2 Coordinate point
x3 0-704 short x3 Coordinate point
y3 0-576 short y3 Coordinate point
x4 0-704 short x4 Coordinate point
y4 0-576 short y4 Coordinate point

Table-7.9.7(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
analog_channel_is_ 0~MAX_ANALOG_ Analog channel number of smart switch turned
array
used CHN on
max_intelligent_ana The maximum number of analog channels
1 int
log_channel_num supported by the intelligent switch

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
}
}
}
}
}
}
}

7.10Line Crossing Detection


GET
URL POST /API/AlarmConfig/Intelligent/LCD/Get
Description It is used to get the LCD config parameters
Request Body See Table -7.10.1
Successful Response Channel Information JSON (show as follow Table-7.10.2)

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.)

Table-7.10.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string the data to identify for Channel Config or
“AlarmConfig” Alarm Config

Table-7.10.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON object
Table-7.10.x
page_type “ChannelConfig”, string In Set, the data to identify for Channel Config or
“AarmConfig” Alarm Config
channel_max int Maximum channel number
support_copy bool The page supports copy or not(NVR、DVR only)

Table-7.10.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.10.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.10.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.

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.

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 array
conflict with each other.

Table-7.10.4 (rule_info Information JSON)


Rule no.1,Information JSON show as follow
rule_number1 Object
Table-7.9.5
Rule no.2,Information JSON show as follow
rule_number2 Object
Table-7.9.5
Rule no.3,Information JSON show as follow
rule_number3 Object
Table-7.9.5
Rule no.4,Information JSON show as follow
rule_number4 Object
Table-7.9.5

Table-7.10.5 (rule_number Information JSON)


rule_switch bool Rule switch
"A->B", Rule type
rule_type "B->A", string
"A<->B"
Each channel has a maximum of 64 point
coordinates, that is, 32 lines. If it is
companion line, only the first line is
used.
rule_line Object
If it is a perimeter, the 8 lines are
connected in turn to form a closed
figure Information JSON show as follow
Table-7.10.6

Table-7.10.6 (rule_line Information JSON)


x1 0-704 short x1 coordinate point
y1 0-576 short y1 coordinate point
x2 0-704 short x2 coordinate point
y2 0-576 short y2 coordinate point
Table-7.10.7(Error Information JSON)
KEY VALUE COMMENT
144
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH Channel number that enable the cloud video
array
d N_NUM upload.
max_cloud_video_u MAX_CLOUD_VID supporting maximum channel number of cloud
int
pload_num EO_RECORD_NUM video upload.
analog_channel_is_ 0~MAX_ANALOG_ analog channel is enable the switch
array
used CHN
max_intelligent_ana Maximum number of enabled analog channels
1 int
log_channel_num supported by the smart switch

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
}
}
}
}
}
}
}

7.11Stationary Object Detection


GET
URL POST /API/AlarmConfig/Intelligent/SOD/Get
Description It is used to get the SOD config parameters
Request Body See Table -7.11.1

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)

Table-7.11.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” DVR/NVR need;
IPC no need CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string the data to identify for Channel Config or
“AlarmConfig” Alarm Config

Table-7.11.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON object
Table-7.11.x
page_type “ChannelConfig”, string In Set, the data to identify for Channel Config or
“AarmConfig” Alarm Config
channel_max int Maximum channel number
support_copy bool The page supports copy or not(NVR、DVR only)

Table-7.11.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.11.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

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"

min_pixel 64-1080 int Minimum pixel value


max_pixel 320-1080 int Maximum pixel value
"Pedestrian" Detection type, Pedestrian or Vehicle.
"Vehicle"
detection_type string
"Pedestrian
&Vehicle"
"StaticMode" Detection mode
detection_mode "MotionMode" string

"FullScreen" Detection range


detection_range "Customize" string

JSON Single Channel Information JSON show as


rule_info
array follow Table-7.11.4
0 : no lines In liveview and playback shows lines or
iva_lines int
1: show lines not.
/* scene 0: indoor 1:outdoor*/(IPC first
scene "Indoor","Outdoor" string
generation of AI)
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.

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 array
conflict with each other.

Table-7.11.4 (rule_info Information JSON)


Rule no.1, Information JSON show as follow
rule_number1 Object
Table-7.11.5
Rule no.2, Information JSON show as follow
rule_number2 Object
Table-7.11.5
Rule no.3,Information JSON show as follow
rule_number3 Object
Table-7.11.5
Rule no.4,Information JSON show as follow
rule_number4 Object
Table-7.11.5

Table-7.11.5 (rule_number Information JSON)


149
Each channel has a maximum of 64 point
coordinates, that is, 32 lines. If it
is companion line, only the first line
is used.
rule_rect Object If it is a perimeter, the 8 lines are
connected in turn to form a closed
figure
Information JSON show as follow Table-
7.11.6
rule_switch bool Rule switch
“Legacy” Rule type
rule_type “Lost” string
“Lost &Legacy”

Table-7.11.6 (rule_line Information JSON)


x1 0-704 short x1 coordinate point
y1 0-576 short y1 coordinate point
x2 0-704 short x2 coordinate point
y2 0-576 short y2 coordinate point
x3 0-704 short x3 coordinate point
y3 0-576 short y3 coordinate point
x4 0-704 short x4 coordinate point
y4 0-576 short y4 coordinate point
Table-7.11.7(Error Information JSON)
KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH Channel number that enable the cloud video
array
d N_NUM upload.
max_cloud_video_u MAX_CLOUD_VID supporting maximum channel number of cloud
int
pload_num EO_RECORD_NUM video upload.
analog_channel_is_ 0~MAX_ANALOG_ analog channel is enable the switch
array
used CHN
max_intelligent_ana Maximum number of enabled analog channels
1 int
log_channel_num supported by the smart switch

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.)

Table-7.12.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string the data to identify for Channel Config or
“AlarmConfig” Alarm Config

Table-7.12.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON object
follow Table-7.12.x
page_type “ChannelConfig”, string In Set, the data to identify for Channel Config or
“AarmConfig” Alarm Config
channel_max int Maximum channel number

Table-7.12.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.12.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.12.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE

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

min_pixel 64-1080 int Minimum pixel value


max_pixel 320-1080 int Maximum pixel value
"Pedestrian" Detection type, Pedestrian or Vehicle.
"Vehicle"
detection_type string
"Pedestrian
&Vehicle"
"StaticMode" Detection mode
detection_mode "MotionMode" string

"FullScreen" Detection range


detection_range "Customize" string

0 - No line drawn 1 - In liveview and playback shows lines or


iva_lines int
Line drawn not.
rule_info Object Information JSON show as follow Table-7.12.5
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.

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 array
conflict with each other.
Symbol of supporting channel copy(NVR、DVR
copy_ch "digit""analog""wifi" string
only)

Table-7.12.4 (snap interval mode Information JSON)


"1" Snapshot number
"2"
snap_num string
"3"
"Unlimited"
snap_frequency int Snapshot frequency,unit: s/pic

Table-7.12.5 (rule_info Information JSON)


Rule no. 1,Information JSON show as follow
rule_number1 Object
Table-7.12.6

Table-7.12.6 (rule_number Information JSON)


rule_switch bool Rule switch
155
rule_type “Normal” string Rule type
rectangle, Information JSON show as follow
rule_rect Object
Table-7.12.7

Table-7.12.7 (Channel Information JSON)


x1 0-704 short x1 coordinate point
y1 0-576 short y1 coordinate point
x2 0-704 short x2 coordinate point
y2 0-576 short y2 coordinate point
x3 0-704 short x3 coordinate point
y3 0-576 short y3 coordinate point
x4 0-704 short x4 coordinate point
y4 0-576 short y4 coordinate point

Table-7.12.8(Error Information JSON)


KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH Channel number that enable the cloud video
array
d N_NUM upload.
max_cloud_video_u MAX_CLOUD_VID supporting maximum channel number of cloud
int
pload_num EO_RECORD_NUM video upload.

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
}
}
}
}

7.13 Face Detection


GET
URL POST /API/AlarmConfig/Intelligent/FD/Get
Description It is used to get the FD config parameters
Request Body See Table -7.13.1
Successful Response Channel Information JSON (show as follow Table-7.13.2)

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.)

Table-7.13.1 (ChannelRequest JSON)


KEY VALUE COMMENT
157
RANGE TYPE
channel “CH1”…”CH1x” string array Each array bit represents a channel with a
“IP_CH1”…” IP_CH1x” string.
“WIFI_CH1”…” WIFI_CH1x” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string the data to identify for Channel Config or
“AlarmConfig” Alarm Config

Table-7.13.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON object
Table-7.13.x
page_type “ChannelConfig”, string In Set, the data to identify for Channel Config or
“AarmConfig” Alarm Config
channel_max int Maximum channel number

Table-7.13.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.13.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.13.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
alarm_out array
“IP_CH1->2”… with a string.
” IP_CHx->1” Camera:
” IP_CHx->2” Local->1:enable,no value:disable

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

" RealTimeMode " Snapshot mode


"OptimalMode" IntervalMode JSON show as follow Table-7.13.4
snap_mode string
"IntervalMode"

"FrontalView" Customize JSON show as follow Table-7.13.5


"MultiAngle"
apply_mode string
"Customize"

min_pixel 32-1080 int Minimum pixel value


max_pixel 320-1080 int Maximum pixel value
159
0 - No line drawn 1 - In liveview and playback shows lines or
iva_lines int
Line drawn not.
rule_info Object Information JSON show as follow Table-7.13.6
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.

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 array
conflict with each other.
Symbol of supporting channel copy.(NVR、DVR
copy_ch "digit""analog""wifi" string
only)

Table-7.13.4 (snap interval mode Information JSON)


"1" Snapshot numbers
"2"
snap_num string
"3"
"Unlimited"
snap_frequency int Snapshot frequency,unit/pic

Table-7.13.5 (apply_mode Information JSON)


roll_range 0-180 int
pitch_range 0-180 int
yaw_range 0-180 int
picture_quality 0-100 int

Table-7.13.6 (rule_info Information JSON)


Rule no.1,Information JSON show as follow
rule_number1 Object
Table-7.13.7

Table-7.13.7 (rule_number Information JSON)


rule_switch bool Rule switch
“Normal” Rule type
rule_type "A->B" string
"B->A"
"Rect" Rule type
rule_kind "Line" string

"FullScreen" Detection range


detection_range string
"Customize"
160
Rectangle,Information JSON show as follow
rule_rect Object
Table-7.13.8
Line, Information JSON show as follow Table-
rule_line Object
7.13.9

Table-7.13.8 (Channel Information JSON)


x1 0-704 short x1 coordinate point
y1 0-576 short y1 coordinate point
x2 0-704 short x2 coordinate point
y2 0-576 short y2 coordinate point
x3 0-704 short x3 coordinate point
y3 0-576 short y3 coordinate point
x4 0-704 short x4 coordinate point
y4 0-576 short y4 coordinate point

Table-7.13.9 (rule_line Information JSON)


x1 0-704 short x1 coordinate point
y1 0-576 short y1 coordinate point
x2 0-704 short x2 coordinate point
y2 0-576 short y2 coordinate point

Table-7.13.10(Error Information JSON)


KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH Channel number that enable the cloud video
array
d N_NUM upload.
max_cloud_video_u MAX_CLOUD_VID supporting maximum channel number of cloud
int
pload_num EO_RECORD_NUM video upload.

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.)

Table-7.14.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string the data to identify for Channel Config or
“AlarmConfig” Alarm Config

Table-7.14.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON array
follow Table-7.14.x
page_type “ChannelConfig”, string In Set, the data to identify for Channel Config or
“AarmConfig” Alarm Config
channel_max int Maximum channel number

Table-7.14.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.14.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.14.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.

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.

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 array
conflict with each other.
Symbol of supporting channel copy.(NVR、DVR
copy_ch "digit""analog""wifi" string
only)

Table-7.14.4 (rule_info Information JSON)


Rule no.1,Information JSON show as follow
rule_number1 Object
Table-7.14.5

Table-7.14.5 (rule_number Information JSON)


rule_switch bool Rule switch
"A->B", Rule type
rule_type string
"B->A",
rectangle,Information JSON show as follow
rule_line Object
Table-7.14.6

Table-7.14.6 (Channel Information JSON)


x1 short x1 coordinate point
y1 short y1 coordinate point
x2 short x2 coordinate point
y2 short y2 coordinate point
Table-7.14.7(Error Information JSON)
KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH Channel number that enable the cloud video
array
d N_NUM upload.
max_cloud_video_u MAX_CLOUD_VID supporting maximum channel number of cloud
int
pload_num EO_RECORD_NUM video upload.

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)

Table-7.15.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” DVR/NVR need;
IPC not need
The number of channels
depends on the capabilities of
the device.

Table-7.15.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON Object
Table-7.15.x
channel_max int Current maximum channels

Table-7.15.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.15.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.15.3 (alarmtype request Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Perimeter_Intrusion_Det PID alarm type JSON show as follow Table-
Json object
ection 7.15.4 Only used by IPC
Line_Crossing_Detectio LCD alarm type JSON show as follow Table-
Json object
n 7.15.4 Only used by IPC
Stationary_Object_Detec SOD alarm type JSON show as follow Table-
Json object
tion 7.15.4 Only used by IPC

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

Table-7.15.4 (singal type Information JSON)


KEY VALUE COMMENT
RANGE TYPE
PID & LCD: Statistical type. Only used by IPC
Number of A -> B
Number of B -> A
Number of A <-> B
SOD
Number of legacy
Number of lost
statistical_type string
Number of legacy & lost
PD:
Number
CC:
Number of in
Number of out
Number of in & out

Table-7.15.5 (analysis data JSON)


KEY VALUE COMMENT
RANGE TYPE
JSON Channel Information JSON show as follow
channel_info
Object Table-7.15.6

Table-7.15.6 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.15.7
… Json Object
IP_CH1 Json Object
… Json Object
167
WIFI_CH1 Json Object
… Json Object

Table-7.15.7 (analysis data JSON)


KEY VALUE COMMENT
RANGE TYPE
report unsigned Statistical report. The array length is
int array divided into daily report 24, weekly
report 7, monthly report 0 to 31, and
annual report 12. The value of each
digit (0-65535) indicates the number of
statistics collected in the period.

7.16 Voice Prompt

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)

Successful Response Response Information JSON (show as follow Table-7.16.2.2)

7.16.2 Syntax

Table-7.16.2.1 (Request JSON)


KEY VALUE COMMENT
RANGE TYPE
"Normal", string Control type
"AiFace" Normal:non AIface and non AI
control_type
"AiPlate" plate
AiFace:AI face
168
AiPlate:AI plate
"g711a" string
Remote audio file format to
"aac"
download when listening
download_mode "wav"
"mp4"
"mp3"
string When the control_type is AiPlate,it
must use this string.
license_plate Otherwise no need to
use this string. In menu
it’s ”License Plate”

Table-7.16.2.2 (Response JSON)


KEY VALUE COMMENT
RANGE TYPE
info json object JSON show as follow Table-7.16.2.3
audio_list json array Audio file list

Table-7.16.2.3 (analysis data JSON)


KEY VALUE COMMENT
RANGE TYPE
language string Current system language, used to cut
into the network server
when importing text
default language
ipc_channel_info json array
The IPC supports a list of channels for
language output

url string The url for IPC to audition the audio


file. For example
http://IP:Port/VoicePromptsTransform/
api/FileName,IPC needs to replace the
IP、Port、FileName. FileName is the
request file+file format of audio_lis.
The file format is released when request
download_mode
( http://127.0.0.1:80/VoicePromptsTra
nsform/api/test.mp3)

Table-7.16.2.1 (Request JSON)


KEY VALUE COMMENT
RANGE TYPE
169
"Upload" string Control command
"Remove" Upload: uploads an audio file or
"Transform" text
"Exit" Remov: Deletes an audio file
"Play" Transform: Transform the audio file
(If the remote end does not
support G711A decoding during the
listening trial, run this command to
ask the board to convert the audio
file to the required format. Note
that if this command has been run,
command when exiting the audio broadcast
page, run the Exit command to let
the board release resources)
Exit: tells the board to release
resources occupied by the
Transform command (if the
Transform command is not
delivered, this command is not
required when exiting the audio
broadcast page)
Play: Play an audio locally on the
board
" Normal " string Control type
" AiFace " Normal:non AI face and AI plate
"AiPlate" AiFace:AI face
control_type AiPlate:AI plate
During the commend of "Upload"
"Remove" "Transform" "Play"to
place the tring
"File" string Convert mode
"LocalText" File: convert to audio file
convert_mode "NetworkText" LocalText: local convert text,
NetworkText: network convert text
In "Upload" commend to place
0~65535 int command :"Upload" and
convert_mode: "File" to release at
packet_index the same time, means the index of
current file packet.

0~65535 int command :"Upload" and


convert_mode: "File" to release at
file_count
the same time, means the total file
packet.
170
1~64 string command :"Upload" and
convert_mode: "File" to release at
file_name
the same time, means the upload
audio file name.
control_type: "Normal" - string command :"Upload" and
1~5M convert_mode: "File" to release at
control_type:"AiFace"- the same time, means the update
1~500K audio file content. control_type: "
file_data
Normal "file size is 1~5M。
control_type: " AiFace " the whole
file should be 1~500K(each single
file should not over 1.5M)
1~1024 string command : "Upload" and
text convert_mode: "File" to release at
the same time, means the text
1~11 int command :"Upload" and
convert_mode: "File" to release at
the same time, means to export in
that time.
command :" Remove "、
control_type: " Normal " is
released, means to delete the file
index of the delete audio list.
command :" Remove "、
control_type: " AiFace " released,
means the audio to delete.
command :" Transform "、
control_type: " Normal " released,
index
means the index of the file.
command :" Transform "、
control_type: " AiFace "released,
means switch to which time period.

command :" Play "


control_type: " Normal " released,
means to play the index of that file.

command :" Play "


control_type: " AiFace " released,
means to play the audio of that
time period.

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

7.16.3.1 RequestGet Audio Files List

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": { }
}

7.16.3.3Request Remove Audio Files

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

Table -7.17.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” DVR/NVR need;
IPC not need
The number of channels
depends on the capabilities of
the device.

Table -7.17.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON object
follow Table-7.17.3

Table-7.17.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.17.4
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

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)

Table -7.17.5 (Combination Request JSON)


KEY VALUE COMMENT
RANGE TYPE
"AT_MOTION" "AT_PIR" Combination alarm type
"AT_IO" "AT_PID" "AT_LCD"
"AT_SOD" "AT_PD&VD"
"AT_FaceAttr"
alarm_type string
"AT_FD" "AT_CC" "AT_CD"
"AT_QD" "AT_LPD"
"AT_RSD" "AT_Sound"
"AT_VT"

"IP Camera" Alarm source


alarm_source "Analog Channels " string
" Local->1"… " Local->x"
support_ipc_io true false bool IPC channel supports IO or not

Table -7.17.6 (Voice prompts time Request JSON)


KEY VALUE COMMENT
RANGE TYPE
start_hour 0~23 int Start time h
start_minute 0~59 int Start time m
start_second 0~59 int Start time s
end_hour 0~23 int End time h
end_minute 0~59 int End time m
end_second 0~59 int End time s

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
}
]
}
}
}
}

7.18 Linkage Schedule


GET
URL POST /API/AlarmConfig/Schedule/Get
Description It is used to get the alarm schedule
Request Body ChannelRequest JSON(show as follow Table-7.18.1)
Successful Response Channel Information JSON (show as follow Table-7.18.2)

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

Table-7.18.1 (ChannelRequest JSON)


KEY VALUE COMMENT
RANGE TYPE
channel “CH1”…”CH1x” string array Each array bit represents a channel with a
180
“IP_CH1”…” IP_CH1x” string.
“WIFI_CH1”…” WIFI_CH1x”

The number of channels


depends on the capabilities of
the device.
page_type “FloodLight”, string Schedule for identify combination alarm
“Siren” type

Table-7.18.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON Object
Table-7.18.x
page_type “FloodLight”, string In Set, Schedule for identify combination alarm
“Siren” type

Table-7.18.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.18.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.18.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
schedule JSON array JSON show as follow Table-7.18.4

Table-7.18.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
“Motion”, Alarm schedule type
“IO”
“PIR”,
“FD”
schedule_type string
“PVD”,
“PID”
“LCD”,
“SOD”

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]
},

]
}
]
}
}
}
}

7.19 Serial Transport


SET

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.1(Serial Transport JSON)


KEY VALUE COMMENT
RANGE TYPE
serial_info Json Object SetialInfo JSON show as follow Table-7.19.2

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.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-7.21.4
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-7.21.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
JSON Time_schedule JSON show as follow
disarming_schedule
array Table-7.21.5

Table-7.21.5 (Time_schedule JSON)


KEY VALUE COMMENT
RANGE TYPE
schedule_type “Disarming” string disarming schedule
week JSON array WeekJSON show as follow Table-7.21.6

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": {…}
}
}
}
}

7.22 Voice alarm


Range
URL POST/API/AlarmConfig/VoiceAlarm/Range
Description Get the voice alarm info range
Request Body none
Successful Response VoiceAlarm JSON( show as follow Table-7.22.1 )

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*/

Table-8.1.1.2(Disk Information JSON)


KEY VALUE COMMENT
RANGE TYPE
id int HDD no. Note:
HDD no.(NVR 、 DVR Only
display_id int
only) obtaining is
model Max length: 40byte string HDD model allowed.
serial_no Max length: 20byte string HDD serial no. Setting is
firmware Max length: 8byte string HDD firmware model not
"None", HDD type supported
"Normal", •
"Esata",
"Sd",
device_type string
"Usb",
"Network",
"Raid"
"All"
active "Inactive","Active" string HDD working status
"NoHdd", HDD status
"Unformat",
"Normal",
"Full",
"ReadOnly",
status "HddError", string
"Connecting",
"Offline",
"Occupied",
"Oversized",
"Broken",
191
"Degrade",
"Rebuilding",
"Backup",
"RaidHdd"
total_size Unit: Megabytes int Total size
free_size Unit: Megabytes int Free size
total_time Unit: Megabytes int Total time
free_time Unit: Megabytes int Free time
format_enable bool If it can be format or not
delete_enable bool If it can be deleted or not
"ReadAndWriteDisk", Disk type
disk_type "RedundantDisk", string
"ReadOnlyDisk"
disk_group_id int disk group no.
NasMaxCount int Max count NAS HDD
nas_info Json Object JSON show as follow Table-8.1.1.2

Table-8.1.1.2 (NetHdd Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Enable int Switch
Index int NetHDD no.
"NFS", Protocol type (NFS SMB/CIFS)
Type string
"SMB/CIFS"
Username string User name
Password string Password
password_empty bool If there is password or not
Ip string IP
Dir string Direction route
Size Int HDD size(GB)
base_enc_password Json Object Encrypted Password, Table-12.7.2.3

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

Table-8.1.2.1 (NetHdd Information JSON)


KEY VALUE COMMENT
192
RANGE TYPE
Type string NetHdd、RaidHdd、Hdd
JSON show as follow Table-8.1.2.2(NetHdd)
Info Json Object
JSON show as follow Table-8.1.2.3(Hdd)

Table-8.1.2.2 (NetHdd Control JSON)


KEY VALUE COMMENT
RANGE TYPE
Mode string Add、Test、Del
Enable int switch
Index int NetHDD no.(in Add of Test it can’t transform. )
"NFS", Protocol type(NFS SMB/CIFS)
Type string
"SMB/CIFS"
Username string Username
Password string Password
Ip string IP
Dir string Direction route
Size Int HDD size(GB)
id int HDD no.
"ReadAndWriteDisk", Disk group type
disk_type "RedundantDisk", string
"ReadOnlyDisk"
disk_group_id int Disk group no.
base_enc_password Json Object Encrypted Password, Table-12.7.2.3

Table-8.1.2.3 (Hdd Control JSON)


KEY VALUE COMMENT
RANGE TYPE
id int Disk group no.
"ReadAndWriteDisk", Disk group type
disk_type "RedundantDisk", string
"ReadOnlyDisk"
disk_group_id int Disk group no.

Table-8.1.2.4 (dualtalk_param JSON)


KEY VALUE COMMENT
RANGE TYPE
result string success failed

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*/

Table-8.1.3.2(Disk Format Percent JSON)


KEY VALUE COMMENT
RANGE TYPE
hdd_id int array HDD no
hdd_format_state "Formatting","Ok" string HDD format state
hdd_format_percent 0~100 int HDD format percent
hdd_format_info json array Table-8.1.2.3

Table-8.1.3.3(Disk Format Percent JSON)


KEY VALUE COMMENT
RANGE TYPE
hdd_id Int HDD no
HDD format result
"Idle", /*unformatted*/
"Ok", /*OK*/
"InvalidParam", /*InvalidParam*/
hdd_format_result string
"NoExist", "NoExist",
"HwError", "HwError",
"Failed", "Failed",
"Oversized" "Oversized"

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"
}

8.2 Disk Group


GET
URL POST/API/StorageConfig/DiskGroup/Get
Description It is used to get the Disk Group parameters
Request Body none
Successful Response Disk Group JSON( show as follow Table-8.2.1 )

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

Table-8.2.1(Disk Group JSON)


KEY VALUE COMMENT
RANGE TYPE
disk_group_info JSON array Single Group JSON(show as follow Table-8.2.2 )
limit_channel_max int The maximum channel for the disk group

Table-8.2.2(Single Group JSON)


KEY VALUE COMMENT
RANGE TYPE
195
"None", Disk group type
disk_group_type "RecordDiskGroup", string
"RedundanceDiskGroup"
record disk group no./
group_num 1~MAX_HDD_GROUP_NUM int
Redundant disk group no.
“CH1”…”CH1x” record disk group channel
“IP_CH1”…” IP_CH1x” note: one channel can be only
channel string
“WIFI_CH1”…” WIFI_CH1x” added to one disk group.

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.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-8.3.2
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

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

Table-8.4.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”

The number of channels


depends on the capabilities of
the device.

Table-8.4.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON Object
Table-8.4.x
channel_max int total channel in current device
Current page supports copy or not(NVR、DVR
support_copy bool
only)

Table-8.4.x (Channel Information JSON)


200
KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-8.4.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-8.4.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
audio_enable bool
"G711A","G711U", Audio type
"ADPCM",
"G726_16K",
"G726_24K",
audio_type string
"G726_32K",
"G726_40K"
"ACC"

in_volume 0-10 int Channel Device in volume


out_volume 0-10 int Channel Device out volume

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

Table-8.5.1 (Riad JSON)


KEY VALUE COMMENT
RANGE TYPE
disk_info JSON Object Information Json Show as follow Table-
8.5.1.1
raid_info Json Object nformation Json Show as follow Table-
8.5.1.2
about_raid_info Json Object Information Json Show as follow Table-
8.5.1.3
create_info Json Object Information Json Show as follow Table-
8.5.1.4
ctrl_info Json Object Information Json Show as follow Table-
8.5.1.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.

Table-8.5.1.2.1 (task JSON)


KEY VALUE COMMENT
RANGE TYPE
RAID disk operation progress, none, RAID
"None", "Rebuild",
status string reconstruction (which takes several hours, 3 days
"Sync"
or more), and data synchronization
progress 0~100 int32 Percentage of the operation progress

Table-8.5.1.3 (about_raid_info JSON)


KEY VALUE COMMENT
RANGE TYPE
max_raid_num 0~16 int32 Maximum RAID disk number
raid_type int32 RAID type list
hotdisk_type "Public HotDisk" "string" Supports only one hot spare disk type
support_rebuild "No", "Yes" int Supports rebuild or not

Table-8.5.1.4 (create_raid JSON)


KEY VALUE COMMENT
RANGE TYPE
"OneKeyCreate", Supportive operation
"CreateRaid",
"DeleteRaid",
item string
"AddHotDisk",
"RemoveHotDisk",
"Rebuild"
"RAID0", "RAID1", RAID type list
raid_type "RAID4", "RAID5", string
"RAID6", "RAID10"
build RAID HDD,Json Show as follow Table-
disk_info array
8.5.1.4.1.

Table-8.5.1.4.1 (ctrl's disk_info JSON)


KEY VALUE COMMENT
RANGE TYPE
id 0~16 int32 Hdd id
serial_no max_length:20 string Hdd serial no.
check bool Build RAID Hdd

Table-8.5.1.5 (ctrl JSON)


KEY VALUE COMMENT

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)

video_type "MP4""RF" string Video type(DVR/NVR only)

max_package_int 10 30 60 180 300 600 Int Max package interval. second


erval (DVR/NVR only)

cloud_status "Activated","CloudFull","Unactivated", string Cloud storage connection


"NetworkBlocked","Disabled" status(DVR/NVR only)
Note: Only access is allowed,
and setting is not supported
total_size Unit: Bytes unsigned Total capacity (DVR/NVR
long dedicated)
long Note: Only access is allowed,
and setting is not supported
used_size Unit: Bytes unsigned Used capacity (DVR/NVR
long dedicated)
long Note: Only access is allowed,
and setting is not supported
cloud_over_write "Off","Auto","1Day","3Days","7Days", string Cloud storage data overwrite
"14Days","30Days","90Days" time (DVR/NVR only)
progress [0~100] int Percentage of capacity usage of
cloud storage (DVR/NVR
dedicated)
Note: Only access is allowed,
and setting is not supported
enc_agreement "ftp://""sftp://""https://" string IP front protocol
Total capacity (DVR/NVR
dedicated)
Note: Only access is allowed,
and setting is not supported
server_ip Max length: 255 byte string IP address(DVR/NVR only)
port [1~65535] int Server Port
username Max length: 255byte string Login user name
password Max length: 255byte string Login user password
password_empty bool Whether the password is empty
209
region [0~31] string Region (DVR/NVR only)
enable bool Enable the server (DVR/NVR
dedicated)
test bool Support TEST (DVR/NVR
only)
activate_cloud_b bool Whether the activation button is
tn supported (for DVR/NVR
only)
show_server_con "enable" "test" "port" "password" string Tell the remote corresponding
tent "password_empty" "video_stream_type" mode which controls should be
"server_ip" "video_type" displayed
"max_package_interval" "enc_agreement"
"region" "activate_cloud_btn" "cloud_status"
"total_size" "used_size" "progress"
"cloud_over_write"

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.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”

The number of channels depends on


the capabilities of the device.

Table-9.1.2 (Channel Information JSON)


KEY VALUE COMMENT
212
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON object
Table-9.1.x

Table-9.1.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-9.1.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-9.1.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
category JSON array CategoryJSON show as follow Table-9.1.4
Flags that support channel duplication (for NVR
copy_ch "digit""analog""wifi" string
and DVR only)

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

Table-10.1.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”

The number of channels


depends on the capabilities
of the device.

Table-10.1.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
214
Channel Information JSON show as follow
channel_info JSON Object
Table-10.1.x

Table-10.1.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-10.1.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-10.1.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
record_switch bool Video function switch
"Mainstream", Stream type, only supports dual stream devices,
stream_mode string
"DualStream" (for NVR/DVR only)
prerecord bool Pre-recording switch
manual_record bool Indicates the status of manual recording
net_break_record bool Indicates the status of manual recording
string Flags that support channel duplication (for NVR
copy_ch "digit""analog""wifi"
and DVR only)

10.2 Search Record


GET
URL POST/API/Playback/SearchRecord/Search
Description Search record information.
Request Body SearchRequest JSON(show as follow Table-10.2.1)
Successful Response Record Information JSON (show as follow Table-10.2.2)

Table-10.2.1 (SearchRequest 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”

The number of channels

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

Table-10.2.2 (RecordInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Record Information JSON show
record JSON array
as follow Table-10.2.3

Table-10.2.3 (Single Record Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel string channel number
Stream type (IPC
stream_mode "Mainstream","Substream" string only supports main
stream)
NormalRecord: 0x1, Recording type (IPC
only)
AlarmRecord:0x1c06,
IORecord: 0x4,
PIRRecord: 0x400,
SoundRecord: 0x1000,
NetbreakRecord: 0x800,
MotionRecord: 0x2,
record_type MotionAndIo: 0x6, int

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

Record file startdate.


start_date string The date format is
MM/DD/YYYY
Record file end date.
end_date string The date format is
MM/DD/YYYY
start_time string Record file start time.

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
}
]
]
}

10.3 Playback rtsp url


The video playback adopts the Rtsp protocol, and the url format is as follows:
Back-end equipment (NVR/DVR):
rtsp://ip:port/rtsp/playback?channel=1&subtype=0&starttime=2021-03-
24T01:30:00Z&endtime=2021-03-24T07:30:59Z&localtime=true
Front-end equipment (IPC):
[327DE platform]: rtsp://ip:port/rtsp/playback?channel=1&subtype=0&starttime=2021-03-
24T01:30:00Z&endtime=2021-03-24T07:30:59Z
[Other platforms]: rtsp://ip:port/cam/playback?channel=1&starttime=2021-03-
24T01:30:00Z&endtime=2021-03-24T07:30:59Z

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)

Table-10.3.1.1 (SearchRequest JSON)


KEY VALUE COMMENT
RANGE TYPE
channel “CH1”…”CH1x” string represents a channel with a string.
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…” WIFI_CH1x”

The number of channels


depends on the capabilities of
the device.
transport_typ "tcp"、"udp"、"http" “https”
string
e
Search startdate. (The passed date is calculated
start_date string according to the 0 time zone)
The date format is YYYY-MM-DD
Search end date.
end_date string
The date format is YYYY-MM-DD
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
stream_mode "Mainstream","Substream" string Stream type (IPC only supports main stream)
1<<0 (scheduled recording)
1<<2 (motion detection
recording)
1<<3 (IO alarm recording)
1<<4 (Cross-line detection alarm
recording)
1<<7 (smart alarm recording)
record_type 1<<9 (intrusion detection alarm int
recording)
1<<17 (audio alarm recording)
1<<18 (manual recording)
1<<20 (occlusion alarm
recording)
0x7FFFFFFE (all alarm
recordings)
220
0xFFFFFFFF (all recordings)

Table-10.3.2 (Single Channel Playback Rtsp URL JSON)


KEY VALUE COMMENT
RANGE TYPE
Max length: 127 bytes The playback rtsp URL of the request channel (if
Reference: the request fails, this field will not be returned,
"rtsp://192.168.1.100: and the corresponding error reason will be
554/rtsp/playback?cha returned
nnel=2&sutbype=0&r
ecordtype=429496729
playback_url string
5&starttime=2020-07-
03T00:29:37Z&endti
me=2020-07-
03T15:33:30Z&token
=123"

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"
}
}

10.6 Month Search


GET
URL POST/API/Playback/SearchMonth/Get
Description Search record information.
Request Body SearchRequest JSON(show as follow Table-10.6.1)
Successful Response Record Information JSON (show as follow Table-10.6.2)

Table-10.6.1 (SearchRequest JSON)


KEY VALUE COMMENT
RANGE TYPE
channel “CH1”…”CH1x” string array Each array bit represents a channel with a string.
“IP_CH1”…” IP_CH1x” (An empty array means searching all channels)
“WIFI_CH1”…” WIFI_CH1x”

The number of channels


depends on the capabilities of
the device.
search_type "Record","Picture","FD", string month search type
"PVD","PidLcd","Repeat",
"FaceAttendance"
Search startdate.
start_date string
The date format is MM/DD/YYYY
stream_type "Mainstream","Substream" string stream type

Table-10.6.2 (Record Information JSON)


KEY VALUE COMMENT
RANGE TYPE
is_has_rec int array
record_type int array

10.7 Pic Playback

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

Table-10.7.1 (SearchRequest JSON)


KEY VALUE COMMENT
RANGE TYPE
channel “CH1”…”CH1x” string Each array bit represents a channel with a string.
“IP_CH1”…” IP_CH1x” array Pass the parameter when searching for the first
“WIFI_CH1”…” WIFI_CH1x” time. When IE already has a picture information
list, this field does not need to be passed.
The number of channels depends on
the capabilities of the device.
Search start date.
The date format is MM/DD/YYYY
Each array bit represents a channel with a string.
start_date 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.
Search end date.
The date format is MM/DD/YYYY
Each array bit represents a channel with a string.
end_date 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.
Search start time.
The time format is hh:mm:ss
Each array bit represents a channel with a string.
start_time 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.
Search end time.
end_time string
The time format is hh:mm:ss

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.

Table-10.7.2 (Information JSON)


KEY VALUE COMMENT
RANGE TYPE
result bool
overload bool More than 5000 pictures
When this parameter is
requested, the content of
msg_type string
the field is returned
unchanged
Return a picture
picture json information and base64
picture content, see 10.7.3
When IE does not have a
string pic_info field, the board
all_pic_info
array will search and return this
field
When IE does not have a
pic_info field, the board
all_pic_num 0-500 int
will search and return this
field

Table-10.7.3 (Information JSON)


KEY VALUE COMMENT
RANGE TYPE
224
channel string
time string “yyyy/MM/dd hh:mm:ss”
image string picture content
Example:
When searching for pictures for the first time, the request includes information such as start and end
time, channel, etc., and the server returns a list of the searched data. In subsequent requests, the client
needs to take the pic_info information to the server to fetch pictures one by one.
An example of the first request is as follows:
Request message:
POST /API/Playback/Picture/Get?2020-10-28@14:19:11 HTTP/1.1
{
"version": "1.0",
"data": {
"start_date": "10/28/2020",
"start_time": "00:00:00",
"end_date": "10/28/2020",
"end_time": "23:59:59",
"record_type": 524287,
"channel": ["CH5"],
"pic_sort": 0
}
}
Response message:
HTTP/1.1 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 207
Connection: keep-alive
{
"version": "1.0",
"result": "success",
"data": {
"overload": false,
"all_pic_num": 4,
"all_pic_info": [{
"pic_info":
"AQAAAwAAAAAGAAAACAAAAAQAAAAAfQAAAAcTDhwKFAAA0IoBAZYAABAAAA
AAAAAA"
}, {
"pic_info":
"AQAAAgEAAAAGAAAACAAAAAQAAAAAAAAAAAcTDhwKFAABZosBAZYAABEAAA
AAAAAA"
}, {
"pic_info":
225
"AQAAAQIAAAAGAAAACAAAAAQAAAAAAAAAAAcTDhwKFAAC/IsBAZYAABIAAAA
AAAAA"
}, {
"pic_info":
"AQAAAAMAAAAGAAAACAAAAAQAAAAAAAAAAAcTDhwKFAADkowBAZYAABMAA
AAAAAAA"
}]
}
}

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)

Table-10.8.x (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Normal Json object (show as follow Table-10.8.1)
226
Picture Json object (show as follow Table-10.8.1)
HumanVehicle Json object (show as follow Table-10.8.1)
PidLcd Json object (show as follow Table-10.8.1)
Whether the AI playback page has a control for
supportFaceAttr bool
face attributes
param_limit Json object (show as follow Table-10.8.1)

Table-10.8.1 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
“Treelike”, UI display type: tree, checkbox
display_mode string
“Checkbox”
default_sort_of_re Used to search information in default
int
sults order/reverse order
items Json object (show as follow Table-10.8.1.1)
similarity_face int Control the range and default value of the
similarity input box of IE playback Face
Detection
similarity_custom int Control the range and default value of the Fault-
er tolerant input box of the IE playback License
Plate
similarity_license int Control the range and default value of the
similarity input box of IE playback Repeat
customer

Table-10.8.1.1 (Single items Information JSON)


record_type Json object Playback type (show as follow Table-10.8.2)
“Mainstream”, Main substream type (this field is only available
stream_mode string
“Substream” for Normal)

Table-10.8.2 (Single Channel Information JSON)


normal bool Normal
manual bool Manual
alarm Json object Alarm (show as follow Table-10.8.3)
(for IPC only)
smart Json object Smart (show as follow Table-10.8.4)
(for IPC only)
Human bool AI human (for NVR only)
Vehicle bool AI vehicle (for NVR only)
IO bool Io alarm recording type (for NVR only)
motion bool Motion alarm recording type (for NVR
only)
PIR bool Pir (for NVR only)

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)

Table-10.8.3 (Single Channel Information JSON)


IO Json object Io alarm recording type
motion Json object Motion alarm recording type
PIR Json object Pir
Sound Json object sound alarm
Netbreak Json object disconnected video

Table-10.8.4 (Single Channel Information JSON)


PID Json object
LCD Json object
SOD Json object
PD Json object
FD Json object
CC Json object

10.9 Record Tag


GET
URL POST /API/Playback/Tag/Get
Description Search Tag information
Request Body Record Tag JSON(show as follow Table-10.9.1)
Successful Response Tag Information JSON (show as follow Table-10.9.2)

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

Table-10.7.1 (Search Request JSON)


KEY VALUE COMMENT
RANGE TYPE
channel “CH1”…”CH1x” string Each array bit represents a channel with a string.
“IP_CH1”…” IP_CH1x” array
“WIFI_CH1”…” WIFI_CH1x”

228
The number of channels 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

Keywords, when searching tags, only search


Keyword 0-39 string
tags containing keywords

Table-10.7.2 (Response Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Play the video from the
label time forward
Pre-play string ("5s")("10s")("30s")("1Mi
n")("2Min")("5Min")("10
Min")
Play the recording at the
end of the tag time
Post-play string ("5s")("10s")("30s")("1Mi
n")("2Min")("5Min")("10
Min")
string nformation JSON show as
all_tag_info
array follow Table-10.7.3
How many matching tags
all_tag_num 0-5000 int
were found

Table-10.7.3 (all_tag_info Information JSON)


KEY VALUE COMMENT
RANGE TYPE
The date format is
Tag_date string
MM/DD/YYYY
The time format is
Tag_time string
hh:mm:ss
229
which channel this tag
channel String
belongs to
chNum int channel number
label_id int Tag ID
record_id int Video ID
Tag_name 0-39 string label name

Table-10.7.4 (Add Tag Information JSON)


KEY VALUE COMMENT
RANGE TYPE
The date format is
Tag_date string
MM/DD/YYYY
The time format is
Tag_time string
hh:mm:ss
String which channel this tag
channel
array belongs to
chNum int channel number
label_id int Tag ID
record_id int Video ID
Tag_name 0-39 string label name
0-set, 1-delete, 2-modify
operate 0-2 int
name

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

Table-11.1.2 (Log Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single LogInformation JSON show as follow
log JSON array
Table-11.1.3

Table-11.1.3 (Single LogInformation JSON)


KEY VALUE COMMENT
RANGE TYPE
log date
start_date string The date format is
MM/DD/YYYY
log time
start_time string The time format is
hh:mm:ss
log time
end_time string
The time format is hh:mm:ss
"System", string Log master type.
main_type "Operate", 1. When requesting for User,
"Alarm", only give Alarm log (A01).

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"

Human & Vehicle:


"Human",
"Vehicle",
"PID[Human]"
"LCD[Human]"
"PID[Vehicle]"
"LCD[Vehicle]"
"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"

Username of the operating


user string
user
Operating user's ip address
ip String

When modifying time, the


time_src String
old time
When modifying the time,
time_dst String
the new time
User ID of the operating user
user_id 0-> Administrator, 1-> user1, 2-> user2... 6-> user6 int

The ip address of the


ipc_ip string
operated ipc
Username of the user being
dst_user string
manipulated
User ID of the user being
dest_userid 0-> Administrator,1->user1 2->user2…6->user6 int
manipulated
HDD serial number
hddid int
238
Hard disk related
model string

Hard disk related


serial_no string

11.2 Load Default Parameter


OPRATE
URL POST /API/Maintenance/Reset/Range
Description Query whether the system needs to be restarted
Request Body Request JSON (show as follow Table-11.2.1)
Successful Response Load Default ParameterJSON(show as follow Table-11.2.2)

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

Table-11.2.2(Load Default Parameter JSON)


KEY VALUE COMMENT
RANGE TYPE
239
need_reboot bool Whether you need to reboot

11.3 Auto Reboot


GET
URL POST /API/Maintenance/AutoReboot/Get
Description Get the system information
Request Body None
Successful Response Auto Reboot information JSON (show as follow Table-11.3)

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

Table-11.3(Auto Reboot Information JSON)


KEY VALUE COMMENT
RANGE TYPE
auto_reboot auto restart switch
bool Automatic maintenance switch,.

period_mode "EveryDay", string maintenance cycle mode


"EveryWeek",
"EveryMonth"
week "Mon","Tue","Wed"," string Weekdays of the week.(When MaintainPeriod is
Thu","Fri","Sat", Week)
"Sun"
day 1~31 int Number of months.(When MaintainPeriod is
Month)
time string Restart time.
Format: hours : minutes
(Each digit must be written with two digits)

11.4 Ftp Upgrade


GET
URL POST /API/Maintenance/FtpUpgrade/Range
Description Get the information of Ftp Upgrade
Request Body none
Successful Response Ftp upgradeinformation JSON (show as follow Table-14.4.1)

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)

Table-11.4.1 (FtpUpgradeRange Info JSON)


KEY VALUE COMMENT
RANGE TYPE
ftp_addr {“min_len”:0,”max_len”:64} string ftp server address
ftp_port {“min”:1, “max”:65535} int ftp server port
username {“min_len”:0,”max_len”:64} string username
user_pwd {“min_len”:0,”max_len”:32} string login password
{“type”:”bool”,”mode”:”rw” Whether the password is empty
user_pwd_empty bool
}
{“min_len”:0,”max_len”:128 ftp upgrade file path
ftp_path string
}
ftp_buttons [“Save”,”Refresh”,”Check”,” string Whether the control interface button is displayed
Upgrade”]
241
online_upgrade {“type”:”bool” } bool It is used for the compatibility of old and new
APIs, and it is a functional interface to judge
whether to use FTP and HTTP online upgrade.

Table-11.4.2(FtpUpgrade Information JSON)


KEY VALUE COMMENT
RANGE TYPE
ftp_addr string ftp server address
ftp_port int ftp server port
username string username
user_pwd string login password
user_pwd_empty bool Whether the password is empty
ftp_path string ftp upgrade file path

Table-14.4.3 (FtpUpgrade Response JSON)


KEY VALUE COMMENT
RANGE TYPE
has_new_firmware bool Is there a new upgrade firmware
current_ver string
new_version string

Table-11.4.4 (FtpUpgradeResponse JSON)


KEY VALUE COMMENT
RANGE TYPE
upgrade_percent 0~100 int Upgrade progress
“start” string Upgrade status
“checkVersion”
”downloadStart”
“upgrade_download

upgrade_state
“upgrade_upgrade_s
ucceed”
“downloadFailure”
“upgrade_upgrading

“ok” string Upgrade result
upgrade_result
“finish”

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”]}
}
}
}

11.5 Device Reboot


SET
URL POST /API/Maintenance/DeviceReboot/Set
Description Restart the device immediately
Request Body Device Reboot Information JSON (show as follow Table-11.5.1)
Successful Response The successful result response that described in 2.5

Table-11.5.1 (Device Reboot Information JSON)


KEY VALUE COMMENT
RANGE TYPE
base_secondary_authentica Json Object Encryption auth,Table-12.7.2.4
tion

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 Import/Export Parameter

11.6.1 Description

For both DVR Camara.

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

Table-11.6.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
param string Base64 If no device is requested, there is no need
245
to reply to this item

Table-11.6.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
secondary_authent Max length: 16 byte string Verify the admin user password for secondary
ication authentication
param string Base64

Table-11.6.4 (Set Successful Response JSON)


KEY VALUE COMMENT
RANGE TYPE
"Success", Status of IPC operations
state string
"Failed"

11.7IPC Maintenance

11.7.1 Description

For IPC Camara.

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

Table-11.7.1 (Channel Information JSON)


KEY VALUE COMMENT

248
RANGE TYPE
SingleInformation JSON show as follow Table-
channel_info JSON Object
11.7.2

Table-11.7.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-11.7.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-11.7.3(Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
ip_address Max length: 63byte string IP address/domain name
"Offline", IPC status
state string
"Online"
software_version Max length: 40byte string Firmware version
file_type Max length: 64 byte string Upgrade file extension

Table-11.7.4 (Request JSON)


KEY VALUE COMMENT
RANGE TYPE
password Max length: 16 byte string Verify the admin user password for secondary
authentication
channel_info JSON Object SingleInformation JSON show as follow Table-
11.7.5
base_secondary_aut Json Object Encryption auth,Table-12.7.2.4
hentication

Table-11.7.5 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-11.7.6
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object

249
… Json Object

Table-11.7.6(Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
reset_switch bool Restore default switch (this field is only used
when IPC is restored to default)
reboot_switch bool Restart switch (this field is only used when IPC
is restarted)
ImportExportSwitch bool Parameter export and import switch (this field is
only used for IPC parameter export and import)
param string Base64 (this field is only used when importing
parameters)

Table-11.7.7 (Set Successful Response JSON)


KEY VALUE COMMENT
RANGE TYPE
SingleInformation JSON show as follow Table-
channel_info JSON Object
11.7.8

Table-11.7.8 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-11.7.9
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-11.7.9 (Single Channel Information JSON)


COMMENT VALUE
RANGE TYPE
"Success", Status of IPC operations
state string
"Failed"
Base64 (this field is only used when exporting
param string
parameters)

Table-11.7.10 (IPC upgrade get token JSON)


KEY VALUE COMMENT
RANGE TYPE

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

Table-11.7.11(IPC upgrade get token JSON)


KEY VALUE COMMENT
RANGE TYPE
upgrade_token string Upgrade token

Table-11.7.12 (IPC upgrade JSON)


KEY VALUE COMMENT
RANGE TYPE
ChannelInfo Json array JSON show as follow Table-11.7.13

Table-11.7.13 (IPC upgrade JSON)


KEY VALUE COMMENT
RANGE TYPE
channel string channel number
result string upgrade result
reason string Upgrade error reason
error_code string The error code corresponding to the cause of the
upgrade error

Upgrade error code:


upgrading IPC equipment is being upgraded
ver_same The current version is already the latest version
connet_close Abnormal device connection
read_file_fail error reading file
ver_err Upgrade file mismatch
invalid_file The file is invalid, please upload a legal file
file_error Error creating file
not_exist The device is offline
failed Upgrade failed

Table-11.7.14 (Ftp IPC UpgradeRange Info JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_max int Maximum number of channels
ftp_auto_upgrade bool ftp automatic upgrade IPC switch
check_for_updates bool FTP automatic upgrade IPC prompt switch

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

Table-11.7.15 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
IP_CH1 Json Object JSON show as follow Table-11.7.16
… Json Object

Table-11.7.16(Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
sup_ftp_auto_upgrade bool Whether the channel supports FTP upgrade
ftp_ipc_new_ver bool Is there a new version

Table-11.7.17(Ftp IPC Upgrade Info JSON)


KEY VALUE COMMENT
RANGE TYPE
ftp_auto_upgrade bool ftp automatic upgrade IPC switch
check_for_updates bool FTP automatic upgrade IPC prompt switch
channel_info JSON Object SingleInformation JSON show as follow Table-
11.7.15

Table-11.7.18 (Ftp IPC Upgrade Set Info JSON)


KEY VALUE COMMENT
RANGE TYPE
ftp_auto_upgrade bool ftp automatic upgrade IPC switch
FTP automatic upgrade IPC prompt
check_for_updates bool
switch

Table-11.7.19 (Ftp IPC Upgrade Check Info JSON)


KEY VALUE COMMENT
RANGE TYPE
check_chns string array IPC to be detected

Table-11.7.20 (Ftp IPC Upgrade Info JSON)


KEY VALUE COMMENT
252
RANGE TYPE
upgrade_chns string array IPCs that need to be upgraded

Table-11.7.21 (Ftp IPC Upgrade result JSON)


KEY VALUE COMMENT
RANGE TYPE
cur_ipc string array IPC is currently being upgraded
upgrade_percent int FTP download IPC upgrade file progress
upgrade_state string FTP upgrade IPC status
upgrade_result string show as follow Table-11.7.22

Table-11.7.22(Ftp IPC Upgrade state JSON)


IPC_UPGRADE_FILE_DOWNLOADING download upgrade file
IPC_WAIT_FOT_UPGRADING The upgrade file download is complete, waiting for
the upgrade
IPC_UPGRADE_FILE_DOWNLOAD_FAILED Upgrade file download failed
IPC_UPGRADE_FINISH A single IPC upgrade is complete
IPC_UPGRADE_ALL_FINISH All IPC upgrades completed

Table-11.7.23(Ftp IPC Upgrade result JSON)


downloading The upgrade file is downloading
wait_for_upgrading The upgrade file download is complete, waiting
for the upgrade
download_failed Upgrade file download failed
success IPC upgrade successful
upgrading IPC equipment is being upgraded
ver_same The current version is already the latest version
connet_close Abnormal device connection
read_file_fail error reading file
invalid_file The file is invalid, please upload a legal file
ver_err Upgrade file mismatch
failed Upgrade failed
param_error Parameter error
file_too_long The upgrade file is too large
not_exist The device is offline
all_finish update completed

11.8 System Upgrade


GET
URL POST /API/Maintenance/SystemUpgrade/Token

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

Table-11.8.1 (System upgrade get token JSON)


KEY VALUE COMMENT
RANGE TYPE
secondary_authentic Max length: 16 byte string Verify the admin user password for secondary
ation authentication
file_name string upgrade file name
file_size int Upgrade file size
upgrade_head Int array 1KB of data before the upgrade file

Table-11.8.2 (System upgrade get token JSON)


KEY VALUE COMMENT
RANGE TYPE
upgrade_token string upgrade token
upgrade_timeout 0-3600 int Upgrade timed out

Table-11.8.3 (System upgrade check version)


KEY VALUE COMMENT
RANGE TYPE
FirewareVersion string software version
FirewarePack string package name

Upgrade error code:


in_user_interface in the user interface

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

11.9 Developer Mode


RANGE
URL POST /API/Maintenance/DeveloperMode/Range
Description Developer Mode
Request Body
Successful Response The successful result response that described in Table-11.9.1

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

Table-11.9.1 (Developer Mode JSON)


KEY VALUE COMMENT
RANGE TYPE
telnet_switch bool Telnet switch
export_disk_switch “Shut Off” string print log output
“Output To Terminal”
“Output To Disk”
enable_export bool Whether to display the export button
enable_delete bool Whether to show the delete button

Table-11.9.2 (Developer Mode JSON)


KEY VALUE COMMENT
RANGE TYPE
base_secondary_authentica Json Object Encryption auth,Table-12.7.2.4
tion

Table-11.9.3 (Developer Mode JSON)


KEY VALUE COMMENT
RANGE TYPE
x-download-token string

Table-11.9.4 (Developer Mode JSON)


KEY VALUE COMMENT
RANGE TYPE
x-download-token string
x-csrftoken string

Download implementation method:


1. Use /API/Maintenance/DeveloperMode/Token to obtain x-download-token, and its value is stored

256
in the header.
2. Send /API/Maintenance/DeveloperMode/Download with x-download-token and X-csrftoken to
download the file.

11.10 Device Shutdown


SET
URL POST /API/Maintenance/DeviceShutdown/Set
Description Shutdown the device immediately
Request Body Device Shutdown Information JSON (show as follow Table-11.10.1)
Successful Response The successful result response that described in 2.5

Table-11.10.1 (Device Reboot Information JSON)


KEY VALUE COMMENT
RANGE TYPE
base_secondary_authentica Json Object Encryption auth,Table-12.7.2.4
tion

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"
}

11.11 Http Upgrade


RANGE
URL POST /API/ Maintenance/AutoUpgrade/Range
Description Http Upgrade

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

Table-11.9.1 (Developer Mode JSON)


KEY VALUE COMMENT
RANGE TYPE
auto_buttons “Check” string Whether to display the Check button

11.12 Defogging Fan


GET
URL POST /API/Maintenance/DefoggingFan/Get
Description Get fan switch information
Request Body None
Successful Response Defogging Fan information JSON (show as follow Table-11.10)

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

Table-11.10(Defogging Fan Information JSON)


KEY VALUE COMMENT
RANGE TYPE
defogging_fan Defogging Fan switch
bool

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

bool Determine whether it is a wireless


wireless_dev device, wireless device true, wired
false
bool Support online channel auto-
support_top_online
completion function
bool Support digital channel auto-
support_digitchannel_autofill
completion function
string array Analog channels that have been
magic_channel
converted to digital channels
"gzip" string array API body compression, support gzip
accepted_compress_encodi
compression
support_partial_request Json Object API that supports paged data transfer

Table-12.1.3(channel info respond JSON)


KEY VALUE COMMENT
RANGE TYPE
Json array Single Channel Information JSON show
channel_param
as follow Table-12.1.4

Table-12.1.4(single channel JSON)


KEY VALUE COMMENT
RANGE TYPE
channel string
channel_name string
channel_alias string channel alias
videoloss bool video loss sign
“NotConfigured” string channel connection status
“Online”,
connect_status ”Offline”
“Sleep”
“NotPaired”
A01 Neutral string array
IPC、NVR/DVR
“FaceAlarm” “Fisheye”
“BehicleAlarm” “Binoculars”
“Fisheye” “Ptz”
ability “Binoculars” “NewPtz”
“FloodLight”, (NVR/DVR not
”AudioAlarm”, used)
“TalkHalf”, “HkPtz”
“TalkFull” “Iris”
“Speaker” “Mainstream”
267
"AlarmOutNum" “Substream”
"Loud" “Mobilestream”
“Ptz”, “FloodLight”
“NewPtz” “AudioAlarm”
“HkPtz” “AlarmOutNum”
“Iris” “TalkHalf”
"Mainstream" “TalkFull”
"Substream" “Color”
" Mobilestream " “RedBlueLight”
“NotAutoReconn
ect”
“Pir”
“Cover”
“Eventstream”
int Alarm input supported by IPC
alarm_in_num
channel
int Alarm output supported by IPC
alarm_out_num
channel
bool Control preview interface PTZ
show_ptz_setting setting button display (A01 not
used)
“CrossCount”
“HeatMap”
“SOD”
“LCD”
“PVD”
“FD”
intelligent_ability
“PID”
“CrowdDensity”
“LPD”
“RSD”
“QD”
“AttributeDetect”
"G711_A" The intercom audio format
"G726_16KBPS_ASF" supported by Ipc (if this field is
"G726_24KBPS_ASF" not passed, the default is g711a,
"G726_32KBPS_ASF" and if multiple fields are passed,
talk_audio_ability
"G726_40KBPS_ASF" the first one is used by default.
"AAC" Currently, only wireless models
are used, and subsequent dvr and
nvr can be reused if necessary)
int Wireless IPC power supply type,
wireless_ipc_type battery 1, long-term power
supply 2
268
Table-12.1.5(password request JSON)
KEY VALUE COMMENT
RANGE TYPE
password Max_length:16 string
base_enc_password Json Object Encrypted Password, Table-12.7.2.3
base_secondary_authen Json Object Encryption auth,Table-12.7.2.4
tication
support_recover_pwd bool Whether to support password recovery
settings

(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

/API/IPCMaintaint/IPC Json Object Single JSON show as follow Table-


Disk/Format 12.1.15

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)

Login failure return see Table-12.1.8


Table-12.1.7 error_code
error_code COMMENT

no_permission No remote login permission


login_failed_or_block Locked after five or more failed logins
black_ip This IP is set to blacklist
Incorrect username or password within five
verify_failed
times - login failed
device_reboot system is restarting

Table-12.1.8 (login failed json)


KEY VALUE COMMENT
RANGE TYPE
int Indicates the time at which the system
block_remain_time
will be locked for too many login errors

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

Table-12.1.4.1 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Support question and answer verification to
answer_flag bool
retrieve
email_flag bool Support email retrieval

certificate_flag bool Support certificate retrieval


super_pwd_flag bool Support super password
email 1-64 string Mail
questions Json array JSON show as follow Table-12.1.4.1.x
answers Json array JSON show as follow Table-12.1.4.1.y
"Answer", Only the selected password recovery method will
"Email", be displayed
mode "Certificate", string
"SuperPwd"

email_code 1-64 string email verification code


certificate 1-128 string certificate code
super_pwd 1-16 string Super password
system_time string date time
mac_address 0-35 string Mac address

Table-12.1.4.1.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
1 Json Object Questions corresponding to each verification
… Json Object
3 Json Object
… Json Object
5 Json Object
… Json Object

Table-12.1.4.1.y (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
274
1 string Answers to questions for 12.1.4.1.x
… string
3 string
… string
5 string
… string

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
}
}
}

2. /API/RecoverPassword/Get #get problem


questions
Response instance:
{
"result": "success",
"data": {
"questions": [
5,
4,
3
]
}
}

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
}
}
}

5. /API/RecoverPassword/Authorization/Get #Get verification methods and questions


example response:

278
{
"result": "success",
"data": {
"mode": "Answer",
"questions": [
5,
4,
3
]
}
}

6. /API/RecoverPassword/Authorization/Set #Verify each way


send example:
{
"data":{
"mode": "Answer",
"answers": ["111", "222", "333"],
"password": "admin123."
}
}

7. /API/RecoverPassword/Certificate/Export #export certificate


example response:
{
"result": "success",
"data": {
"certificate": "001612531125"
}
}

8. /API/RecoverPassword/Email/Send #send email

12.2 Get Device Page

12.2.1 Description

Get the layout information of the client interface.


Get
URL POST/API/Login/DevicePage/Get
Description Get the page list
279
Request Body none
Successful Response Login Information JSON (show as follow Table-12.2.1)

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

Stream related,page stm_


Mainstream stm_main
Substream stm_sub
Mobilestream stm_mob
Capture stm_capture

Recording related,page rec_


Record Parameters rec_param

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

Network related,page net_


General net_general
PPPoe net_pppoe
Wireless net_wireless
Port Configuration net_port_conf
DDNS net_ddns
Email net_email
Ip Filter net_ipFilter

Alarm related,page alarm_


IO alarm_io
Motion alarm_motion
Exception alarm_exception
PTZLinkage alarm_ptzLinkage
PIR alarm_pir
PID alarm_pid
LCD alarm_lcd
SOD alarm_sod
PD alarm_pd
FD alarm_fd
CC alarm_cc
Sound Detection alarm_sound_detection
Occlusion Detection alarm_occlusion_detection

Event related,page Event(IPC)


Setup subpage
Motion chn_motion
PIR chn_pir
FloodLight chn_floodlight
Sound Detection chn_sound_detection
Occlusion Detection chn_occlusion_detection
Voice Alarm alarm_voice
Alarm subpage
Motion alarm_motion
IO alarm_io
PIR alarm_pir
Sound Detection alarm_sound_detection
Occlusion Detection alarm_occlusion_detection

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

Storage related,page storage_


Disk storage_disk
Disk Group storage_diskGroup
Cloud storage_cloud
Ftp net_ftp

System related,page sys_


General sys_general
Date and Time sys_date_time
Output Configuration sys_output_conf
Multi-User sys_user
Upgrade sys_upgrade
IPC Upgrade sys_ipcUpgrade
284
IPC Load Default sys_ipcLoad_default
Reboot IPC sys_ipcAuto_reboot
Information sysInfo_base
Channel Information sysInfo_chn
Record Information sysInfo_rec
Network State sysInfo_net

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 Preview Control

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

Table-12.3.2.x (ChannelRequest JSON)


KEY VALUE COMMENT
RANGE TYPE
channel “CH1”…”CH1x” String
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…” WIFI_CH1x”

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"

0 - 255 int num number of common modes in


watch_mode_num
Watchmode (except line scans)
"low" string Speed of line scan in watch mode
watch_mode_num "middle"
"high"

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

12.3.3.1 requestpreset point data

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
"}}

12.3.3.2 requestcontrol ptz

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.5Download root certificate File(A01)

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"
}
}

12.5.3.2Download root certificate data

POST/ API/Login/CertFile HTTP/1.1


Accept: */*
Content-disposition: attachment; filename="root_cert.cer"

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 Account Rules

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

Table-12.6.2.1 (Information JSON)


KEY VALUE COMMENT
RANGE TYPE
username Object namig rule,Information JSON show as
follow Table-12.6.2.2
password Object Password rule,Information JSON show
as follow Table-12.6.2.2

Table-12.6.2.2 (Username/Password Information JSON)


KEY VALUE COMMENT
RANGE TYPE
303
min_length 1-8 int minimum length
max_length 16-16 int maximum length
character_combinations_ At least the number of character combinations
1-4 int
num
"ALPHA", Character combination list
"alpha",
character_combinations
"Alpha", array
"digit",
"special"
special string Special character
not_same_username bool Can be the same as the user name
The password cannot be set the same as in the
deny_password array
array

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 Request pubkey or randbyte

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

Table-12.7.2.1 (Information JSON)


KEY VALUE COMMENT
RANGE TYPE
type "base_salt", array The maximum length of the array is 5."
" base_x_public " base_salt", " base_x_public " Can request
more than one

Table-12.7.2.2 ((Information JSON)


KEY VALUE COMMENT
RANGE TYPE
JSON Salt and x_pubkey Information JSON show as
key_lists
array follow Table-12.7.2.3

Table-12.7.2.3 (Salt and x_pubkey Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"base_salt": PBKDF2_SHA256 Secondary
" base_salt ",
type string certification.
" base_x_public "
" base_x_public " Password transmission
The random number is hex string, which
needs to be converted. The public key is
key 0-1024 string
plaintext. Base64 transmission is
adopted.
iter 0-1000000 int Number of iterations of PBKDF2_SHA256
Each key corresponds to a seq, which
seq 0-1000000 int
must be passed in at the same time as

306
the encrypted data is transmitted

Table-12.7.2.3 (base_enc_password JSON)


KEY VALUE COMMENT
RANGE TYPE
Encrypted password value(Encryption using the
cipher 0-1024 string X25519 key derived by the 12.7.1 API), Use
base64 transfer
seq 0-1000000 int The seq returned using the 12.7.1 API
The X25519 public key encrypted by the client,
peer_key 0-1024 string
Use base64 transfer

Table-12.7.2.4 (base_secondary_authentication JSON)


KEY VALUE COMMENT
RANGE TYPE
Encrypted password value(Encryption using the
cipher 44 string key returned by the 12.7.1 API), Use base64
transfer。 PBKDF2 outlen=32, base64 is 44
seq 0-1000000 int The seq returned using the 12.7.1 API

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.

Scenarios Key type requested Algorithm API requesting

Secondary
base_salt PBKDF2_SHA256 /API/Maintenance/TransKey/Get
certification

First time to set /API/Login/TransKey/Get


base_x_public RSA
admin pasword /API/FirstLogin/Password/Set

Modify the /API/Maintenance/TransKey/Get


common user’s base_x_public RSA
initial password /API/Login/Password/Set

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

evp_pkey = (my_pri, my_pub) = generate_X25519_key;

key_1 = remove “0” from key;

device_peer_key = base64_decode(key_1);

secret = X25519_derive(device_peer_key, evp_pkey);

aes_256_gcm_key = hkdf_expand(secret, label = “expand key”, out_len = 16);

aes_256_gcm_iv = hkdf_expand(secret, label = “expand iv”, out_len = 12);

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 )

// tag_len = 16, key_len = 16, iv_len = 12

Below is the web page we provide to calculate cipher:

1. Calculate the cipher for secondary authentication cipher

pbkdf2.html

2.Calculate the cipher for the password encryption field

x25519.html

These pages are designed to help you determine whether the cipher calculation is correct

Instructions for using the gadget:

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)

Table-14.1.1 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON array
follow Table-14.1.2

Table-14.1.2 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel string Channel number
Snapshot resolution string Snapshot resolution
snapshot_resolution
at most 1920*1080
bool Reset session timeout,true by default
The fieldis valid only when
reset_session_timeout
preview/replay session timeout
option is turned on.

Table-14.1.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel string Channel number
Snapshot resolution string Snapshot resolution
snapshot_resolution
at most 1920*1080
img_time int UTC time
img_encodes “Base64” string Codec type
img_format “Jpeg” string Image type
img_data string Image data

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

Table-14.2.1 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
chn_no int
"Mainstream","Substr
stream_type string
eam","Mobilestream"

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.1(Mac info JSON)


KEY VALUE COMMENT
RANGE TYPE
mac_address string Client Mac

Table-14.3.2(ANR info JSON)


KEY VALUE COMMENT
RANGE TYPE
enable int ANR switch
device_flag string Client Mac

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

Table-14.4.1(ETR info JSON)


KEY VALUE COMMENT
RANGE TYPE
EventStreamState bool Event stream state

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

Optional, when there is no alarm list,


heat_alarm “HeatAlarm” string
output heartbeat alarm message
Dynamic display videoloss status
videoloss_status bool

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

Table-15.1.3 System alarm(Json)


VALUE COMMENT
KEY
RANGE TYPE
device_name Max_length:31 string Device name(optional)
hdd json see table15.1.4(optional)

Table-15.1.4 hdd alarm(Json)


VALUE COMMENT
KEY
RANGE TYPE
hdd_alarm_type “Ok”,”Error” string HDD alarm type
“Full” HDD error alarm info
“Bad”
hdd_alarm_info ”Unformat” string
“Readonly”
“Warning”,
316
“NoDisk”

Table-15.1.5 single channel alarm json


VALUE COMMENT
KEY
RANGE TYPE
channel string
motion_alarm bool (Optional)
Record flag(optional)
record_flag json
See Table-15.1.6
camera_connect_sta (optional)Table-15.1.7
json
tus
io_alarm bool (optional)
pir_alarm bool (optional)
low_power bool Low power(optional)
charge_power bool Power charging(optional)
channel_name string (optional+)
Floodlight_Audio (optional)Table-15.1.8
json
Alarm
ptz_alarm json (optional)Table-15.1.9
videoloss bool (optional)
Json (optional)Table-15.1.10
int_alarm
Object
Json (optional)Table-15.1.10
alarm_state
array
motion_smart_ala Json Table-15.1.13
rm Object
(NVR/DVR)see Table-15.1.14
alarm_out_state Json
Array
( Wireless only ) wireless IPC
wireless_ipc_type int
type,battery 1,DC power 2
(Wireless only)report the result of
remote pairing
Pair success
remote_pair_state Max_length:20 string
Pair fail
Timeout
Pair is not supported

Table-15.1.6record flag camera json


VALUE COMMENT
KEY
RANGE TYPE
Motion Alarm
m “R”“G” string
"R": alarm recording status "G": alarm

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.8 Floodlight param json


KEY VALUE COMMENT
RANGE TYPE
Floodlight real-tine switch
floodlight_switch true false bool
false: close true: open
flood_light_value 1 - 100 int Floodlight brightness
floodlight_value_rang Floodlight brightness range
1 - 100 Object
e
Audio real-time switch
audioAlarm_switch true false bool
false: close true: open
audioAlarm_value 1 - 10 int Audio value
audioAlarm_value_ra Audio value range
1 - 10 Object
nge

Table-15.1.9 ptz alarmjson


KEY VALUE COMMENT
RANGE TYPE
cur_zoom_value int Zoom current position (not in use yet)
0:1step 1:5steps 2:20steps(not
zoom_step 0-2 int
in use yet)
cur_focus_value int Focus current position(not in use yet)
focus_step 0-2 int 0:1 steps 1:5steps 2:20steps(not
319
in use yet)
0:focus finished,1:focusing(not in
auto_focus_state int
use yet)
shift_range int (not in use yet)
ptz_cruise_state bool Preset point cruise state
ptz_line_scan_state bool Line scan cruise state

Table-15.1.10 alarm param json


KEY VALUE COMMENT
RANGE TYPE
alarm_val true|false bool
video_tamper “video_tamper”:video cover detetion
sod “sod”:Objects lost or left detection
lcd “lcd”:line crossing detection
pid “pid”:Perimeter intruding detection
pd “pd”:Pedestrian detection
int_subtype string
fd “fd”:Face Detection
sound “sound”:Sound detection
avd “avd”:avd detection
pd_vd “pd_vd”:Person&Vehicle detection
cc “cc”:cross counting

Table-15.1.11 error_code
error_code COMMENT

readerID_invalid
position_invalid

Table-15.1.12 talkback_alarm json


KEY VALUE COMMENT
RANGE TYPE
channel 1 - 127 int Intercome channel
talkback_close true|false bool If close takback
Talkback closed reason
"localuser_operatin
localuser_operating_cannot_talkback:the
g_cannot_talkback"
error_code string user is setting interface
"localuser_close_ta
localuser_close_talkback:user close the
lkback"
talk back
Table-15.1.13 motion samrt alarm json
KEY VALUE COMMENT
RANGE TYPE
MDtime string “MM/DD/YYYYhh:mm:ss”
MDState string

320
array

Table-15.1.14 alarm_out_state alarm 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

15.1 event check instruction and demo


Event notification, using a circular query. That is, the client sends a query, the server replies, and the client
immediately inquires again.Attention:the client can query without interruption, or request after a while, but the
interval can not exceed 30s.
The server maintains a reader id , sequence,lap_number for each alarm link, no parameter is passed on the
first request, and the server sends the current state of the device and return reader_id. Each subsequent request
by the client uses the last return from the server (reader_id, sequence, lap_number) to request the alert status, if
there is no current alarm, the server will block for about 10s and return a heat_alarm heartbeat message.
f the server does not receive the next request for more than 30 seconds, the reader_id will be invalid,the server
returns an error, in which case the client remakes the first request.
For alarms such as motion_alarm, note that there are true and false values. When it is true, it means that there
is an alarm. When it is false, there is no alarm.

(1)First request guidence:


POST /API/Event/Check?2020-10-17%2014:21:33 HTTP/1.1

Content-Type: application/json; charset=UTF-8

Accept: application/json, text/javascript, */*; q=0.01

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}}

(2)Request again guidance:


POST /API/Event/Check?2020-10-17%2014:21:33 HTTP/1.1

Content-Type: application/json; charset=UTF-8

Accept: application/json, text/javascript, */*; q=0.01

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

15.2 Http listening


GET
URL POST /API/AlarmConfig/EventPush/Get
Description It is used to get the ALL ALARM config parameters
Request Body See Table -1.1.1.1
Successful Response Channel Information JSON (show as follow Table-1.1.1.4)

Table-1.1.1.1 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as follow
params Json Object
Table-1.1.1.2

Table-1.1.1.2 (rule_number Information JSON)


name string Channel name
Single Channel Information JSON show as follow
table Json Object
Table-1.1.1.3

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

15.2 Http listening push related instruction

15.2.1 Push alerts through Get

Push the alert event request


URL GET
/API/AlarmEvent/EventPush?EventType=xx&EventTime=xx&EventAction=xx&MACA
ddress=xx
Description It is used to get the ALL ALARM config parameters
Request Param See Table -1.1.1.10
Successful Response Channel Information JSON (show as follow Table-1.1.1.4)

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

15.2.2 Push alerts via POST

Push alerts event requests


URL POST /API/AlarmEvent/EventPush
Description It is used to get the ALL ALARM config parameters
Request Body See Table -1.1.1.4
Successful Response Channel Information JSON (show as follow Table-1.1.1.4)

Table-1.1.1.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
VideoMotion IPC event type
VideoBlind
SoundDetect
EventType SOD string
LCD
PID
PD_VD

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.5 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Pd&vd、PID、LCD Push data is shown in Table-
SnapedObjInfo t Json Object
1.1.1.6 below
PlateInfo Json Object LPD push data is shown in Table-1.1.1.7
FaceInfo Json Object FD push data is shown in Table-1.1.1.8

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

The client receives IPC data at the time of alarm:


POST /API/AlarmEvent/EventPush HTTP/1.1
Host: 172.16.8.63:123
Accept: */*
Content-Type: application/json;charset=UTF-8
Content-Length: 192

{"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"
}

Video tamper botification:


{
"EventType":"VideoBlind",
"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":
}
]
}
}

15.2.3 Http listening keep alive

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

Table-1.1.1.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
time string Obtain current seconds by time

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

Table16.2.1(Shared Cloud JSON)


KEY VALUE COMMENT
RANGE TYPE
enable bool Switch of public cloud
Switch the public cloud to
sync_time bool
synchronize system time on
qrcode_string Max length: 63 byte string Qr code for public cloud
server_address Max length: 127 byte string Server address of public cloud

16.3 Write Log (A01 specific)


Set
URL POST/API/Maintenance/Log/Set
Description write manual capture, manual record log to Device
Request Body Request JSON (show as follow Table-16.3.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

16.4 Cloud Upgrade(A01 only


GET
URL POST /API/Maintenance/CloudUpgrade/Check
Description Cloud upgrade detect
Request Body show as follow Table-16.4.1
Successful Response show as follow Table-16.4.2

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

Table-11.10.4 (Cloud Upgrade)


KEY VALUE COMMENT
RANGE TYPE
upgrade_state string Upgrading tus and error code (show as follow
Table-11.10.5)
upgrade_percent unsigned int Upgrading progress,only when upgrading or
rade_download,will show this field

Table-11.10.5 (Cloud Upgrade)


KEY VALUE CO
RANGE TYPE MM
ENT
upgrade_state upgrade_download /*downloading, do not disconnect the network*/
string
(error_cord) upgrade_upgrading /*upgrading,do not disconnect the network */

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

Table-16.4.2 (Cloud Upgrade)


KEY VALUE COMMENT
RANGE TYPE
need_upgrade bool If new version for upgrading
current_version string Current version
new_version string New version

Table-16.4.3 (Cloud Upgrade)


KEY VALUE COMMENT
RANGE TYPE
secondary_authentic string Verify admin user password for secondary
ation authentication

16.5 Develop Mode(A01 only)


334
GET
URL POST /API/Maintenance/DevelopMode/Get
Description It is used to get the develop parameters
Request Body none
Successful Response ( show as follow Table-16.5.1 )

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.

16.7 Zero Channel(B09 only )


336
GET
URL POST /API/SystemConfig/Zero/Get
Description Get System Zero Channel Information
Request Body none
Successful Response Zero Channel information JSON (show as follow Table-16.7.1)

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

Table-16.7.1 (Zero Channel information JSON)


VALUE COMMENT
KEY
RANGE TYPE
zero_chn_enable bool Zero Channel enable flag
bitrate_mode " General " string Birate mode
fps int frame
32, 48, 64, 80, 96, 128, 160, 192, birate
224, 256, 320, 384, 448, 512, 640,
birate 768, 896, 1024, 1280, 1536, 1792, int
2048, 4096, 5120, 6144, 8192,
10240, 12288, 3072
" 1*1 "," 2*2 "," 1+5"," 1+7 ", splitmode
splitmode string
" 3*3"," 4*4"
" 0"," 5"," 10"," 20"," 60"," 120", Dwell time
dwell_time string
" 300"
Each array bit represents a channel
zero_chn_list 1-255 int array
with a int
“NONE,CH1”…”CH1x” Each array bit represents a channel
“NONE,IP_CH1”…” with a string
IP_CH1x”
“NONE,WIFI_CH1”…”
channel_name string array
WIFI_CH1x”

The number of channels depends


on the capabilities of the device.
“CH1”…”CH1x” Each array bit represents a channel
“IP_CH1”…” IP_CH1x” with a string
default_chn_name “WIFI_CH1”…” WIFI_CH1x” string array

The number of channels depends

337
on the capabilities of the device.

16.8 Zero Channel State(B09 only)


GET
URL POST /API/ PreviewChannel/ZeroChnState/Get
Description Get PreviewChannel Zero Channel State Information
Request Body none
Successful Response Zero Channel State information JSON (show as follow Table-16.8.1)

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

Table-16.8.1 (Zero Channel information JSON)


VALUE COMMENT
KEY
RANGE TYPE
chn_list int array Channel list
split_mode int Split mode
preview_mode int Previde mode
encode_ch int Ecode channel

16.9 Serail(B09 only)


GET
URL POST /API/SystemConfig/ Serail/Get
Description Get System Serail Information
Request Body none
Successful Response Serail information JSON (show as follow Table-16.9.1)

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

Table-16.9.1 (Zero Channel information JSON)


VALUE COMMENT
KEY
RANGE TYPE
protocol “RS485”,“RS232” string Protocol type
338
“1200”,“2400”, birate
baudrate string
“4800”“9600”
data_bit “5”,“6”,“7”,“8” string Data bit
stop_bit “1”,“2” string Stop bit
“None”,“Odd”, verify
parity “Even”, string
“Mark”,“Space”
“None”,“Software”, Flow control
flow_control string
“Hardware”

16.10 Force I Frame


SET
URL POST/API/ForceIFrame/Set
Description Set the channel force I frame
Request Body Channel Information JSON (show as follow Table-16.10.2)
Successful Response The successful result response that described in 2.5

Table-16.10.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”

The number of channels depends


on the capabilities of the device.

Table-16.10.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow Table-
channel_info JSON object
16.10.x

Table-16.10.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-16.10.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

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

Table-17.1.1.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.

Table-17.1.1.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as follow
channel_info JSON object
Table-17.1.1.x
page_type “ChannelConfig”, string Data used to distinguish between the channel
“AlarmConfig” configuration page and the alarm configuration
page
channel_max int Chanel number at most

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

Table-17.1.1.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"Offline","Online", Channel online status, for digital channels only
status string
“Nonsupport” Note:No this field when the channel is online
“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,null:disable

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

"FrontalView" Customize JSON show as follow Table-17.1.1.5


"MultiAngle"
apply_mode string
"Customize"

min_pixel 32-1080 int minimum pixel


max_pixel 320-1080 int Maximal pixel
face_enhance true, false bool face_enhance switch
342
face_attribute bool face_attribute switch
"StaticMode" Detection mode
detection_mode "MotionMode" string

0 no line Whether the preview and playback will be


iva_lines int
1with line underlined
Information JSON show as follow Table-
rule_info Object
17.1.1.6

Table-17.1.1.4 (snap interval mode Information JSON)


"1" Snap number
"2"
snap_num string
"3"
"Unlimited"
snap_frequency int Snap interval,unit s/pic

Table-17.1.1.5 (apply_mode Information JSON)


roll_range 0-180 int The following default value fields are
only available in Range:
"default_value_frontal": frontal
"default_value_multi":multi
pitch_range 0-180 int The following default value fields are
only available in Range:
:
"default_value_frontal": frontal
"default_value_multi":multi
yaw_range 0-180 int The following default value fields are
only available in Range:
:
"default_value_frontal": frontal
"default_value_multi":multi
picture_quality 0-100 int he following default value fields are only
available in Range:
"default_value_frontal": frontal
"default_value_multi":multi

Table-17.1.1.6 (rule_info Information JSON)


Number rule :1,Information JSON show as
rule_number1 Object
follow Table-17.1.1.7

Table-17.1.1.7 (rule_number Information JSON)


343
"A->B" Rule type
rule_type string
"B->A"
"Rect" Rule kind
rule_kind "Line" string

"FullScreen" Detection range


detection_range "Customize" string

rectangle,Information JSON show as follow


rule_rect Object
Table-17.1.1.8
unrdeline,Information JSON show as follow
rule_line Object
Table-17.1.1.9

Table-17.1.1.8 (Channel Information JSON)


x1 0-704 short x1 coordinate point
y1 0-576 short y1 coordinate point
x2 0-704 short x2 coordinate point
y2 0-576 short y2 coordinate point
x3 0-704 short x3 coordinate point
y3 0-576 short y3 coordinate point
x4 0-704 short x4 coordinate point
y4 0-576 short y4 coordinate point

Table-17.1.1.9 (rule_line Information JSON)


x1 0-704 short x1 coordinate point
y1 0-576 short y1 coordinate point
x2 0-704 short x2 coordinate point
y2 0-576 short y2 coordinate point

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
}

17.1.2 Human & Vehicle Detection

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)

Successful Response The successful result response that described in 2.5


Error_Code Response Error Information JSON (show as follow Table-17.1.2.8)
(cloud_video_upload_chn_limit returned information attached to the error
code)

Table-17.1.2.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string Data used to distinguish between the
“AlarmConfig” channel configuration page and the alarm
configuration page

Table-17.1.2.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON object
follow Table-17.1.2.x
page_type “ChannelConfig”, string Data used to distinguish between the channel
“AarmConfig” configuration page and the alarm configuration
page,Set need only

346
channel_max int Maximal channel number

Table-17.1.2.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-17.1.2.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-17.1.2.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, for digital
"Offline","Online",
status string channels only
“Nonsupport”
Note:no this field when channel on line.
“Local->1”… Alarm out 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,null:disable

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

min_pixel 64-1080 int Minimum pixel


max_pixel 320-1080 int Maximal pixel
"Off" Detection type,PD&VD(normal detection type)
"Pedestrian"
detection_type string
"Vehicle"
"Pedestrian &Vehicle"
“Pedestrian” Detection type,PD&VD, Motor Vehicle(Non-
"Motor Vehicle" motorized Vehicle)
detection_type array
"Non-motorized
Vehicle"
0 no line If with line in preview and playback
iva_lines int
1 with line
Information JSON show as follow Table-
rule_info Object
17.1.2.5

Table-17.1.2.4 (snap interval mode Information JSON)


"1" Snap number
"2"
snap_num string
"3"
"Unlimited"
snap_frequency int Snap interval,Unit s/pic

Table-17.1.2.5 (rule_info Information JSON)


Rule number 1,Information JSON show as
rule_number1 Object
follow Table-17.1.2.6

348
Table-17.1.2.6 (rule_number Information JSON)
"FullScreen" Detection range
detection_range "Customize" string

/* Each channel represents up to four rules with


rule_switch true, false bool
one byte, 0 -off, 1 -used */(IPC G1 only)
/* Each channel is represented by one byte for
rule_type "Normal" string up to 4 -regular type, 0 -regular mode, and 1 -
guest mode/other mode */(IPC G1 only)
rectangle,Information JSON show as follow
rule_rect Object
Table-17.1.2.7

Table-17.1.2.7 (Channel Information JSON)


x1 0-704 short x1 coordinate point
y1 0-576 short y1 coordinate point
x2 0-704 short x2 coordinate point
y2 0-576 short y2 coordinate point
x3 0-704 short x3 coordinate point
y3 0-576 short y3 coordinate point
x4 0-704 short x4 coordinate point
y4 0-576 short y4 coordinate point
Table-17.1.2.8(Error Information JSON)
KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH Channel number of cloud video uploads enabled
array
d N_NUM
max_cloud_video_u MAX_CLOUD_VID Cloud video upload supports the
int
pload_num EO_RECORD_NUM maximum number of open channel

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
}
}
}
}

17.1.3 Perimeter Intrusion Detection

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)

Table-17.1.3.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string To distinguish the data whether from a
“AlarmConfig” channel configuration page or an alarm
configuration page

Table-17.1.3.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as following
channel_info JSON object
Table-17.1.3.x
page_type “ChannelConfig”, string To distinguish the data whether from a channel
“AarmConfig” configuration page or an alarm configuration
page,Requested only in Setting
channel_max int Maximum number of channels

Table-17.1.3.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as following Table-17.1.3.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-17.1.3.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
status "Offline","Online" string Channel online status, only for digital

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

Table-17.3.4 (rule_info Information JSON)


Rule number 1,Information JSON show as
rule_number1 Object
following Table-17.1.3.5
Rule number 2,Information JSON show as
rule_number2 Object
following Table-17.1.3.5
Rule number 3,Information JSON show as
rule_number3 Object
following Table-17.1.3.5
Rule number 4,Information JSON show as
rule_number4 Object
following Table-17.1.3.5

Table-17.3.5 (rule_number Information JSON)


rule_switch bool Rule switch
"A->B", Rule direction
rule_type "B->A", string
"A<-->B"
rectangle, Information JSON show as following
rule_rect Object
Table-17.1.3.6

Table-17.1.3.6 (Channel Information JSON)


x1 0-704 short x1 coordinates
y1 0-576 short y1 coordinates
x2 0-704 short x2 coordinates
y2 0-576 short y2 coordinates
x3 0-704 short x3 coordinates
y3 0-576 short y3 coordinates
x4 0-704 short x4 coordinates
y4 0-576 short y4 coordinates

Table-17.1.3.7(Error Information JSON)


KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH The channel numbers that has enabled cloud
array
d N_NUM video upload function
max_cloud_video_u MAX_CLOUD_VID int The maximum number of channels supported by

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
}
}
}
}
}

17.1.4 Line Crossing Detection

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))

Table-17.1.4.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string To distinguish the data whether from a
“AlarmConfig” channel configuration page or an alarm
configuration page

Table-17.1.4.2 (Channel Information JSON)


KEY VALUE COMMENT
357
RANGE TYPE
Channel Information JSON show as following
channel_info JSON object
Table-17.1.4.x
page_type “ChannelConfig”, string To distinguish the data whether from a channel
“AarmConfig” configuration page or an alarm configuration
page, requested only in Setting
channel_max int Maximum number of channels

Table-17.1.4.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as following Table-17.1.4.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-17.1.4.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"Offline","Online", Channel online status, only for digital channels.
status string
“Nonsupport” Note: no such strings when the channel is online
“Local->1”… Alarm output channel
”Local->x” Each array bit represents aalarm output channel
“IP_CH1->1”… with a string.
“IP_CH1->2”… Camera:
” IP_CHx->1” Local->1: Enable, null value: Disable
alarm_out ” IP_CHx->2” array

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

Table-17.1.4.4 (rule_info Information JSON)


Rule number 1,Information JSON show as
rule_number1 Object
following Table-17.1.4.5
Rule number 2,Information JSON show as
rule_number2 Object
following Table-17.1.4.5
Rule number 3,Information JSON show as
rule_number3 Object
following Table-17.1.4.5
Rule number 4,Information JSON show as
rule_number4 Object
following Table-17.1.4.5

Table-17.1.4.5 (rule_number Information JSON)


rule_switch bool Rule switch
"A->B", rule direction
rule_type "B->A", string
"A<-->B"
rule_line Object Each channel has maximum 64 point

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

Table-17.1.4.6 (rule_line Information JSON)


x1 0-704 short x1 coordinates
y1 0-576 short y1 coordinates
x2 0-704 short x2 coordinates
y2 0-576 short y2 coordinates
Table-17.1.4.7(Error Information JSON)
KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH The channel numbers that has enabled cloud
array
d N_NUM video upload function
max_cloud_video_u MAX_CLOUD_VID The maximum number of channels supported by
int
pload_num EO_RECORD_NUM cloud video upload

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
}
}
}
}
}

17.1.5 Cross Counting

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)

Table -17.1.5.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string To distinguish the data whether from a
“AlarmConfig” channel configuration page or an alarm
configuration page

Table -17.1.5.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_info JSON array Single Channel Information JSON show as
362
following Table-17.1.5.3
page_type “ChannelConfig”, string To distinguish the data whether from a channel
“AarmConfig” configuration page or an alarm configuration
page,Requested only in Setting
channel_max int Maximum number of channels

Table-17.1.5.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as following Table-17.1.5.4
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-17.1.5.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"Offline","Online", Channel online status, only for digital channels.
status string
“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 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

Table-17.1.5.5 (rule_info Information JSON)


Rule number 1,Information JSON show as
rule_number1 Object
following Table-17.1.5.6

Table-17.1.5.6 (rule_number Information JSON)


rule_switch bool Rule switch
"A->B", Rule direction
rule_type string
"B->A",
rule_line Object rectangle, Information JSON show as following

364
Table-17.1.5.7
rectangle, Information JSON show as following
rule_rect Object
Table-17.1.5.8

Table-17.1.5.7 (Channel Information JSON)


x1 0-704 short x1 coordinates
y1 0-576 short y1 coordinates
x2 0-704 short x2 coordinates
y2 0-576 short y2 coordinates
Table-17.1.5.8 (Channel Information JSON)
x1 0-704 short x1 coordinates(left
vertex x-axis coordinates)
y1 0-576 short y1 coordinates(left
vertex y-axis coordinates)
x2 0-704 short x2 coordinates(right
vertex x-axis coordinates)
y2 0-576 short y2 coordinates(right
vertex y-axis coordinates)
X3 0-704 short X3 coordinates(left
buttom x-axis coordinates)
Y3 0-576 short Y3 coordinates(left
buttom x-axis coordinates)
X4 0-704 short X4 coordinates(right
buttom x-axis coordinates)
Y4 0-576 short Y4 coordinates(right
buttom x-axis coordinates)

Table-17.1.5.9(Error Information JSON)


KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH The channel numbers that has enabled cloud
array
d N_NUM video upload function
max_cloud_video_u MAX_CLOUD_VID The maximum number of channels supported by
int
pload_num EO_RECORD_NUM cloud video upload

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
}
}
}
}
}
}
}

17.1.6 Heat Map

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

Table -17.1.6.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.

Table -17.1.6.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON array
following Table-17.1.6.3
channel_max int Maximum number of channels

Table-17.1.6.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as following Table-17.1.6.4
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-17.1.6.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"Offline","Online", Channel online status, only for digital channels.
status string
“Nonsupport” Note: no such strings when the channel is online
switch,false: close
switch true, false bool
true: open
Object Information JSON show as following
rule_info
Table-17.1.6.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

Table-17.5.1.6 (rule_number Information JSON)


rule_switch bool Rule switch
rectangle, Information JSON show as following
rule_rect Object
Table-17.1.6.7

Table-17.1.6.7 (Channel Information JSON)


x1 0-704 short x1 coordinates
y1 0-576 short y1 coordinates
x2 0-704 short x2 coordinates
y2 0-576 short y2 coordinates
x3 0-704 short x3 coordinates
y3 0-576 short y3 coordinates
x4 0-704 short x4 coordinates
y4 0-576 short y4 coordinates

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
}
}
}
}
}
}
}

17.1.7 Stationary Object Detection

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)

Table-17.1.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” DVR/NVR need;
IPC no need CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string To distinguish the data whether from a

369
“AlarmConfig” channel configuration page or an alarm
configuration page

Table-17.1.7.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as following
channel_info JSON object
Table-17.1.7.x
page_type “ChannelConfig”, string To distinguish the data whether from a channel
“AarmConfig” configuration page or an alarm configuration
page,Requested only in Setting
channel_max int Maximum number of channels
Whether the page supports copy(NVR/DVR
support_copy bool
only)

Table-17.1.7.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as following Table-17.1.7.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-17.1.7.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"Offline","Online", Channel online status, only for digital channels.
status string
“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.

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

min_pixel 64-1080 int Minimum pixel value


max_pixel 320-1080 int Maximum pixel value
"Pedestrian" Detection type, human and vehicle
"Vehicle"
detection_type string
"Pedestrian
&Vehicle"
"StaticMode" Detection mode
detection_mode "MotionMode" string

"FullScreen" Detection range


detection_range "Customize" string

JSON Single Channel Information JSON show as


rule_info
array following Table-17.1.7.4
0 not draw lines Whether the preview and playback will
iva_lines int
1 draw lines appear the lines
371
string the sign of support channel copy(NVR/DVR
copy_ch "digit""analog""wifi"
only)

Table-17.1.7.4 (rule_info Information JSON)


Rule number 1, Information JSON show as
rule_number1 Object
following Table-17.1.7.5
Rule number 2, Information JSON show as
rule_number2 Object
following Table-17.1.7.5
Rule number 3,Information JSON show as
rule_number3 Object
following Table-17.1.7.5
Rule number 4,Information JSON show as
rule_number4 Object
following Table-17.1.7.5

Table-7.11.5 (rule_number Information JSON)


Each channel has maximum 64 point
coordinates, that is 32 lines. If it is
an accompanying line, only the first
line is used.
rule_rect Object
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.7.6
rule_switch bool Rule switch
“Legacy” Rule type
rule_type “Lost” string
“Lost &Legacy”

Table-17.1.7.6 (rule_line Information JSON)


x1 0-704 short x1 coordinates
y1 0-576 short y1 coordinates
x2 0-704 short x2 coordinates
y2 0-576 short y2 coordinates
x3 0-704 short x3 coordinates
y3 0-576 short y3 coordinates
x4 0-704 short x4 coordinates
y4 0-576 short y4 coordinates
Table-17.1.7.7(Error Information JSON)
KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH The channel numbers that has enabled cloud
array
d N_NUM video upload function
max_cloud_video_u MAX_CLOUD_VID The maximum number of channels supported by
int
pload_num EO_RECORD_NUM cloud video upload

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
}
}
}
}
}

17.1.8 Crowd Density Detection

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

Table-17.1.8.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.

Table-17.1.8.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as following
channel_info JSON object
Table-17.1.8.x
page_type “ChannelConfig”, string To distinguish the data whether from a channel
“AlarmConfig” configuration page or an alarm configuration
page
channel_max int Maximum number of channels

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

Table-17.1.8.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital
"Offline","Online"
channels.
status , string
Note: no such strings when the channel is
“Nonsupport”
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.
"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

Table-17.1.8.4 (rule_info Information JSON)


Rule number 1,Information JSON show as
rule_number1 Object
following Table-17.1.8.5
Rule number 2,Information JSON show as
rule_number2 Object
following Table-17.1.8.5
Rule number 3,Information JSON show as
rule_number3 Object
following Table-17.1.8.5
Rule number 4,Information JSON show as
rule_number4 Object
following Table-17.1.8.5

Table-17.1.8.5 (rule_number Information JSON)


rule_switch bool Rule switch
Octagon, Information JSON show as following
rule_rect Object
Table-17.1.8.6

Table-17.1.8.6 (Channel Information JSON)


x1 0-704 short x1 coordinates
y1 0-576 short y1 coordinates
x2 0-704 short x2 coordinates
y2 0-576 short y2 coordinates
x3 0-704 short x3 coordinates
y3 0-576 short y3 coordinates
x4 0-704 short x4 coordinates
y4 0-576 short y4 coordinates
x5 0-704 short x5 coordinates
y5 0-576 short y5 coordinates
x6 0-704 short x6 coordinates
y6 0-576 short y6 coordinates
x7 0-704 short x7 coordinates
y7 0-576 short y7 coordinates
x8 0-704 short x8 coordinates

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
}
}}
}}}
}

17.1.9 Queue Lenght Detection

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

Table-17.1.9.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.

Table-17.1.9.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as following
channel_info JSON object
Table-17.1.9.x
page_type “ChannelConfig”, string To distinguish the data whether from a channel
“AlarmConfig” configuration page or an alarm configuration
page
channel_max int Maximum number of channels

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

Table-17.1.9.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital
"Offline","Online"
channels.
status , string
Note: no such strings when the channel is
“Nonsupport”
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.
"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

Table-17.1.9.4 (rule_info Information JSON)


Rule number 1,Information JSON show as
rule_number1 Object
following Table-17.1.9.5
Rule number 2,Information JSON show as
rule_number2 Object
following Table-17.1.9.5
Rule number 3,Information JSON show as
rule_number3 Object
following Table-17.1.9.5
Rule number 4,Information JSON show as
rule_number4 Object
following Table-17.1.9.5

Table-17.1.9.5 (rule_number Information JSON)


rule_switch bool Rule switch
Octagon, Information JSON show as following
rule_rect Object
Table-17.1.9.6

Table-17.1.9.6 (Channel Information JSON)


x1 0-704 short x1 coordinates
y1 0-576 short y1 coordinates
x2 0-704 short x2 coordinates
y2 0-576 short y2 coordinates
x3 0-704 short x3 coordinates
y3 0-576 short y3 coordinates
x4 0-704 short x4 coordinates
y4 0-576 short y4 coordinates
x5 0-704 short x5 coordinates
y5 0-576 short y5 coordinates
x6 0-704 short x6 coordinates
y6 0-576 short y6 coordinates
x7 0-704 short x7 coordinates

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
}
}}
}}}
}

17.1.10 License Plate Detection

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

Table-17.1.10.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string To distinguish the data whether from a
“AlarmConfig” channel configuration page or an alarm
configuration page

Table-17.1.10.2 (Channel Information JSON)


383
KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON object
following Table-17.1.10.x
page_type “ChannelConfig”, string To distinguish the data whether from a channel
“AarmConfig” configuration page or an alarm configuration
page,Requested only in Setting
channel_max int Maximum number of channels

Table-17.1.10.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as following Table-17.1.10.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-17.1.10.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital
"Offline","Online"
channels.
status , string
Note: no such strings when the channel is
“Nonsupport”
online
“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 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
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

min_pixel 64-1080 int Minimum pixel value


max_pixel 320-1080 int Maximum pixel value
"StaticMode" Detection mode
detection_mode "MotionMode" string

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

Table-17.1.10.4 (snap interval mode Information JSON)


"1" Screenshot quantity
"2"
snap_num string
"3"
"Unlimited"
snap_frequency int Screenshot interval, unit s/pic

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

Table-17.1.10.6 (rule_number Information JSON)


"FullScreen" Detection range
detection_range "Customize" string

rectangle, Information JSON show as following


rule_rect Object
Table-17.1.10.7

Table-17.1.10.7 (Channel Information JSON)


x1 0-704 short x1 coordinates
y1 0-576 short y1 coordinates
x2 0-704 short x2 coordinates
y2 0-576 short y2 coordinates
x3 0-704 short x3 coordinates
y3 0-576 short y3 coordinates
x4 0-704 short x4 coordinates
y4 0-576 short y4 coordinates
Table-17.1.10.8(Error Information JSON)
KEY VALUE COMMENT
RANGE TYPE
cloud_video_is_use 0~MAX_PARA_CH The channel numbers that has enabled cloud
array
d N_NUM video upload function
max_cloud_video_u MAX_CLOUD_VID The maximum number of channels supported by
int
pload_num EO_RECORD_NUM cloud video upload

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
}
}
}
}

17.1.11 Rare Sound Detection

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

Table-17.1.10.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.
page_type “ChannelConfig”, string To distinguish the data whether from a
“AlarmConfig” channel configuration page or an alarm
configuration page

Table-17.1.10.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON object
following Table-17.1.2.x
page_type “ChannelConfig”, string To distinguish the data whether from a channel
“AarmConfig” configuration page or an alarm configuration
page,Requested only in Setting
channel_max int Maximum number of channels

Table-17.1.10.x (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as following Table-17.1.10.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-17.1.10.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"Offline","Online", Channel online status, only for digital channels.
status string
“Nonsupport” Note: no such strings when the channel is online

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
}
}
}
}

17.1.12 AI Func Schedule

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.1 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel Information JSON show as following
channel_info JSON object
Table-17.1.12.2

Table-17.1.12.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as following Table-17.1.12.3
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-17.1.12.3 (Single Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CategoryJSON show as following Table-
category JSON array
17.1.12.4
AI_Schedule bool AI function schedule switch

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”

"fd", AI type that is mutually exclusive with schedule_type


"pvd", Note: The actual mutex type is different according to
"pid", the device capability
"lcd",
"sod",
"cc",
mutex_type string
"cd",
"qd",
"lpd",
"hm",
“rsd”

week JSON array WeekJSON show as following Table-17.1.12.5

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

17.2.1 Model Configuratuon

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

Table-17.2.1.1 (Model Configuration JSON)


KEY VALUE COMMENT
RANGE TYPE
auto_select_enable bool Whether the model is automatically selected
Model Configuration JSON(show as following
rows JSON array
Table-17.2.1.2 )

Table17.2.1.2(Model Configuration JSON)


KEY VALUE COMMENT
RANGE TYPE
“local” “CH1”…”CH1x” Local model or Frontend model
channel The number of channels depends on the string sign
capabilities of the device.
Face recognition model version
face_recognition string
display
Face detection model version
face_detection string
display
Facial recognition model
enable_face_recognition True false bool
enable switch
Example:
Request message:
POST /API/AI/Model/Get HTTP/1.1
{
"version": "1.0"
}

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)

Table-17.2.2.1 (Get Face Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null Moot
the detection type combination of the group to
get, for example: 1-Face , 2-Car, 3-
TypeFlags int
Human&Vehicle (0x1 << DLDT_Face | 0x1 <<
DLDT_Car), Currently only supports faces
Get the default alarm parameter or the actual
DefaultVal int
alarm parameter, 1-default value, 0-actual value
Whether to include internal groups. Internal
groups are not open to users and are only used to
WithInternal int store common faces. When the client wants to
obtain the list of common faces, the internal
group Id should be used
Whether to obtain brief information or complete
information, and the brief information only
includes the Group name、Id、DetectType、
SimpleInfo int
Policy、Enabled、CanDel、Similarity, the full
information contains all parameters of the group.
1-Get brief information, 0-Complete information
Get the configuration information of the
GroupsId [1,2,3….x] array corresponding group, if it is empty or the field
does not exist, it means just get all

Table-17.2.2.3 (Add Face Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Add Face Group JSON show as following Table-
Group array
17.2.2.4

Table-17.2.2.4 (Add Face Group JSON)


KEY VALUE COMMENT
RANGE TYPE
399
MsgId null
Id int Face group ID, no need given when adding
Name string Face group Name, no need given when adding
Detection type, To add a face group, just specify
DetectType 0 int the DetectType field,0 - DLDT_Face Face,1 -
DLDT_Car Car

Table17.2.2.2(Face Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Request return result, See
Result 0,-1,-2,….-23, -24 int Table-17.x.x, this field is not
required for Modify
channel_max int Maximum number of channels
Count 1-16 int Group number, used in get
Face Group, Face Group
Group JSON array Information JSON show as
following Table-17.2.2.5

Table-17.2.2.5 (Face Group Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Id int Face group ID
" Allow List" Face group Name, group name can be customized
name " Block List " string
…...
DetectType 0,1 int Detection type 0: face 1: car

Policy attributes, 0-Allow List, 1-Block List, 2-


Stranger, 3-Internal (Internal is only used to store
Policy 0-4 int
the most recent faces for comparison, not for
alarm and other functions), 4-Advance
Enabled 0,1 int Face alarm enable 0: off 1: on
The predefined group cannot be deleted and is
CanDel int identified by the "CanDel" field, and 0 cannot be
deleted
unsigned Similarity
Similarity 0-100
int
Group alarm policy configuration, fixed to 2
elements, the 0th element is used for the common
JSON
PolicyConfigs group, the 0th element corresponds to Allow in
array
the advanced group, and the 1st element
corresponds to Deny. PolicyConfigs JSON show
400
as following Table-17.2.2.6
Control which channels the corresponding group
is allowed to alarm on, and use it according to the
EnableChnAlarm [255, 255, 255, 255] array
bit position, and the bit position indicates that the
corresponding channel allows the alarm
Alarm output association. Information JSON
AlarmOut Object
show as following Table-17.2.2.10

Table-17.2.2.6 (PolicyConfigs JSON)


KEY VALUE COMMENT
RANGE TYPE
[ [255, 255, 0, 255], Each element represents the alarm output
[255, 255, 0, 255], associated with a channel,
[255, 255, 0, 255] ], A total of 3 main elements, the 0th represents the
... local alarm output, the 1/2 represents the front-
ChnAlarmOut array
[ [255, 255, 0, 255], end alarm output 0/1, and each bit of the sub-
[255, 255, 0, 255], element represents whether the alarm output of
[255, 255,0,255] ] the channel is associated

Each element represents the buzzer configuration


[0, 1, 1, 2, 3, 4, 0, 1, 1,
ChnBuzzerOpt array of a channel, 0-disable, 1-10s, 2-20s, 3-40s, 4-60s
3, 2, 2 …]

Each element represents the alarm output


[0, 1, 1, 2, 3, 4, 0, 1, 1,
LatchTimeOpt array duration of a channel, 0-0s, 1-1s, 2-2s, 3-3s, 4-
3, 2, 2 …]
5s, 5-10s, 6-20s, 7- 40s, 8-60s
Each element represents whether a channel saves
the image configuration, and the use of bits in
SaveImg [255, 255, 255, 255…] array
each element represents whether to save the face
and background
Use by bit, each bit represents whether a channel
SendEmail [0, 0, 0, 0] array
sends mail, 0-not send, 1-send
Use by bits, each bit represents whether a channel
UploadToFtp [255, 255, 255, 255] array
uploads FTP
Use by bit, each bit represents whether a channel
UploadToCloud [0, 0, 0, 0] array
uploads Cloud, 0-not upload, 1-upload
Use by bit, each bit represents a channel is a
ShowThumbnail [255, 255, 255, 255] array
thumbnail display
Use by bit, each bit represents that a channel is
Record [255, 255, 255, 255] array
video
Use by bit, each bit represents whether a channel
Push [0, 0, 0, 0] array
sends a push, 0-no push, 1-push
AlarmSchedule [[255, 255, 255, 255, array Alarm schedule, each bit represents half an hour,

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.7 (Remove Face Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
RemoveFace Group JSON show as following
Group 0-16 array
Table-17.2.2.8

Table-17.2.2.8 (Remove Face Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Delete the face group ID, the pre-defined group
Id int
cannot be deleted

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

Table-17.2.2.11 (IPC JSON)


KEY VALUE COMMENT

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

Table-17.2.2.12 (Get Face Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null Moot
The combination of detection types of the group
to be obtained, such as: 1-face, 2-car, 3-person-
TypeFlags int
vehicle (0x1 << DLDT_Face | 0x1 <<
DLDT_Car), currently only supports faces
Get the default alarm value or the actual alarm
DefaultVal int
value, 1-default value, 0-actual value
Whether to include internal groups. Internal
groups are not open to users and are only used to
WithInternal int store common faces. When the client wants to
obtain the list of common faces, the internal
group Id should be used
Whether to obtain brief information or complete
information. The brief information only includes
Group Name, Id, DetectType, Policy, Enabled,
SimpleInfo int
CanDel, and Similarity, and the complete
information includes all parameters of the group.
1-Get brief information, 0-Complete information

Table17.2.2.13(Face Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId Nul Moot
Please refer to Table-17.x.x for
the result returned by the
Result 0,-1,-2,….-23, -24 int
request. This field is not
required when modifying
GroupsId [1,2,3…x] array The obtained group ID

Table-17.2.2.x(Error Information 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
403
channel_max int Maximum number of channels
Count int
Group 0-16 array

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.

Table-17.2.3.3 ( Faces JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Modify the number of face groups in which the
Count int belongs face group or delete the number of face
groups
The Id of the face group to be moved to, this field
Group int
is only available for Change
Add Faces JSON show as following Table-
FaceInfo JSON array
17.2.3.4

Table-17.2.3.4 (Faces JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Id -1 int 64-bit signed face ID,
When deleting face information, you only need to
"F74C70ADB0B63B0
give the "ID" or MD5 field. The MD5 field has a
MD5 0E279E71B4143704 string
higher priority. If there is an MD5 field, MD5
D"
will be used first.

Table-17.2.3.5 ( Faces Information JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Count int Group Number
Result [0, 0,…] array Result refer to Table-17.x.x
The corresponding face ID after adding
Id [2, 3,…] array
successfully
["F74C70ADB0B63B The MD5 value of the corresponding face
MD5 array
00E279E71B4143704

412
D",
"0194F781438F2DE8
FBE5B0469895036D
"]

Table-17.2.3.6 (Faces Information JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Id -1 int 64-bit signed face ID,
When deleting face information, you only need to
"F74C70ADB0B63B0
give the "ID" or MD5 field. The MD5 field has a
MD5 0E279E71B4143704 string
higher priority. If there is an MD5 field, MD5
D"
will be used first.

Table-17.2.3.7(Images info JSON)


KEY VALUE COMMENT
RANGE TYPE
Images string array Image data encoded by Base64

Table-17.2.3.8(Feature Value info JSON)


KEY VALUE COMMENT
RANGE TYPE
FeatureVersion int Eigenvalue version
Features string array Get eigenvalue data
Results int array Get eigenvalue operation result

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"
]
}
}

17.2.4Add Compare Face Image

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

"Guangdong,Zhuhai, current residence


Domicile string
Xiangzhou ..."
"Detail of this Evaluate
Remark string
person ..."
"F74C70ADB0B63B0 The MD5 field is valid for MD5, GetByIndex,
MD5 0E279E71B4143704 string and GetById face information, but there is no
D" such field for Search
EnableChnAlarm array Special permission control. Control which
channels the face is allowed to alarm, use by bit,
and the bit is set to indicate that the
corresponding channel is allowed to alarm. If this
field does not exist or is empty, it means that the
special authority control is not used, but the alarm
channel setting of the group is used.

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"
}
]
}
}

17.2.5 Database face information query

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

"Guangdong,Zhuhai, current residence


Domicile string
Xiangzhou ..."
"Detail of this Evaluate
Remark string
person ..."
MD5 "F74C70ADB0B63B0 string The MD5 field is valid for MD5, GetByIndex,
422
0E279E71B4143704 GetById face information, but not for Search
D"
EnableChnAlarm array Special permission control. Control which
channels the face is allowed to alarm, use by bit,
and the bit is set to indicate that the
corresponding channel is allowed to alarm. If this
field does not exist or is empty, it means that the
special authority control is not used, but the alarm
channel setting of the group is used.

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]
}
}

17.2.7Snaped Faces Search and Match

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.2(search SnapedFaces JSON)


KEY VALUE COMMENT
RANGE TYPE
Id int
"F74C70ADB0B63B0 MD5 value
MD5 0E279E71B4143704 string
D"
Feature "base64(feature)" string Feature value
The characteristic 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

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)

Gender int Gender:

434
0- male
1- female

fAttrAge int age

Beauty int level of appearance

Type of glasses, 0: no glasses, 1: wear glasses (at


present, there is no distinction between
GlassesType int
sunglasses and ordinary glasses, all glasses are
default)
Expression type, 0: no expression, 1: smile, 2:
Expression int
laugh
Whether to wear a mask, 0: no mask, 1: with a
MouthMask int
mask
Race int Race, 0: Yellow, 1: White, 2: Black, 3: Arab

Table-17.2.7.7(StopSearch SnapedFaces JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Engine array List of engines to release cache
Result 0 int Result see Table-17.x.x

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
},
{
...
},
...
]
}
}

17.2.8 Snaped Objects Search

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

Engine 0 int Search Engine ( 0 & 1)

Table-17.2.8.2(SnapedObjects Response JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
See Table-17. x.x for the search results of
Result int the captured objects (including people,
cars, etc.)
Count 0 int Actual quantity of captured objects

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

Table-17.2.8.6(StopSearch SnapedObjects JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Engine array Engine list to release cache.
Result 0 int Refer to Table-17.x.x for the result

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
},
{
...
},
...
]
}
}

17.2.9 License Plate Group

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)

Table-17.2.9.1 (Get License Plate Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null no practical significance
Get default alarm parameters or actual alarm
ammetersers
DefaultVal int 1 – Default parameters
0 – Actual parameters

Get one simple info or whole info.


Simple info only covers Group name, Id,
DetectType, Policy, Enabled, CanDel and
SimpleInfo int Similarity.
Whole info cover all the parameter in the group
1 – Get SimpleInfo
0 – Get WholeInfo
Get the configuration information of the
GroupsId [1,2,3…x] array corresponding group. If the field is empty or not,
get datas of all groups

Table-17.2.9.2 (Add License Plate Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Add License Plate Group JSON show as follow
Group array
Table-17.2.9.4

Table-17.2.9.3 (Add License Plate Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Id int License Plate Group Id
Name string LP group Name
Detect Type
DetectType 2 int
enum DLDetectType {

444
DLDT_Face,
DLDT_Object,
DLDT_Plate,
DLDT_All
};
The license plate set is fixed to 2(DLDT_Plate),
Modifying will be unvalid

Table17.2.9.4(License Plate Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Please see Table-17.2.9.12 for
Result 0,-1,-2,….-23, -24 int the result. No need this field
when modifying
Channel Name. No need this
channel string array
field when modifying
Count 0-64 int License Plate Group Qty
License Plate Group
Group JSON array Information JSON show as
follow Table-17.2.9.5

Table-17.2.9.5 (License Plate Group Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Id int LP Group ID
" Allow List" LP Group name, which can be customized and
Name " Block List " string can’t be duplicated.
…...
DetectType 2 int The set is fixed to 2(DLDT_Plate)

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.2.6 (PolicyConfigs JSON)


KEY VALUE COMMENT
RANGE TYPE
[ [255, 255, 0, 255], Each element represents the alarm output
[255, 255, 0, 255], associated with a channel, there are three main
[255, 255, 0, 255] ], elements in total,
... 0 – Local alarm out
ChnAlarmOut array
[ [255, 255, 0, 255], 1/2 – Front-end alarm out
[255, 255, 0, 255], 0/1 - each bit of the sub-element indicates
[255, 255,0,255] ] whether the alarm output of the channel is related

Every element indicates buzzer configs for one


[0, 1, 1, 2, 3, 4, 0, 1, 1,
ChnBuzzerOpt array channel
3, 2, 2 …]
0-disable, 1-10s, 2-20s, 3-40s, 4-60s
Every element indicates alarm latch time for one
[0, 1, 1, 2, 3, 4, 0, 1, 1, channel.
LatchTimeOpt array
3, 2, 2 …] 0-0s, 1-1s, 2-2s, 3-3s, 4-5s, 5-10s, 6-20s, 7- 40s,
8-60s
Every element indicates if one channel will
save image configs. Each element is used by
SaveImg [255, 255, 255, 255…] array
bit to indicate whether to save face and
background
Used by bit, each bit indicates whether a channel
SendEmail [0, 0, 0, 0] array
sends mail, 0-not to send, 1-send
Used by bit, each bit indicates if a channel upload
UploadToFtp [255, 255, 255, 255] array
to FTP
Used by bit, each bit indicates whether a channel
UploadToCloud [0, 0, 0, 0] array
sends Cloud or not, 0-not send, 1-send
Used by bit, each bit indicates whether a channel
ShowThumbnail [255, 255, 255, 255] array
shows thumbnail or not.
446
Used by bit, each bit indicates whether a channel
Record [255, 255, 255, 255] array
record or not.
Used by bit, each bit indicates whether a channel
Push [0, 0, 0, 0] array
sends Push notification or not, 0-not push, 1-push
[[255, 255, 255, 255, Alarm Schedule, each bit stands for half an hour.
255, 255], ...], total 48bits
AlarmSchedule array
[[255, 255, 255, 255, Setting means recording, otherwise not recording
255, 255] ...]

Table-17.2.9.7 (Remove License Plate Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Remove License Plate Group JSON show as
Group array
follow Table-17.2.9.8

Table-17.2.9.8 (Remove License Plate Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
License Plate Group Id which need to be removed
Id int
Predefined groups cannot be deleted

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

Table-17.2.9.11 (IPC JSON)


KEY VALUE COMMENT
RANGE TYPE
Linkable channel which front-end IPC trigger
Channel int alarm out

Indicates the number of front-end alarm outputs.


AlarmOutCnt int
The front-end supports 2 alarm outputs

Table-17.2.9.12(Error Code Information)


KEY VALUE COMMENT
AORT_SUCCESS 0 Success
AORT_NO_DB -1 No database
AORT_DB_EXEC_FAILED -2 Database execuattion failed
AORT_CALC_FEATURE_FAILED -3 Feature extraction failed
AORT_CANCELED -4 Cancelled
AORT_NO_DISK -5 No disk
AORT_DISK_ERROR -6 Disk error
AORT_EXIST -7 Exit
AORT_GROUP_INVALID -8 Group Invalid
AORT_NOT_EXIST -9 Not exist
AORT_MORE_FILE_EXIST -10 Record file exists
HDD error
AORT_SEARCH_ERROR -11

AORT_OVER_MAX_COUNT -12 over the upper limit

AORT_UPDATING_FEATURE -13 Updating the feature value


AORT_NO_USABLE_IPC -14 No IPC available for eigenvalue calculation
AORT_INVALID_PARAM -15 Invalid parameters
AORT_INVALID_FORMAT -16 Invalid format
AORT_INVALID_RES -17 Invalid resolution
AORT_INVALID_MEM -18 Invalid file (over-large File)
AORT_CREAT_FAILED -19 Creation failed
AORT_MD5_NOT_MATCH -20 MD5 not match
AORT_POS_ERROR -21 Pos error
AORT_SIZE_ERROR -22 Size error
AORT_NOT_READY -23 Not ready
AORT_INVALID_DB -24 Invalid database
AORT_GRP_INVALID_OR_INTERNAL -25 Invalid Group or Internal pre-group not allowed

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

Table-17.2.9.13 (Get License Plate Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Get default alarm parameters or actual alarm
ammetersers
DefaultVal int
1 – Default parameters
0 – Actual parameters
Get one simple info or whole info.
Simple info only covers Group name, Id,
DetectType, Policy, Enabled, CanDel and
Similarity.
SimpleInfo int A whole info covers all the parameters in the
group
1 – Get SimpleInfo
0 – Get WholeInfo

TypeFlags 1 int The set is fixed to 1


It is used to control whether to return the ID of an
internal group. The internal group is not open to
WithInternal 0,1 int users. If you want to get the ID of this group,
WithInternal - 1.
General -0

Table17.2.9.14(License Plate Group JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
For request the result please
Result 0,-1,-2,….-23, -24 int see Table-17.2.9.12,
Modify will not need this field.
GroupsId [1,2,3…x] array Group Id you get

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
},
...
]
}
}

17.2.10 License Plate

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

Owner "Mike" string Owner name


"41502519920305091 Identity Code
IdCode string
6"
Job "Software" string Job
Phone "12345678902" string Phone
"Guangdong,Zhuhai, Address
Domicile string
Xiangzhou ..."
"Detail of this Remark
Remark string
person ..."
Special permission control, which controls which
channels the face is allowed to alarm,
Used by bit, which indicates that the
EnableChnAlarm [255, 255, 255, 255] array
corresponding channel is allowed to alarm,
This field does not exist or empty, which means
that special permission control is not used
File index.
VoicePromptsChn 0~255 int
When there is no audio file, this is 255
Playback channel, calculated by bit
Bit 0 – local
VoicePromptsSel bit1 - front-end channel 1,
array
bit2 – front-end channel 23
...

VoicePromptsTm Time period, 12 time periods cannot conflicts


array

Table-17.2.10.3 ( License Plates JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
The face group to be moved to. This field is only
Group int
available for ChangeGroup
Add License Plates JSON show as follow Table-
PlateInfo JSON array
17.2.10.4

456
Table-17.2.10.4 (License Plates JSON)
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Id 1-15 characters string License Plate Id

Table-17.2.10.5 (Response JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Count int Group count
Result [0, 0,…] array Please refer to Table-17.2.9.12

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
]
}
}

17.2.11 Database license plate information query

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.1(License Plates JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Get license plates count JSON show as follow
Table-17.2.11.2
Use only the first element of the array when
searching
When GetId is selected, this field and the
PlateInfo JSON array
following GrpId field should be selected
alternatively. This field is prioritily chosed
compared to the GrpId field. If this field is
provided, the GrpId field will be invalid.

GrpId integer array Only GetId will be valid.

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)

Table-17.2.12.2(License plate Response JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
License Plate search result
Result int
See Table-17.2.9.12
466
Count 0 int Actual count of captured objects

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
}
}

17.2.13 Snaped Faces and Objects Count Get (VHD)

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)

Table-17.2.13.1(Get VHD log count JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
"2020-07-12 Search start time
StartTime string
00:00:00"
"2020-07-12 Search end time
EndTime string
23:59:59"
Chn 0~MAX_PARA_CH array The channel to be searched, and the value

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

Table-17.2.13.2(Get VHD log count Response JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
ee Table-17. x.x for the search results of the
Result int captured objects (including human, cars,
etc.)
Actual number of corresponding types of
Count [0, 0] int64 array
captured objects

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]
}
}

17.3 Face Attendance(Only NVR)


468
GET
URL POST /API/AI/FDAttendance/Get
Description It is used to get the Face Attendance Configuration parameters
Request Body none
Successful Response Face Attendance Configuration JSON (show as follow Table-17.3.1)

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

Table-17.3.1 (Face Attendance Configuration JSON)


KEY VALUE COMMENT
RANGE TYPE
Face Attendance Configuration JSON(show as
fd_atd_info JSON object
follow Table-17.3.2 )

Table17.3.2(Face Attendance Configuration JSON)


KEY VALUE COMMENT
RANGE TYPE
Enable periodic sending of attendance
enable true false bool form

mode “Day””Week””Month” string Send Mode


“Mon.”“Tue.”“Wed.”“Thu.” A day in the week mode
mode_week string
“Fri.” “Sat.” “Sun.”
“1” “2” “3” “4” “5” … “26” “27” A day in the Month mode
mode_month_day string
“28” “29” “30” “31”
send_email string Sending time
on_duty_time string On-duty time
off_duty_time string Off-duty time
"Mon.", "Tue.", "Wed.", "Thu.", Working days, corresponding to
working_days array
"Fri.", "Sat.", "Sun." Monday~Sunday respectively
"CH1","CH2","CH3"……"CHx Effective channel
"
channel array
The number of channels depends
on the capabilities of the device.
"1","2","3","4","5","6","7","8", Effective group
group "9","10","11","12","13", array
"14","15","16"

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
]
}
}

17.4 Statastics (Only NVR)

17.4.1 Face Search

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

Count int Number of requested face statistics

Table-17.4.1.3(Face statistics JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null

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)

Table-17.4.1.4(Face statistics JSON)


KEY VALUE COMMENT
RANGE TYPE
Group int Group Id to which the face belongs
Unix time stamp, for example:
unsigned long 1540444116
Time
long (The display is uniformly based on UTC
time zone, such as: 2020-07-12 00:00:00)
Chn int Channel Id to which the face belongs
“CH1”…”CH1x” Group Id to which the face belongs

The number of
StrChn string
channels depends on
the capabilities of the
device.

Table-17.4.1.5(Search face statistics JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Result 0 int Face statistics Search, See theTable-17.x.x
channel_max int Max Channels
Count int Total number of actual face statistics

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
}
}

17.4.2 Hman & Vehicle Search

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)

Table-17.4.2.1(object statistics JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Which engine was used, 0 or 1, this will match
Engine 0 int
with <Search> interface
["2020-07-06 The time interval of the search.
00:00:00", For example, the example gives the time point of
"2020-07-07 the week of 2020.7.6. When searching, the
00:00:00", previous time point is used as the start time, and
"2020-07-08 the next time point is used as the end time
00:00:00", (excluding the end time point). The number of
"2020-07-09 time points is unlimited, which is determined by
00:00:00", the search criteria. For example, the number of
TimePoints array
"2020-07-10 time points searched by day is 25.
00:00:00",
"2020-07-11
00:00:00",
"2020-07-12
00:00:00",
"2020-07-13
00:00:00"]
[0, 1, 2, 3, 4, 5, 6, 7, Channel to be searched. The value stands for
8….]The number of channel.
Chn channels depends on array
the capabilities of the
device.
Type to search, for example: 0-face, 1-Human, 2-
Type [0, 1, 2, 3, 4, 5, 6] array Vehicle, 3-PID Human, 4-PID Vehicle, 5-LCD
human, 6-LCD Vehicle

Table-17.4.2.2(object statistics JSON)


476
KEY VALUE COMMENT
RANGE TYPE
MsgId null
Get object statistics result, See Table-
Result 0 int
17.x.x
Get object statistics count, each digit indicates the
ObjectCount int array searched counts in the corresponding time
interval.

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)

Table -17.4.3.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.

Table -17.4.3.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON array
follow Table-17.4.3.3
channel_max int Max channel quantity

Table-17.4.3.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
JSON show as follow Table-17.4.3.4 when the
URL is a Get request
CH1 Json Object
JSON show as follow Table-17.4.3.5 when the
URL is a Set request
… Json Object
IP_CH1 Json Object
… Json Object
478
WIFI_CH1 Json Object
… Json Object

Table-17.4.3.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
IP Channel status
"Offline","Online",
status string Offline, Online
“Nonsupport”
Note: When channel is online, no field.
search_date string Search date
"Motion" Detection type
"Person"
detection_type string
"Vehicle"
"Non-Vehicle"
cross_type "Cross In""Cross Out" string Coss type
Distinguish between the 1st and 2nd
ai_cross_count bool
generation CC, and the default here is true

Table-17.4.3.5 (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

report int array Number of people for CC count

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
]
}
}
}
}

17.4.4 Heat Map Statistics

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)

Table -17.4.4.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.

Table -17.4.4.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON array
follow Table-17.4.4.3
channel_max int Max channels

Table-17.4.4.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
JSON show as follow Table-17.4.4 when the
URL is a Get request
CH1 Json Object
JSON show as follow Table-17.4.5 when the
URL is a Set request
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

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

Table-17.4.4.5 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channel online status, only for digital channels.
"Offline","Online",
status string
“Nonsupport” Note: This field is not available when the channel
is online
"Daily report" Report type
"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
Time heat-map data, Heatmap is valid
time_heat_map 0 - 31 int array
when type is 0
Space heat map width, heatmap is valid
heat_map_width 0 - 44 int
when type is 1
Space heat map height, heatmap is valid
heat_map_height 0 - 36 int
when type is 1
Space heat map data (unsigned char gray
space_heat_map 0 - 1583 int array
value), heat_ map_ Valid when type is 1
482
Background image in jpg format of space
background string
heat map, heat_ map_ Valid when type is 1

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)"
}
}
}
}

17.5 Snaped face or object (pedestrian, car) real time alarm

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

Table -17.6.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.

Table -17.6.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Single Channel Information JSON show as
channel_info JSON array
follow Table-17.6.3
channel_max int Max channels

Table-17.6.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CH1 Json Object JSON show as follow Table-17.16.4
… Json Object
IP_CH1 Json Object
… Json Object
WIFI_CH1 Json Object
… Json Object

Table-17.6.4 (Channel Information JSON)


KEY VALUE COMMENT

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

Count 1000 int Number of requested capturing


If data is small, you can request at one time

Table-17.7.2 (SnapedFeatures Information JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Get the results of all eligible Ids and feature
Result 0 int Ids. 0 means success. See Table-17. x.x for
details
unsigned int The elements in the array represent the unique
UUIds [200053, 200054, ...]
array identification of the captured face
FtIds [58, 59, ...] unsigned int The element in the array represents the
491
array eigenvalue Id of the captured face, which
corresponds to the Id in "UUIds" one by one

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

The eigenvalue Id of the captured face, corresponds to the


FtId 58 unsigned int
FtId 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

Table-17.7.6 (FilterSnapedFaces Information JSON)


KEY VALUE COMMENT
RANGE TYPE

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

Table-17.7.8 (MatchAddedFaces Information JSON)


KEY VALUE COMMENT
RANGE TYPE
MsgId null
Get the result of a repeat customer Id
Result 0 int 0 - success.
Details, please see Table-17. x.x
The matched face in the base database. The
elements in this array correspond to the requested
FaceIds [3, -1, -1, 2, ...] long longarray
"UUIds" array one by one.
“-1” - no matched face in the base database
493
Example:
Request message:
POST /API/AI/SnapedFeaturesId/Get HTTP/1.1
{
"version": "1.0",
"data": {
"MsgId": "",
"StartIndex": 0,
"Engine": 1,
"Count": 1011
}
}

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, ...]
}
}

17.8 Cross Counting Scenario

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)

Table-17.8.1.1 (Request JSON)


KEY VALUE COMMENT
RANGE TYPE
msgType "get_CCScenario_RTData" string Get or Clear CC RealTimeInfo
"clear_CCScenario_RTData"
clear_type "Channel","Group", string Clear_ type of CC RealTimeInfo
"All Channels","All Groups"
chnId int When <clear_type> select Channel, need
to request channel number

groupId int When <clear_type> select Group, need to


request Group Id.

Table-17.8.1.2 (Cross Counting RealTime Information JSON)


KEY VALUE COMMENT
RANGE TYPE
CCScenarioRTInfo “Channels”, Object array Cross Counting RealTime Information JSON
“Groups” show as follow Table-17.8.1.3

Table-17.8.1.3 (Cross Counting RealTime Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channels Object array JSON show as follow Table-17.8.1.4
Groups Object array JSON show as follow Table-17.8.1.5

Table-17.8.1.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE

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

Table-17.8.1.5 (Group Information JSON)


KEY VALUE COMMENT
RANGE TYPE
GroupId int Group Id
EnterCnt int Number of entrants
ExitCnt int Number of departures
StayCnt int Number of stays
AvailableCnt int Available capacity
Triggered count Mode:
ObjType int
0:Motion 1:Persion 2:Vehicle
Object Live channel data in the group
ChnDetail
array JSON show as follow Table-17.8.1.6

Table-17.8.1.6 (Chn Detail JSON)


KEY VALUE COMMENT
RANGE TYPE
ChnId int Channel Id
EnterCnt int Number of entrants
ExitCnt int Number of departures

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)

Successful Response The successful result response that described in 2.5

Table-17.8.2.1 (Map Request JSON)


KEY VALUE COMMENT
RANGE TYPE
GroupId int Group Id of Map you need to search

Table-17.8.2.2 (Map Information JSON)


KEY VALUE COMMENT
RANGE TYPE
GroupId int Group Id
RefWidth 0~1920 int Ref Width for coordinates
RefHeight 0~1080 int Ref Height for coordinate
Cameras’ positions
CamPos Object array
JSON show as follow Table-17.8.2.3
"base64(imgData)" Map Image, only support png/jpg/bmp format
MapImage string
0~5 * 1024 * 1024 fort the Map image.

Table-17.8.2.3 (CamPos Information JSON)


KEY VALUE COMMENT
RANGE TYPE
ChnId int Channel Id

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)

Table-17.8.3.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of

501
the device.

Table-17.8.3.2 (Response Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channels Int array Allowed to search Channels
Groups Int array Allowed to search Groups
"Day","Week", Allowed to search ReportType
ReportType string
"Month","Year"
"Motion","Person", Detection Type
DetectionType string
"Vehicle"
Date 10 string Current Date

Table-17.8.3.3 (Request Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Request Channels, Response “Empty” when
Channels Int array
requesting Groups
Request Groups, Response “Empty” when
Groups Int array
requesting Channels
Date 10 string Request Date
"Day","Week", Request Report Type
ReportType string
"Month","Year"
Detect Type (Only response “empty” when
searching Group, matched with Channels)
ChnObjType 0~2 Int array
0:"Motion", 1:"Person",
2:"Vehicle"
Detect Type (Only response “empty” when
searching Channel, matched with Groups)
GrpObjType 0~2 Int array
0:"Motion", 1:"Person",
2:"Vehicle"

Table-17.8.3.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
Channels Statistics Info
Channels Object array
JSON show as follow Table-17.8.3.5
Group Statistics Info
Groups Object array
JSON show as follow Table-17.8.3.6

Table-17.8.3.5 (Channels Information JSON)


KEY VALUE COMMENT

502
RANGE TYPE
ChnId int Channel Number
Channel Statistics data
Num Object array
JSON show as follow Table-17.8.3.7

Table-17.8.3.6 (Groups Information JSON)


KEY VALUE COMMENT
RANGE TYPE
GroupId int Group Id
Group Statistics data
Num Object array
JSON show as follow Table-17.8.3.7

Table-17.8.3.7 (Num Information JSON)


KEY VALUE COMMENT
RANGE TYPE
EnterCnt int Number of entrants
ExitCnt int Number of departures
StayCnt int Number of Stays

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

Table-17.8.4.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” DVR/NVR need;
IPC only use CH1
The number of channels
depends on the capabilities of
the device.

Table-17.8.4.2 (Config Information JSON)


KEY VALUE COMMENT
RANGE TYPE
adSwitch bool Ad mode Switch
ad_displayMode bool Display Mode Switch
ad_seqTime int Ad swquence time
Channel Information JSON show as follow
channel_info JSON object
Table-17.8.4.3
Group Information JSON show as follow Table-
group_info JSON object
17.8.4.4

Table-17.8.4.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
channel_switch bool Control whether CC scenario function is enabled
Which group the channel belong to. “-1” stands
channel_group int
for “the channel(s) is not in the group
channel_capacity int Capacity in the channel
Channel configurable, it’s linked to the 2nd
chn_set_enable bool
generation CC function.
"0","10","20","40", Buzzer time
chn_buzzer string
"60"
“Local->1”… Alarm output channel
chn_alarm_out array
”Local->x”

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"

Table-17.8.4.4 (Group Information JSON)


KEY VALUE COMMENT
RANGE TYPE
group_switch bool Control whether CC scenario function is enabled
group_capacity int Capacity in one group
start_time 8 string Start time
end_time 8 string End time
"Unuse","Person","Ve Alarm Type:
alarm_type string
hicle" 1:Person,2:Vehicle
"0","10","20","40", Buzzer Time
grp_buzzer string
"60"
“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:
grp_alarm_out ” IP_CHx->2” array Local->1: Enable,Empty: Disable

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": {}
}

17.8.5 Image Manage

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)

Table -17.8.5.1 (Request Information JSON)


KEY VALUE COMMENT
RANGE TYPE
operate "GetImageList", string Operation Type:
"GetImageData", Get Image list
"AddImage", Get Image data (Get one image every
"DeleteImage" time)
Add Image
Delete Image
image_name string Image name you added or got
image_data "base64(imgData)" string Image data you added and support JPG,
2 * 1024 *1024 PNG and BMP format.
image_list array Delete image list
Table -17.8.5.2 (Response Information JSON)
KEY VALUE COMMENT
RANGE TYPE
max_count int Maximum image counts supported
image_name string Image name, Get image name after
reponse successfully
image_data "base64(imgData)" string Get iamge data
image_list array Get image list

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)"
}
}

17.x AI Operation Result Type(NVR-Specific)


Table-17.x.x(AI_OPT_RESULT_TYPE)
Result Type COMMENT
AORT_SUCCESS = 0 Success
AORT_NO_DB = -1 No database
AORT_DB_EXEC_FAILED = -2 Database execute failed
AORT_CALC_FEATURE_FAILED = -3 Failed to extract feature
AORT_CANCELED = -4 Canceled
AORT_NO_DISK = -5 No disk
AORT_DISK_ERROR = -6 Disk error
AORT_EXIST = -7 Existed
AORT_GROUP_INVALID = -8 Group is invalid
511
AORT_NOT_EXIST = -9 Not Exist
AORT_MORE_FILE_EXIST = -10 File has already existed
AORT_SEARCH_ERROR = -11 Searching error
AORT_OVER_MAX_COUNT = -12 Over the max count
AORT_UPDATING_FEATURE = -13 Updating the feature
No usable an IPC of calculating the
AORT_NO_USABLE_IPC = -14
feature count
AORT_INVALID_PARAM = -15 Invalid Parameter
AORT_INVALID_FORMAT = -16 Invalid Format
AORT_INVALID_RES = -17 Invalid resolution
AORT_INVALID_MEM = -18 Document memory is over
AORT_CREAT_FAILED = -19 Failed to create
AORT_MD5_NOT_MATCH = -20 Not match with MD5
AORT_POS_ERROR = -21 Position Error
AORT_SIZE_ERROR = -22 Size Error
AORT_NOT_READY = -23 Not ready
AORT_INVALID_DB = -24 Invalid Database

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

Table-18.1.2.1 (Request JSON)


KEY VALUE COMMENT
RANGE TYPE
string Operating Command:
"GetAudioFilesList", Get Audio File List、
"GetAudioIndex", Get Audio Index from IP Channel 、
command "ConfigureAudioIndex", Configure Audio index from IP
"PlayAudio", Channel、
"StopPlaying" Play Audio from IPC
Stop Playing audio
channel “IP_CH1”…” IP_CHx” string array Be used for the specific IP channel
(PlayAudio, StopPlaying)
The number of channels
depends on the capabilities of
the device.
Channel Information JSON show as follow
channel_info JSON object
Table-18.1.2.3 (ConfigureAudioIndex)

Table-18.1.2.2 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
audio_list string array Audio List
Channel Information JSON show as follow Table-
channel_info JSON object
18.1.2.3

Table-18.1.2.3 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
IP_CH1 Json Object JSON show as follow Table-18.1.2.4
… Json Object
IP_CHx Json Object

Table-18.1.2.4 (Channel Information JSON)


KEY VALUE COMMENT
RANGE TYPE
"Offline", The state of online IP channel
state string
"Online"
audio_index int Audio document index

513
18.1.3 Example

18.1.3.1 RequestGet Audio Files List

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"
]
}
}

18.1.3.2RequestGet Audio Index List

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
}
}
}
}

18.1.3.3Request Configure Audio Index

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.1 (Request JSON)


KEY VALUE COMMENT
RANGE TYPE
Token string

Table -19.1.1.2
KEY VALUE COMMENT
RANGE TYPE
AccessToken string

Table -19.1.1.3 (Request JSON)


KEY VALUE COMMENT
RANGE TYPE
string Optional Field,The request returns only
Token
the default parameter without this field.

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

Table -19.1.1.5 (Default JSON)


KEY VALUE COMMENT
RANGE TYPE
StorageError "True"、"False" string
StorageFull "True"、"False" string
StorageUnform "True"、"False" string
atted
StorageNull "True"、"False" string
StorageReadOnl "True"、"False" string
y
Motion "True"、"False" string
IOAlarm "True"、"False" string
PIRAlarm "True"、"False" string
Intellect "True"、"False" string
AiHuman "True"、"False" string
AiVehicle "True"、"False" string
VideoLoss "True"、"False" string
AiFaceDetection JSON object Please refer to Table -19.1.1.6
LCD "True"、"False" string
PID "True"、"False" string
PD&VD(PD) "True"、"False" string
FD "True"、"False" string
AD "True"、"False" string
CC "True"、"False" string
CD "True"、"False" string
QD "True"、"False" string
RSD "True"、"False" string
LPD "True"、"False" string
SOD "True"、"False" string
VT "True"、"False" string
SD "True"、"False" string

Table -19.1.1.6 (AiFaceDetection JSON)

518
KEY VALUE COMMENT
RANGE TYPE
Object
Group Please refer to Table -19.1.1.7
array

Table -19.1.1.7 (Group Array JSON)


KEY VALUE COMMENT
RANGE TYPE
Name string
AutoSubscribe "True"、"False"

Table -19.1.1.8 (Filter JSON)


KEY VALUE COMMENT
RANGE TYPE
Intellect Object Please refer to Table -19.1.1.9
IOAlarm Object Please refer to Table -19.1.1.9
Motion Object Please refer to Table -19.1.1.9
PIRAlarm Object Please refer to Table -19.1.1.9
VideoLoss Object Please refer to Table -19.1.1.9
StorageError Object
StorageFull Object
StorageNull Object
StorageReadOnl Object
y
StorageUnform Object
atted
LCD Object
PID Object
PD&VD(PD) Object
FD Object
AD Object
CC Object
CD Object
QD Object
RSD Object
LPD Object
SOD Object
VT Object
SD Object

Table -19.1.1.9 (Filter JSON)


KEY VALUE COMMENT
RANGE TYPE
519
0~Maximum channel Int array
Channel
number

Table -19.1.1.10 (Request JSON)


KEY VALUE COMMENT
RANGE TYPE
JSON object Subscribe parameter, Please refer to Table
Filter
-19.1.1.8
JSON object Subscribe parameter,Please refer to
Mobile
Table -19.1.1.11
JSON object Subscribe parameter,Please refer to
Notification
Table -19.1.1.18

Table -19.1.1.11 (Mobile JSON)


KEY VALUE COMMENT
RANGE TYPE
AppID String
Language String
PushChannel String
Token String

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

A.2 Secondary Certification Development Guide


Secondary authentication scenarios such as formatting a hard drive, rebooting a device, etc. The following is
an example of a device reboot.

Calling sequence Interface name Description

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、After login, the


default cookie
timeout is 30 seconds
and the heartbeat
interface must be
called to keep the
session alive.
2. When calling the
interface during the
debugging phase, it is
recommended to use
/API/Login/Heartbeat the keep_alive field
(/API/SystemConfig/General/Set to maintain 210
2、User Heartbeat seconds of session
This interface allows you to
configure the web session timeout) retention time. In
addition, the user are
also controlled by a
web session timeout
after logging in. The
session timeout
defaults to 5 minutes
and is recommended
to be changed to one
day for longer logins
(the maximum
session timeout is
1440 minutes).
1. Obtain the public
key for encrypting
3、Obtaining the public key /API/Maintenance/TransKey/Get
the password on the
board side.
1. Transmit the
/API/Maintenance/DeviceReboot/ cipher text to the
4、Equipment reboot
Set board end, which
decrypts it to obtain
547
Calling sequence Interface name Description
the password for
secondary
authentication, and
reboots the device
after successful
authentication.

A.3 Set Password Development Guide


The following is an illustration of setting up an email account
Calling sequence Interface name Description

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.

/API/Login/Heartbeat 1、After login, the


(/API/SystemConfig/General/Set default cookie
2、User Heartbeat timeout is 30 seconds
This interface allows you to
and the heartbeat
configure the web session timeout)
interface must be
548
Calling sequence Interface name Description
called to keep the
session alive.
2. When calling the
interface during the
debugging phase, it is
recommended to use
the keep_alive field
to maintain 210
seconds of session
retention time. In
addition, the user is
also controlled by the
web session timeout
after login, the
default session
timeout is 5 minutes,
if you want to login
for a long time, it is
recommended to
modify it to one day
(the maximum
session timeout is
1440 minutes).
1. Obtain the public
key for encrypting
3、Obtaining the public key /API/Maintenance/TransKey/Get
the password on the
board side.
1. The client will
send the public key
and cipher text
4、Set up an email account /API/NetworkConfig/Email/Set generated by itself to
the board end, which
will decrypt the
cipher and save it.

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

You might also like