Akuvox HTTP API Manual for Access Control
Akuvox HTTP API Manual for Access Control
Content
Introduction..................................................................................................................................................1
HTTP API Release Notes............................................................................................................................... 1
HTTP API Description....................................................................................................................................2
HTTP API Request................................................................................................................................. 2
HTTP API Method................................................................................................................................. 2
Method: GET........................................................................................................................................ 2
Method: POST...................................................................................................................................... 3
HTTP API Reply..................................................................................................................................... 4
Positive Reply without Parameters...................................................................................................... 4
Positive Reply with Parameters........................................................................................................... 4
Negative Reply......................................................................................................................................5
HTTP API Configuration................................................................................................................................ 6
HTTP API Authentication Method........................................................................................................ 7
None..................................................................................................................................................... 7
Normal..................................................................................................................................................7
WHITE LIST............................................................................................................................................7
Basic......................................................................................................................................................7
Digest....................................................................................................................................................7
Token.................................................................................................................................................... 7
HTTP API Functions.............................................................................................................................. 8
Api system.......................................................................................................................................... 11
Api system info...................................................................................................................................12
Api system status............................................................................................................................... 14
Api system reboot.............................................................................................................................. 14
Api firmware param........................................................................................................................... 15
Api firmware status............................................................................................................................ 15
Api firmware prepare......................................................................................................................... 16
Api firmware upload...........................................................................................................................16
Api firmware upgrade........................................................................................................................ 17
Api config get......................................................................................................................................18
Api config set......................................................................................................................................21
Api config export................................................................................................................................ 22
Api config import................................................................................................................................22
Api config reset_factory..................................................................................................................... 23
Api relay..............................................................................................................................................23
Api relay get....................................................................................................................................... 24
Api relay set........................................................................................................................................25
Api relay status...................................................................................................................................26
Api relay..............................................................................................................................................27
Api relay trig....................................................................................................................................... 27
HTTP API Manual for Access Control
Api input............................................................................................................................................. 28
Api input get....................................................................................................................................... 29
Api input set....................................................................................................................................... 30
Api input status.................................................................................................................................. 31
Api publiccode....................................................................................................................................32
Api publiccode get..............................................................................................................................32
Api publiccode set.............................................................................................................................. 33
Api privatekey.....................................................................................................................................34
Api privatekey get.............................................................................................................................. 34
Api privatekey add..............................................................................................................................36
Api privatekey set...............................................................................................................................38
Api privatekey del...............................................................................................................................40
Api privatekey clear............................................................................................................................42
Api privatekey export......................................................................................................................... 43
Api privatekey import.........................................................................................................................43
Api rfkey............................................................................................................................................. 44
Api rfkey get....................................................................................................................................... 45
Api rfkey add...................................................................................................................................... 47
Api rfkey set........................................................................................................................................49
Api rfkey del....................................................................................................................................... 51
Api rfkey clear.....................................................................................................................................53
Api rfkey export..................................................................................................................................54
Api rfkey import................................................................................................................................. 54
Api contact......................................................................................................................................... 55
Api contact get................................................................................................................................... 55
Api contact add.................................................................................................................................. 56
Api contact set....................................................................................................................................60
Api contact del....................................................................................................................................62
Api contact clear.................................................................................................................................64
Api contact export..............................................................................................................................65
Api contact import............................................................................................................................. 66
Api group............................................................................................................................................ 66
Api group get...................................................................................................................................... 66
Api group add..................................................................................................................................... 67
Api group set...................................................................................................................................... 68
Api group clear................................................................................................................................... 69
Api call status..................................................................................................................................... 70
Api call dial......................................................................................................................................... 70
Api call hangup................................................................................................................................... 71
Api sip................................................................................................................................................. 72
Api sip get...........................................................................................................................................72
Api sip set........................................................................................................................................... 74
Api sip status...................................................................................................................................... 75
Api dialreplace....................................................................................................................................76
HTTP API Manual for Access Control
Introduction
HTTP API is an application interface which is designed for function control of selected
Akuvox intercom via HTTP. It enables Akuvox intercoms to be integrated easily with third
party products, such as home automation, security and monitoring systems, etc.
Applicable to A01/A02/A03/A05.
1
HTTP API Manual for Access Control
Akuvox HTTP API is a standard protocol based on the HTTP GET/POST method. Any
request can interact with the device via GET or POST. The format of the interactive
message is JSON, and the file transfer mode uses the standard FORM upload mode.
All commands are sent via HTTP/HTTPS to the intercom address with absolute path
completed with the /api prefix. Which protocol you choose depends on the current
intercom settings in the Services / HTTP API section. The HTTP API functions are
assigned to services with defined security levels including the TLS connection request (i.e.
HTTPS).
The absolute path includes the target system module (system, firmware, config, relay, etc.)
and the action name (status, get, add, etc.). To be accepted by the intercom, a request has
to include the method and absolute path specification followed by the Host header.
Example:
http://IP address/api/Target/Action?Param
Akuvox intercom applies the following two HTTP methods: GET and POST. The GET and
POST methods are equivalent from the viewpoint of HTTP API but use different parameter
transfers (refer to the next subsection).
Method: GET
2
HTTP API Manual for Access Control
http://192.168.1.163/api/contact/add?name=Johnson&phone=110
Example Return:
{
"retcode": 0,
"action": 0,
"message": "OK",
"data": {
"id": 0,
"name": "Johnson",
"phone": "110"
}
}
Method: POST
Post mode is the same as Get mode that requests intercom content download or general
command execution, but Post moves the Query String parameters into the json for
processing
Example Request:
http://Device-IP/api/
{
"target": "contact",
"action": "add",
"data" : {
"name": "Johnson",
"phone": "110"
}
}
Example Return:
3
HTTP API Manual for Access Control
{
"retcode": 0,
"action": 0,
"message": "OK",
"data": {
"id": 0,
"name": "Johnson",
"phone": "110"
}
}
Replies to requests are mostly in the JSON format, and Files exported according to
requests are saved in file format without compression (e.g config is saved in .tgz file type ,
rfkey is saved in .xml file type, etc). The Content-Type header specifies the response
format. Three basic reply types are defined for JSON.
This reply is sent in case a request has been executed successfully for functions that do
not return any parameters. This reply is always combined with the HTTP status code
200OK.
{
"retcode": 0,
"action": "xxxx",
"message": "OK"
}
This reply is sent in case a request has been executed successfully for functions that
return supplementary parameters. The result item includes other reply parameters related
to the function. This reply is always combined with the HTTP status code 200OK.
4
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "xxxxx",
"message": "OK",
"data":
{
......
}
}
Negative Reply
This reply is sent in case an error occurs during request processing. The reply specifies
the error code (code), text description (description) and error details if necessary (param).
The reply can be combined with the HTTP status code 200 OK or 401 Unauthorized
Required.
{
"retcode": -1,
"action": "unknow",
"message": "unsupport action"
}
5
HTTP API Manual for Access Control
Item Description
HTTP API Disabled: system allways return HTTP 403 Forbidden status
Enabled:enable http api
Auth Mode None: no authentication method
Normal: (reserved)
WhiteList: Whitelist model
Basic: http Basic standard authentication method
Digets: http Digets standard authentication method
Token : (reserved)
User Name UserName: admin (default), used in basic and digest auth
mode
Password Password: httpapi (default), used in basic and digest auth
mode
IP01 White List IP
IP02 White List IP
IP03 White List IP
IP04 White List IP
IP05 White List IP
6
HTTP API Manual for Access Control
None
Normal
(Reserved)
WHITE LIST
The whitelist is suitable for operation in the LAN, by judging the IP address of the visitor to
confirm whether to allow access to the HTTP API.
Basic
In Authorization field of Http request header, use Base64 encode method for the
information of username and password.
Digest
Token
(Reserved)
7
HTTP API Manual for Access Control
The table below provides a list of all available HTTP API functions including:
the HTTP request absolute path
the supported HTTP methods
8
HTTP API Manual for Access Control
/api/contact/get GET/POST
/api/contact/add POST
/api/contact/set POST
/api/contact/del POST
/api/contact/clear GET/POST
/api/contact/export GET/POST
/api/contact/import POST
/api/group/get GET/POST
/api/group/add POST
/api/group/set POST
/api/group/clear GET/POST
/api/call/status GET/POST
/api/call/dial GET/POST
/api/call/hangup GET/POST
/api/sip/get GET/POST
/api/sip/set POST
/api/sip/status GET/POST
/api/dialreplace/get GET/POST
/api/dialreplace/add POST
/api/dialreplace/set POST
/api/dialreplace/del POST
/api/dialreplace/clear GET/POST
/api/dialreplace/export GET/POST
/api/dialreplace/import GET/POST
/api/log/get GET/POST
/api/log/set POST
/api/log/export GET/POST
/api/log/clear GET/POST
/api/calllog/get GET/POST
/api/calllog/del POST
/api/calllog/clear GET/POST
/api/calllog/export GET/POST
/api/doorlog/get GET/POST
/api/doorlog/del POST
/api/doorlog/clear GET/POST
/api/doorlog/export GET/POST
/api/pcap/status GET/POST
/api/pcap/start GET/POST
/api/pcap/stop GET/POST
/api/pcap/export GET/POST
9
HTTP API Manual for Access Control
/api/user/info GET/POST
/api/user/get GET/POST
/api/user/add POST
/api/user/set POST
/api/user/scan POST
/api/user/edit GET/POST
/api/user/del POST
/api/user/clear GET/POST
/api/user/export GET/POST
/api/user/import POST
10
HTTP API Manual for Access Control
Api system
11
HTTP API Manual for Access Control
The reply is in the application/json format and includes the following information on the
device:
Example Request:
GET: /api/system/info
POST:
{
"target": "system",
"action": "info"
}
Example Return:
12
HTTP API Manual for Access Control
{
"action": "info", "data":
{
"Account1": {
"SipServer": "192.168.1.115",
"Status": "2",
"UserName": "141"
},
"Account2": {
"SipServer": "192.168.1.115",
"Status": "2",
"UserName": "142"
}, "Lan": {
"DNS1": "192.168.1.1", "DNS2": "",
"Gateway": "192.168.1.1",
"IPAddress": "192.168.1.78",
"LinkStatus": "1",
"PortType": "0",
"SubnetMask": "255.255.255.0"
},
"Status": {
"FirmwareVersion": "29.31.101.624",
"HardwareVersion": "29.3.0", "MAC":
"0C:11:05:07:8B:71", "Model": "R29S"
}
},
"message": "OK", "retcode": 0
}
13
HTTP API Manual for Access Control
Param Description
SystemTime Unix time
UpTime Device online time
Example Request:
GET: /api/system/status
POST:
{
"target": "system",
"action": "status"
}
Example Return:
{
"retcode": 0,
"action": "status",
"message": "OK",
"data": {
"SystemTime": 1544336389,
"UpTime": 137
}
}
Example Request:
GET: /api/system/reboot
POST:
{
"target": "system",
"action": "reboot"
}
14
HTTP API Manual for Access Control
Example Return:
{
"retcode": 0,
"action": "status",
"message": "OK",
}
Param Description
md5 string, optional
md5sum of the firmware
only use in action “upgraer”
silent silent
0 - ui will display upgrade process
1 - upload in backgroup
only use in action “upload”
default: 0
Example Request:
GET: /api/firmware/status
POST:
{
"target": "firmware",
"action": "status",
}
Example Return:
15
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "status",
"message": "OK",
"data": {
"FirmwareVersion": "29.31.101.624",
"HardwareVersion": "29.3.0",
"MAC": "0C:11:05:07:8B:71",
"Model": "R29S"
}
}
Tell device into upgrade mode, this must do before upload and upgrade action The GET or
POST method can be used for this function.
Example Request:
GET: /api/firmware/prepare
POST:
{
"target": "firmware",
"action": "prepare",
}
Example Return:
{
"retcode": 0,
"action": "prepare",
"message": "OK"
}
Upload firmware, Only POST method can be used for this function. PATH:
/api/firmware/upload
16
HTTP API Manual for Access Control
PARAM: /api/firmware/upload?silent=0
The GET or POST method can be used for this function. Example
POST:
{
"target": "firmware",
"action": "upgrade",
}
17
HTTP API Manual for Access Control
GET: /api/firmware/upgrade?md5=25e317773f308e446cc84c503a6d1f85
POST:
{
"target": "firmware",
"action": "upgrade",
"data": {
"md5" : "25e317773f308e446cc84c503a6d1f85"
}
}
{
"retcode": -1,
"action": "upgrade",
"message": "Wrong MD5",
"data": {
"md5": "25e317773f308e446cc84c503a6d1f83",
"md5_calc": "25e317773f308e446cc84c503a6d1f85"
}
}
POST:
{
"target": "config",
"action": "get"
}
18
HTTP API Manual for Access Control
Example Return 1:
{
"retcode": 0,
"action": "get",
"message": "OK",
"data": {
"Config.Account1.ADVANCED.ShowMissedCall": "1",
"Config.Account1.ANONYMOUS_CALL.Enable": "0",
"Config.Account1.ANONYMOUS_CALL.OffCode": "",
"Config.Account1.ANONYMOUS_CALL.OnCode": "",
.......
"Config.Account1.ANONYMOUS_CALL.PrivacyHeaderValue": "id",
},
}
Example Return 2:
19
HTTP API Manual for Access Control
{
"retcode": 0
"action": "get",
"message": "OK",
"data": {
"Config.DoorSetting.CLOUDSERVER.DeviceCommunity": "",
"Config.DoorSetting.CLOUDSERVER.Enable": "0",
"Config.DoorSetting.CLOUDSERVER.GatePort": "0",
"Config.DoorSetting.CLOUDSERVER.GateServer": "",
"Config.DoorSetting.CLOUDSERVER.OpenDoorLimit": "",
"Config.DoorSetting.CLOUDSERVER.Port": "",
"Config.DoorSetting.CLOUDSERVER.RpsEnable": "1",
"Config.DoorSetting.CLOUDSERVER.RpsServer":
"http://rps.akuvox.com:8080/redirect?mac=",
"Config.DoorSetting.CLOUDSERVER.Server": "",
"Config.DoorSetting.CLOUDSERVER.Token": "",
"Config.DoorSetting.CLOUDSERVER.Type": "",
"Config.DoorSetting.CLOUDSERVER.UploadPassword": "",
"Config.DoorSetting.CLOUDSERVER.UploadUrl": "",
"Config.DoorSetting.CLOUDSERVER.UploadUser": ""
},
,
}
POST:
{
"action": "get",
"target": "config",
"data": {
"item": [
"Config.DoorSetting.CLOUDSERVER.Enable",
"Config.DoorSetting.CLOUDSERVER.RpsServer"
]
}
}
Example Return 3:
20
HTTP API Manual for Access Control
{
"retcode": 0
"action": "get",
"message": "OK",
"data": {
"Config.DoorSetting.CLOUDSERVER.Enable": "0",
"Config.DoorSetting.CLOUDSERVER.RpsServer":
"http://rps.akuvox.com:8080/redirect?mac="
},
}
Only POST method can be used for this function. Api config set
Example Request:
POST:
{
"target": "config",
"action": "set",
"data": {
"Config.DoorSetting.CLOUDSERVER.Enable": "0",
"Config.DoorSetting.CLOUDSERVER.RpsServer":
"192.168.1.163"
}
}
Example Return:
{
"retcode": 0,
"action": "set",
"message": "OK"
}
21
HTTP API Manual for Access Control
To export the configuration, equivalent to operate via web interface path: Upgrader- >
Advanced-> Config File->Export, and the exported configuration is encrypted which cannot
be modified.
Example Request:
GET: /api/config/export
POST:
{
"action": "export",
"target": "config",
"data": {
}
}
Example Return:
Config.tgz file type
To import the configuration, equivalent to operate via web interface path: Upgrader->
Advanced-> Config File->Import, and only tgz file can be accepted. Note: Device will reboot
after import the configuration successfully.
22
HTTP API Manual for Access Control
The GET or POST method can be used for this function. Example
Request:
GET: /api/config/reset_factory
POST:
{
"target": "config",
"action": "reset_factory"
}
Example Return:
{
"retcode": 0,
"action": "reset_factory",
"message": "OK"
}
Api relay
Params Description
Config.DoorSetting.RELAY.TypeA Relay Open Type
Config.DoorSetting.RELAY.TypeB 0 - NC - COM Open
Config.DoorSetting.RELAY.TypeC 1- NO -COM Open
Config.DoorSetting.RELAY.HoldDelayA Relay Hold Delay 0 ~ 60 second
Config.DoorSetting.RELAY.HoldDelayB
Config.DoorSetting.RELAY.HoldDelayC
Config.DoorSetting.RELAY.TriggerDelayA Relay Trigger Delay 0 ~ 60 second
Config.DoorSetting.RELAY.TriggerDelayB Delay X second to trigger relay
Config.DoorSetting.RELAY.TriggerDelayC
Config.DoorSetting.DTMF.Enable Config.DoorSetting.DTMF.Option
n=1: 1 digit dtmf, refer to
Config.DoorSetting.DTMF.CodeX
n=2~4: 2~4 digits dtmf, refer to
Config.DoorSetting.DTMF.MultiCodeX
23
HTTP API Manual for Access Control
Config.DoorSetting.DTMF.Code2
Config.DoorSetting.DTMF.Code3
Config.DoorSetting.DTMF.MultiCode1
Config.DoorSetting.DTMF.MultiCode2 2 ~ 4 digits dtmf code
Config.DoorSetting.DTMF.MultiCode3
The GET or POST method can be used for this function. Example
Request:
GET: /api/relay/get
POST:
{
"target": "relay",
"action": "get"
}
Example Return:
24
HTTP API Manual for Access Control
{
"retcode": 0, "action": "get",
"message": "OK", "data": {
"Config.DoorSetting.RELAY.TypeA": "0",
"Config.DoorSetting.RELAY.TypeB": "0",
"Config.DoorSetting.RELAY.TypeC": "0",
"Config.DoorSetting.RELAY.HoldDelayA": "5",
"Config.DoorSetting.RELAY.HoldDelayB": "5",
"Config.DoorSetting.RELAY.HoldDelayC": "5",
"Config.DoorSetting.RELAY.TriggerDelayA": "0",
"Config.DoorSetting.RELAY.TriggerDelayB": "0",
"Config.DoorSetting.RELAY.TriggerDelayC": "0",
"Config.DoorSetting.RELAY.NameA": "RelayA",
"Config.DoorSetting.RELAY.NameB": "RelayB",
"Config.DoorSetting.RELAY.NameC": "RelayC",
"Config.DoorSetting.RELAY.HttpTrig": "0",
"Config.DoorSetting.RELAY.UserName": "",
"Config.DoorSetting.RELAY.Password": "",
"Config.DoorSetting.DTMF.Enable": "1",
"Config.DoorSetting.DTMF.Option":"0",
"Config.DoorSetting.DTMF.Code1":"0",
"Config.DoorSetting.DTMF.Code2":"1",
"Config.DoorSetting.DTMF.Code3":"2",
"Config.DoorSetting.DTMF.MultiCode1": "010",
"Config.DoorSetting.DTMF.MultiCode2": "012",
"Config.DoorSetting.DTMF.MultiCode3": "013"
}
}
Request:
25
HTTP API Manual for Access Control
POST:
{
"target": "relay",
"action": "set",
"data" : {
"Config.DoorSetting.RELAY.HoldDelayA": "8"
}
}
Example Return:
{
"retcode": 0,
"action": "set",
"message": "OK"
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/relay/status
POST:
{
"target": "relay",
"action": "status"
Example Return:
26
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "status",
"message": "OK",
"data": {
"RelayA": 0,
"RelayB": 0,
"RelayC": 0
}
}
Api relay
Params Description
0:Auto Close
mode
1: Manual
num 1 Relay A
2 Relay B
3 Relay C
level 0 NO - COM
1 NC - COM
delay 0~65535(Second)
The GET or POST method can be used for this function. Example
Request:
GET: /api/relay/trig?mode=1&num=1&level=1&delay=5
27
HTTP API Manual for Access Control
POST:
{
"target": "relay",
"action": "trig",
"data" : {
"mode": 1,
"num": 1,
"level": 1,
"delay": 5
}
}
Example Return:
{
"retcode": 0,
"action": "trig",
"message": "OK"
}
Api input
Params Description
Config.DoorSetting.INPUT.EnableA
Config.DoorSetting.INPUT.EnableB Input Enable
Config.DoorSetting.INPUT.EnableC
Config.DoorSetting.INPUT.OptionA Trig Option:
Config.DoorSetting.INPUT.OptionB 0 Low Trig
Config.DoorSetting.INPUT.OptionC 1 High Trig
Config.DoorSetting.INPUT.DelayA Trig Delay 0 ~ 65536 second
Config.DoorSetting.INPUT.DelayB 0: trig now
Config.DoorSetting.INPUT.DelayC 1 ~ 65536: trig after X second
Config.DoorSetting.INPUT.RelayIdA Trig which relay id
Config.DoorSetting.INPUT.RelayIdB 1 - Relay A
Config.DoorSetting.INPUT.RelayIdC 2 - Relay B
3 - Relay C
Config.DoorSetting.INPUT.ActionUrlA Action URL
Config.DoorSetting.INPUT.ActionUrlB More Action URL Param see Action
Config.DoorSetting.INPUT.ActionUrlC URL document
Config.DoorSetting.INPUT.FtpEnableA when input trig, send capture files to
28
HTTP API Manual for Access Control
The GET or POST method can be used for this function. Example
Request:
GET: /api/input/get
POST:
{
"target": "input",
"action": "get"
}
Example Return:
29
HTTP API Manual for Access Control
{
"retcode": 0, "action": "get",
"message": "OK", "data": {
"Config.DoorSetting.INPUT.EnableA": "1",
"Config.DoorSetting.INPUT.EnableB": "1",
"Config.DoorSetting.INPUT.EnableC": "1",
"Config.DoorSetting.INPUT.OptionA": "0",
"Config.DoorSetting.INPUT.OptionB": "0",
"Config.DoorSetting.INPUT.OptionC": "0",
"Config.DoorSetting.INPUT.DelayA": "0",
"Config.DoorSetting.INPUT.DelayB": "0",
"Config.DoorSetting.INPUT.DelayC": "0",
"Config.DoorSetting.INPUT.RelayIdA": "1",
"Config.DoorSetting.INPUT.RelayIdB": "2",
"Config.DoorSetting.INPUT.RelayIdC": "3",
"Config.DoorSetting.INPUT.FtpEnableA": "0",
"Config.DoorSetting.INPUT.FtpEnableB": "0",
"Config.DoorSetting.INPUT.FtpEnableC": "0",
"Config.DoorSetting.INPUT.HttpEnableA": "0",
"Config.DoorSetting.INPUT.HttpEnableB": "0",
"Config.DoorSetting.INPUT.HttpEnableC": "0",
"Config.DoorSetting.INPUT.SipEnableA": "0",
"Config.DoorSetting.INPUT.SipEnableB": "0",
"Config.DoorSetting.INPUT.SipEnableC": "0",
"Config.DoorSetting.INPUT.SmtpEnableA": "0",
"Config.DoorSetting.INPUT.SmtpEnableB": "0",
"Config.DoorSetting.INPUT.SmtpEnableC": "0",
"Config.DoorSetting.INPUT.ActionUrlA": "",
"Config.DoorSetting.INPUT.ActionUrlB": "",
"Config.DoorSetting.INPUT.ActionUrlC": ""
}
}
Request:
30
HTTP API Manual for Access Control
POST:
{
"target": "input",
"action": "set",
"data" : {
"Config.DoorSetting.INPUT.EnableA": "0"
}
}
Example Return:
{
"retcode": 0,
"action": "set",
"message": "OK"
}
Params Description
InputA Door A GPIO Level
InputB Door B GPIO Level
InputC Door C GPIO Level
The GET or POST method can be used for this function. Example
Request:
GET: /api/input/status
POST:
{
"target": "input",
"action": "status",
}
Example Return:
31
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "status",
"message": "OK",
"data": {
"InputA": 1,
"InputB": 1,
"InputC": 1
}
}
Api publiccode
Params Description
Config.DoorSetting.PASSWORD.PublicKeyEnable Enable Public Code
0: Disable
1: Enable
Config.DoorSetting.PASSWORD.PublicKey1 Public Key 1
Config.DoorSetting.PASSWORD.PublicKey2 Public Key 2
Config.DoorSetting.PASSWORD.PublicKey3 Public Key 3
Config.DoorSetting.PASSWORD.PublicKeyBitsLimit 0 - 8 bit
1 - 4bit
2 - 5bit
3 - 6bit
4 - 7bit
The GET or POST method can be used for this function. Example
Request:
GET: /api/publiccode/get
POST:
{
"target": "publiccode",
"action": "get",
}
32
HTTP API Manual for Access Control
Example Return:
{
"retcode": 0,
"action": "get",
"message": "OK",
"data": {
"Config.DoorSetting.PASSWORD.PublicKeyEnable": "1",
"Config.DoorSetting.PASSWORD.PublicKey1": "33333333",
"Config.DoorSetting.PASSWORD.PublicKey2": "66666666",
"Config.DoorSetting.PASSWORD.PublicKey3": "88888888",
"Config.DoorSetting.PASSWORD.PublicKeyBitsLimit": "0"
}
}
Request:
POST:
{
"target": "publiccode",
"action": "set",
"data" : {
"Config.DoorSetting.PASSWORD.PublicKeyEnable": "0"
}
}
Example Return:
{
"retcode": 0,
"action": "set",
"message": "OK"
}
33
HTTP API Manual for Access Control
Api privatekey
Param Description
ID e.g. “ID”:”1”
Code RF SN
e.g. “Code”:”12345678”
DoorNum 1 : Door A
2 : Door B
3 : Door C
e.g. “DoorNum”: “123”
Mon 0 - Disable
1 - Enable
Tue 0 - Disable
1 - Enable
Wed 0 - Disable
1 - Enable
Thur 0 - Disable
1 - Enable
Fri 0 - Disable
1 - Enable
Sat 0 - Disable
1 - Enable
Sun 0 - Disable
1 - Enable
TimeStart “00:00” - “23:59”
“00:00” - “00:00”: key will always workr
TimeEnd “00:00” - “23:59”
The GET or POST method can be used for this function. Example
Request:
GET: /api/privatekey/get
POST:
{
"target": "privatekey",
"action": "get",
}
34
HTTP API Manual for Access Control
Example Return:
{
"retcode": 0,
"action": "get",
"message": "OK",
"data": {
"num": 2,
"item": [
{
"Code": "12345678",
"DoorNum": "1",
"Fri": "1",
"ID": "1",
"Mon": "1",
"Name": "123456",
"Sat": "1",
"Sun": "1",
"Thur": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00",
"Tue": "1",
"Wed": "1"
},
{
"Code": "78965412",
"DoorNum": "1",
"Fri": "1",
"ID": "2",
"Mon": "1",
"Name": "5555",
"Sat": "1",
"Sun": "1",
"Thur": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00",
"Tue": "1",
"Wed": "1"
}
]
}
}
35
HTTP API Manual for Access Control
Request:
36
HTTP API Manual for Access Control
POST:
{
"target": "privatekey",
"action": "add",
"data" : {
"item": [
{
"Code": "88888888",
"DoorNum": "1",
"Fri": "1",
"ID": "1",
"Mon": "1",
"Name": "Lucy",
"Sat": "1",
"Sun": "1",
"Thur": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00",
"Tue": "1",
"Wed": "1"
},
{
"Code": "66666666",
"DoorNum": "1",
"Fri": "1",
"ID": "2",
"Mon": "1",
"Name": "Carol",
"Sat": "1",
"Sun": "1",
"Thur": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00",
"Tue": "1",
"Wed": "1"
}
]
}
}
Example Return:
37
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "add",
"message": "OK",
"data": {
"num": 2,
"item": [
{
"Code": "88888888",
"ID": "1",
"Name": "Lucy"
},
{
"Code": "66666666",
"ID": "2",
"Name": "Carol"
}
]
}
}
Request:
GET: /api/firmware/upgrade
38
HTTP API Manual for Access Control
POST:
{
"target": "privatekey",
"action": "set",
"data" : {
"item": [
{
"Code": "12345678",
"DoorNum": "0",
"Fri": "1",
"ID": "5",
"Mon": "1",
"Name": "Lucy",
"Sat": "1",
"Sun": "1",
"Thur": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00",
"Tue": "1",
"Wed": "1"
},
{
"Code": "99999999",
"DoorNum": "0",
"Fri": "1",
"ID": "6",
"Mon": "1",
"Name": "Carol",
"Sat": "1",
"Sun": "1",
"Thur": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00",
"Tue": "1",
"Wed": "1"
}
]
}
}
Example Return:
39
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "set",
"message": "OK",
"data": {
"num": 2,
"item": [
{
"Ret": 0,
"Code": "12345678",
"ID": "5",
"Name": "Lucy"
},
{
"Ret": 0,
"Code": "99999999",
"ID": "6",
"Name": "Carol"
}
]
}
}
Request:
40
HTTP API Manual for Access Control
POST:
{
"target": "privatekey",
"action": "del",
"data" : {
"item": [
{
"ID": "7"
},
{
"Code": "66666666"
},
{
"Name": "Carol"
},
{
"ID": "5",
"Code": "88888888",
"Name": "Lucy"
}
]
}
}
Example Return:
41
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "del",
"message": "OK",
"data": {
"num": 4,
"item": [
{
"Ret": 0,
"Code": "88888888",
"ID": "7",
"Name": "Lucy"
},
{
"Ret": 0,
"Code": "66666666",
"ID": "6",
"Name": "Carol"
},
{
"Ret": 0,
"Code": "66666666",
"ID": "8",
"Name": "Carol"
},
{
"Ret": 0,
"Code": "88888888",
"ID": "5",
"Name": "Lucy"
}
]
}
}
The GET or POST method can be used for this function. Example
Request:
42
HTTP API Manual for Access Control
GET: /api/privatekey/clear
POST:
{
"target": "privatekey",
"action": "clear",
}
Example Return:
{
"retcode": 0,
"action": "clear",
"message": "OK"
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/privatekey/export
POST:
{
"target": "privatekey",
"action": "export"
}
Example Return:
Content-Type: application/octet-stream
Content-Disposition: attachment;filename=PrivateKey.xml
43
HTTP API Manual for Access Control
Api rfkey
Param Description
ID e.g. “ID”:”1”
Code RF SN
e.g. “Code”:”12345678”
DoorNum 1 : Door A
2 : Door B
3 : Door C
e.g. “DoorNum”: “123”
Mon 0 - Disable
1 - Enable
Tue 0 - Disable
1 - Enable
Wed 0 - Disable
1 - Enable
Thur 0 - Disable
1 - Enable
Fri 0 - Disable
1 - Enable
Sat 0 - Disable
1 - Enable
Sun 0 - Disable
1 - Enable
TimeStart “00:00” - “23:59”
“00:00” - “00:00”: key will always work
TimeEnd “00:00” - “23:59”
Tags 0: ALLOWED
1: FREQUENCY
2: FROBIDDEN forbidden
3: SCHEDULE
Frequency 0 ~ 65535
DoorWebRelay (Reserved) for WebRelay Action
44
HTTP API Manual for Access Control
The GET or POST method can be used for this function. Example
Request:
GET: /api/rfkey/get
POST:
{
"target": "rfkey",
"action": "get",
Example Return:
45
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "get",
"message": "OK",
"data": {
"num": 2,
"item": [
{
"Code": "00B4161D",
"DoorNum": "0",
"Frequency": "0",
"Fri": "1",
"ID": "1",
"Mon": "1",
"Name": "Lucy",
"Sat": "1",
"Sun": "1",
"Tags": "0",
"Thur": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00",
"Tue": "1",
"Wed": "1"
},
{
"Code": "00B4161E",
"DoorNum": "0",
"Frequency": "0",
"Fri": "1",
"ID": "2",
"Mon": "1",
"Name": "Carol",
"Sat": "1",
"Sun": "1",
"Tags": "0",
"Thur": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00",
"Tue": "1",
"Wed": "1"
}
]
}
}
46
HTTP API Manual for Access Control
Request:
47
HTTP API Manual for Access Control
POST:
{
"target": "rfkey",
"action": "add",
"data" : {
"item": [
{
"ID": "0",
"Name": "Lucy",
"Code": "00B4161D",
"DoorNum": "1",
"Tags": "0",
"Frequency": "0",
"Mon": "1",
"Tue": "1",
"Wed": "1",
"Thur": "1",
"Fri": "1",
"Sat": "1",
"Sun": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00"
},
{
"ID": "0",
"Name": "Carol",
"Code": "00B4161E",
"DoorNum": "1",
"Tags": "0",
"Frequency": "0",
"Mon": "1",
"Tue": "1",
"Wed": "1",
"Thur": "1",
"Fri": "1",
"Sat": "1",
"Sun": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00"
}
]
}
}
48
HTTP API Manual for Access Control
Example Return:
{
"retcode": 0,
"action": "add",
"message": "OK",
"data": {
"num": 2,
"item": [
{
"Ret": 1,
"Code": "00B4161D",
"ID": "1",
"Name": "Lucy"
},
{
"Ret": 2,
"Code": "00B4161E",
"ID": "2",
"Name": "Carol"
}
]
}
}
Request:
49
HTTP API Manual for Access Control
POST:
{
"target": "rfkey",
"action": "set",
"data" : {
"item": [
{
"ID": "1",
"Name": "Lucy",
"Code": "00B4161D",
"DoorNum": "123",
"Tags": "0",
"Frequency": "0",
"Mon": "1",
"Tue": "1",
"Wed": "1",
"Thur": "1",
"Fri": "1",
"Sat": "1",
"Sun": "1",
"TimeEnd": "00:00",
"TimeStart": "00:00"
}
]
}
}
Example Return:
50
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "set",
"message": "OK",
"data": {
"num": 1,
"item": [
{
"Ret": 0,
"Code": "00B4161D",
"ID": "1",
"Name": "Lucy"
}
]
}
}
Request:
51
HTTP API Manual for Access Control
POST:
{
"target": "rfkey",
"action": "del",
"data" : {
"item": [
{
"ID": "1"
},
{
"Name": "Carol"
},
{
"ID": "5",
"Code": "88888888",
"Name": "Lucy"
}
]
}
}
Example Return:
52
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "del",
"message": "OK",
"data": {
"num": 3,
"item": [
{
"Ret": 0,
"Code": "00B4161D",
"ID": "1",
"Name": "Lucy"
},
{
"Ret": 0,
"Code": "00B4161E",
"ID": "2",
"Name": "Carol"
},
{
"Ret": -1,
"Code": "88888888",
"ID": "5",
"Name": "Lucy"
}
]
}
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/rfkey/clear
POST:
{
"target": "rfkey",
"action": "clear",
}
53
HTTP API Manual for Access Control
Example Return:
{
"retcode": 0,
"action": "clear",
"message": "OK"
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/rfkey/export
POST:
{
"target": "rfkey",
"action": "export"
}
Example Return:
Content-Type: application/octet-stream
Content-Disposition: attachment;filename=ICKey.xml
54
HTTP API Manual for Access Control
Api contact
Param Description
ID Index
Name Name
Phone Phone Number
DialType 0 Auto (if phone number is ip, will can with direct
ip, others use register account )
1 Account 1
2 Account 2
Group Group Name
The GET or POST method can be used for this function. Example
Request:
GET: /api/contact/get
POST:
{
"target": "contact",
"action": "get"
}
Example Return:
55
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "get",
"message": "OK",
"data": {
"num": 4,
"item": [
{
"DialType": "0",
"Group": "",
"ID": "2",
"Name": "Carol",
"Phone": "112"
},
{
"DialType": "0",
"Group": "FLOOR-1",
"ID": "3",
"Name": "Feya",
"Phone": "124"
},
{
"DialType": "0",
"Group": "FLOOR-0",
"ID": "4",
"Name": "Justa",
"Phone": "110"
},
{
"DialType": "0",
"Group": "",
"ID": "1",
"Name": "Lucy",
"Phone": "123"
}
]
}
}
56
HTTP API Manual for Access Control
57
HTTP API Manual for Access Control
Example Request:
POST:
{
"target": "contact",
"action": "add",
"data": {
"num": 6,
"item": [
{
"DialType": "0",
"Group": "",
"ID": "0",
"Name": "Carol",
"Phone": "115"
},
{
"DialType": "0",
"Group": "",
"ID": "0",
"Name": "Eric",
"Phone": "115"
},
{
"DialType": "0",
"Group": "FLOOR-1",
"ID": "0",
"Name": "Feya",
"Phone": "126"
},
{
"DialType": "0",
"Group": "FLOOR-1",
"ID": "0",
"Name": "Leaf",
"Phone": "126"
},
58
HTTP API Manual for Access Control
{
"DialType": "0",
"Group": "",
"ID": "0",
"Name": "Lucy",
"Phone": "115"
},
{
"DialType": "0",
"Group": "FLOOR-1",
"ID": "0",
"Name": "Tony",
"Phone": "126"
}
]
}
}
Example Return:
{
"retcode": 0,
"action": "add",
"message": "OK",
"data": {
"num": 6,
"item": [
{
"Ret": 0,
"ID": "74",
"Name": "Carol",
"Phone": "115"
},
{
"Ret": 0,
"ID": "75",
"Name": "Eric",
"Phone": "115"
},
{
"Ret": 0,
"ID": "76",
59
HTTP API Manual for Access Control
"Name": "Feya",
"Phone": "126"
},
{
"Ret": 0,
"ID": "77",
"Name": "Leaf",
"Phone": "126"
},
{
"Ret": 0,
"ID": "78",
"Name": "Lucy",
"Phone": "115"
},
{
"Ret": 0,
"ID": "79",
"Name": "Tony",
"Phone": "126"
}
]
}
}
Request:
60
HTTP API Manual for Access Control
POST:
{
"target": "contact",
"action": "set",
"data": {
"item": [
{
"ID": "1",
"Name": "Eric",
"Phone": "118",
"DialType": "0",
"Group": ""
},
{
"ID": "2",
"Name": "Tony",
"Phone": "116",
"DialType": "0",
"Group": "FLOOR-1"
}
]
}
}
Example Return:
61
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "set",
"message": "OK",
"data": {
"num": 2,
"item": [
{
"Ret": 0,
"ID": "1",
"Name": "Eric",
"Phone": "118"
},
{
"Ret": 0,
"ID": "2",
"Name": "Tony",
"Phone": "116"
}
]
}
}
Request:
62
HTTP API Manual for Access Control
POST:
{
"target": "contact",
"action": "del",
"data": {
"item": [
{
"Name": "Carol"
},
{
"ID": "26"
},
{
"Phone": "126"
}
]
}
}
Example Return:
63
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "del",
"message": "OK",
"data": {
"num": 3,
"item": [
{
"Ret": 0,
"ID": "25",
"Name": "Carol",
"Phone": "115"
},
{
"Ret": 0,
"ID": "26",
"Name": "Eric",
"Phone": "115"
},
{
"Ret": 0,
"ID": "27",
"Name": "Feya",
"Phone": "126"
}
]
}
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/contact/clear
POST:
{
"target": "contact",
"action": "clear"
}
64
HTTP API Manual for Access Control
Example Return:
{
"retcode": 0
"action": "clear",
"message": "OK",
}
Param Description
filetype option param, default type csv
csv: csv file
xml: xml file
vcf: vcf file
Note: if contact is empty, it will return failed
The GET or POST method can be used for this function. Example
Request:
GET: /api/contact/export?filetype=csv
POST:
{
"target": "contact",
"action": "export",
"data": {
"filetype":"csv"
}
}
Example Return:
succeed: send csv file
failed:
{
"retcode": -1,
"action": "export",
"message": "Export Failed."
}
65
HTTP API Manual for Access Control
Request&Return:
Api group
Param Description
ID Index
Name Group Name
The GET or POST method can be used for this function. Example
Request:
GET: /api/group/get
POST:
{
"target": "group",
"action": "get",
}
Example Return:
66
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "get",
"message": "OK",
"data": {
"num": 1,
"item": [
{
"ID": "12",
"Name": "FLOOR-1"
}
]
}
}
Request:
POST:
{
"target": "group",
"action": "add",
"data" : {
"item": [
{
"ID": "0",
"Name": "FLOOR2"
}
]
}
}
Example Return:
67
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "add",
"message": "OK",
"data": {
"num": 1,
"item": [
{
"Ret": 0,
"ID": "13",
"Name": "FLOOR2"
}
]
}
}
Request:
POST:
{
"target": "group",
"action": "set",
"data" : {
"item": [
{
"ID": "13",
"Name": "FLOOR-402"
}
]
}
}
Example Return:
68
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "set",
"message": "OK",
"data": {
"num": 1,
"item": [
{
"Ret": 0,
"ID": "13",
"Name": "FLOOR-402"
}
]
}
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/contact/clear group
POST:
{
"target": "contact", group
"action": "clear"
}
Example Return:
{
"action": "clear",
"message": "OK",
"retcode": 0
}
69
HTTP API Manual for Access Control
The GET or POST method can be used for this function. Example
Request:
GET: /api/call/status
POST:
{
"target": "call",
"action": "status"
}
Example Return:
{
"retcode": 0,
"action": "status",
"message": "OK",
"data": {
"Status": "READY"
}
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/call/dial?Phone=192.168.1.58&DisplayName=Justa
70
HTTP API Manual for Access Control
POST:
{
"target": "call",
"action": "dial",
"data" : {
"Phone": "192.168.1.58",
"DisplayName": "Justa"
}
}
Example Return:
{
"retcode": 0,
"action": "dial",
"message": "OK"
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/call/hangup
POST:
{
"target": "call",
"action": "hangup",
}
Example Return:
{
"retcode": 0,
"action": "hangup",
"message": "OK"
}
71
HTTP API Manual for Access Control
Api sip
Param Description
Account 1
Config.Account1.GENERAL.Enable 0 Disable
1 Enable
Config.Account1.SIP.Server SIP Server
Ex:192.168.1.115
Config.Account1.SIP.Port SIP Server Port
Ex:5060
Config.Account1.GENERAL.AuthName Sip Server Auth Name
Config.Account1.GENERAL.UserName Sip Server Register Name
Config.Account1.GENERAL.Pwd Sip Server Password
Config.Account1.GENERAL.DisplayName Remote Display Name
Account 2
Config.Account2.GENERAL.Enable 0 Disable
1 Enable
Config.Account2.SIP.Server SIP Server
Ex:192.168.1.115
Config.Account2.SIP.Port SIP Server Port
Ex:5060
Config.Account2.GENERAL.AuthName Sip Server Auth Name
Config.Account2.GENERAL.UserName Sip Server Register Name
Config.Account2.GENERAL.Pwd Sip Server Password
Config.Account2.GENERAL.DisplayName Remote Display Name
The GET or POST method can be used for this function. Example
Request:
GET: /api/sip/get
POST:
{
"target": "sip",
"action": "get"
}
Example Return:
72
HTTP API Manual for Access Control
{
"retcode": 0, "action": "get",
"message": "OK", "data": {
"Config.Account1.ANONYMOUS_CALL.Enable": "0",
"Config.Account1.ANONYMOUS_CALL.OffCode": "",
"Config.Account1.ANONYMOUS_CALL.OnCode": "",
"Config.Account1.ANONYMOUS_CALL.PrivacyHeaderValue": "id",
"Config.Account1.AUTO_ANSWER.Enable": "1",
"Config.Account1.GENERAL.AuthName": "",
"Config.Account1.GENERAL.DisplayName": "",
"Config.Account1.GENERAL.EditEnable": "",
"Config.Account1.GENERAL.Enable": "0", "Config.Account1.GENERAL.Label":
"", "Config.Account1.GENERAL.Pwd": "",
"Config.Account1.GENERAL.UserAgent": "",
"Config.Account1.GENERAL.UserName": "", "Config.Account1.NAT.Rport": "0",
"Config.Account1.NAT.UdpKeepEnable": "1",
"Config.Account1.NAT.UdpKeepInterval": "30",
"Config.Account1.OUTPROXY.BakPort": "5060",
"Config.Account1.OUTPROXY.BakServer": "",
"Config.Account1.OUTPROXY.DHCPOption": "0",
"Config.Account1.OUTPROXY.Enable": "0",
"Config.Account1.OUTPROXY.Port": "5060",
"Config.Account1.OUTPROXY.Server": "",
"Config.Account1.REJECT_ANONYMOUSCALL.Enable": "0",
"Config.Account1.REJECT_ANONYMOUSCALL.OffCode": "",
"Config.Account1.REJECT_ANONYMOUSCALL.OnCode": "",
"Config.Account1.SIP.ListenPortMax": "5062",
"Config.Account1.SIP.ListenPortMin": "5062",
"Config.Account1.SIP.Port": "5060",
"Config.Account1.SIP.Port2": "5060",
"Config.Account1.SIP.Server": "",
"Config.Account1.SIP.Server2": "",
"Config.Account1.SIP.TransType": "0",
"Config.Account1.STUN.Enable": "0",
"Config.Account1.STUN.Port": "3478",
"Config.Account1.STUN.Server": "",
"Config.Account2.ANONYMOUS_CALL.Enable": "0",
"Config.Account2.ANONYMOUS_CALL.OffCode": "",
"Config.Account2.ANONYMOUS_CALL.OnCode": "",
73
HTTP API Manual for Access Control
"Config.Account2.ANONYMOUS_CALL.PrivacyHeaderValue": "id",
"Config.Account2.AUTO_ANSWER.Enable": "1",
"Config.Account2.GENERAL.AuthName": "",
"Config.Account2.GENERAL.DisplayName": "",
"Config.Account2.GENERAL.EditEnable": "",
"Config.Account2.GENERAL.Enable": "0", "Config.Account2.GENERAL.Label":
"", "Config.Account2.GENERAL.Pwd": "",
"Config.Account2.GENERAL.UserAgent": "",
"Config.Account2.GENERAL.UserName": "", "Config.Account2.NAT.Rport": "0",
"Config.Account2.NAT.UdpKeepEnable": "1",
"Config.Account2.NAT.UdpKeepInterval": "30",
"Config.Account2.OUTPROXY.BakPort": "5060",
"Config.Account2.OUTPROXY.BakServer": "",
"Config.Account2.OUTPROXY.DHCPOption": "0",
"Config.Account2.OUTPROXY.Enable": "0",
"Config.Account2.OUTPROXY.Port": "5060",
"Config.Account2.OUTPROXY.Server": "",
"Config.Account2.REJECT_ANONYMOUSCALL.Enable": "0",
"Config.Account2.REJECT_ANONYMOUSCALL.OffCode": "",
"Config.Account2.REJECT_ANONYMOUSCALL.OnCode": "",
"Config.Account2.SIP.ListenPortMax": "5063",
"Config.Account2.SIP.ListenPortMin": "5063",
"Config.Account2.SIP.Port": "5060",
"Config.Account2.SIP.Port2": "5060",
"Config.Account2.SIP.Server": "",
"Config.Account2.SIP.Server2": "",
"Config.Account2.SIP.TransType": "0",
"Config.Account2.STUN.Enable": "0",
"Config.Account2.STUN.Port": "3478",
"Config.Account2.STUN.Server": ""
}
}
Request:
74
HTTP API Manual for Access Control
POST:
{
"target": "sip",
"action": "set",
"data" : {
"Config.Account1.GENERAL.AuthName" : "130",
"Config.Account1.GENERAL.DisplayName": "130",
"Config.Account1.GENERAL.Enable": "1",
"Config.Account1.GENERAL.Label": "130",
"Config.Account1.GENERAL.Pwd": "130",
"Config.Account1.GENERAL.UserName":"130",
"Config.Account1.SIP.Port":"5060",
"Config.Account1.SIP.Server": "192.168.1.115"
}
}
Example Return:
{
"retcode": 0,
"action": "set",
"message": "OK"
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/sip/status
POST:
{
"target": "sip",
"action": "status",
}
Example Return:
75
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "status",
"message": "OK",
"data": {
"Account1": {
"UserName": "130",
"SipServer": "192.168.1.115",
"Status": "2"
},
"Account2": {
"UserName": "",
"SipServer": "",
"Status": "0"
}
}
}
Api dialreplace
Param Description
ID ID
Prefix number
Line 0 Auto
1 Account 1
2 Account 2
Replace1 number
Replace2 number
Replace3 number
Replace4 number
Replace5 number
The GET or POST method can be used for this function. Example
Request:
GET: /api/dialreplace/get
76
HTTP API Manual for Access Control
POST:
{
"target": "dialreplace",
"action": "get"
}
Example Return:
{
"retcode": 0,
"action": "get",
"message": "OK",
"data": {
"num": 1,
"item": [
{
"ID": "1",
"Line": "0",
"Prefix": "110",
"Replace1": "192.168.2.1",
"Replace2": "192.168.2.4",
"Replace3": "192.168.2.2",
"Replace4": "192.168.2.5",
"Replace5": "192.168.2.3"
}
]
}
}
Request:
77
HTTP API Manual for Access Control
POST:
{
"target": "dialreplace",
"action": "add",
"data" : {
"item": [
{
"ID": "1",
"Line": "0",
"Prefix" : "110",
"Replace1": "192.168.2.1",
"Replace2": "192.168.2.4",
"Replace3": "192.168.2.2",
"Replace4": "192.168.2.5",
"Replace5": "192.168.2.3"
}
]
}
}
Example Return:
{
"retcode": 0,
"action": "add",
"message": "OK",
"data": {
"num": 1,
"item": [
{
"Ret": 0,
"ID": "1",
"Prefix": "110"
}
]
}
}
78
HTTP API Manual for Access Control
Example Request:
POST:
{
"target": "dialreplace",
"action": "set",
"data" : {
"item": [
{
"ID": "1",
"Line": "0",
"Prefix" : "110",
"Replace1": "192.168.2.1",
"Replace2": "192.168.2.4",
"Replace3": "192.168.2.2",
"Replace4": "192.168.2.5",
"Replace5": "192.168.2.3"
}
]
}
}
Example Return:
{
"retcode": 0,
"action": "set",
"message": "OK",
"data": {
"num": 1,
"item": [
{
"Ret": 0,
"ID": "1",
"Prefix": "110"
}
]
}
}
79
HTTP API Manual for Access Control
Example Request:
POST:
{
"target": "dialreplace",
"action": "del",
"data" : {
"item": [
{
"ID": "1"
}
]
}
}
Example Return:
{
"retcode": 0,
"action": "del",
"message": "OK",
"data": {
"num": 1,
"item": [
{
"Ret": 0,
"ID": "1"
}
]
}
}
Example Request:
GET: /api/dialreplace/clear
POST:
{
"target": "dialreplace",
"action": "clear",
}
80
HTTP API Manual for Access Control
Example Return:
{
"retcode": 0,
"action": "clear",
"message": "OK"
}
Example Request:
GET: /api/dialreplace/export
POST:
{
"target": "dialreplace",
"action": "export",
}
Example Return:
DialReplace.xml
Request&Return::
81
HTTP API Manual for Access Control
Api log
Param Description
Config.Settings.LOGLEVEL.Level log debug level
0 LOG_LEVEL_EMERG
1 LOG_LEVEL_ALERT
2 LOG_LEVEL_CRIT
3 LOG_LEVEL_ERR
4 LOG_LEVEL_WARNING
5 LOG_LEVEL_NOTICE
6 LOG_LEVEL_INFO
7 LOG_LEVEL_DEBUG
The GET or POST method can be used for this function. Example
Request:
GET: /api/log/get
POST:
{
"target": "log",
"action": "get",
}
Example Return:
{
"retcode": 0,
"action": "get",
"message": "OK",
"data": {
"Config.Settings.LOGLEVEL.Level": "3"
}
}
82
HTTP API Manual for Access Control
Request:
POST:
{
"target": "log",
"action": "set",
"data" : {
"Config.Settings.LOGLEVEL.Level": "7"
}
}
Example Return:
{
"retcode": 0,
"action": "get",
"message": "OK",
"data": {
"Config.Settings.LOGLEVEL.Level": "7"
}
}
Param Description
type export log type
log : default , application log(Android logcat or
Linux syslog)
kmsg: kernel log
log_debug: support android only
Example Request:
GET: /api/log/export?type=log
83
HTTP API Manual for Access Control
POST:
{
"target": "log",
"action": "export",
"data" : {
"type" : "log"
}
}
Example Return:
log.txt
kmsg.txt
log_debug.tar.gz
Param Description
type export log type
log : default , application log(Android logcat or
Linux syslog)
kmsg: kernel log
log_debug: support android only
Example Request:
GET: /api/log/clear?type=kmsg
POST:
{
"target": "log",
"action": "clear",
"data" : {
"type" : "kmsg"
}
}
Example Return:
84
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "clear",
"message": "OK"
}
Api calllog
Param Description
ID
Type 0 "All",
1 "Dialed",
2 "Received",
3 "Missed",
4 "Forwarded",
5 "Unknow",
Date
Time
Local Identity Sip Server
Name Remote DisplayName
Number Call Num
Param Description
Type Optional , Default “All”
0 "All",
1 "Dialed",
2 "Received",
3 "Missed",
4 "Forwarded",
5 "Unknow",
Example Request:
GET: /api/calllog/get
85
HTTP API Manual for Access Control
POST:
{
"target": "calllog",
"action": "get"
}
Example Return:
{
"retcode": 0,
"action": "get",
"message": "OK",
"data": {
"num": 1,
"item": [
{
"Date": "2018-12-13",
"ID": "23",
"LocalIdentity": "[email protected]",
"Name": "192.168.1.48",
"Num": "[email protected]",
"Time": "05:55:59",
"Type": "Received"
}
]
}
}
Param Description
ID string, index
Request:
86
HTTP API Manual for Access Control
POST:
{
"target": "calllog",
"action": "del",
"data" : {
"ID" : "23"
}
}
Example Return:
{
"retcode": 0,
"action": "del",
"message": "OK"
}
Param Description
Type string
0 "All",
1 "Dialed",
2 "Received",
3 "Missed",
4 "Forwarded",
5 "Unknow",
The GET or POST method can be used for this function. Example
Request:
GET: /api/calllog/clear?type=Missed
87
HTTP API Manual for Access Control
POST:
{
"target": "calllog",
"action": "clear",
"data" : {
"Type" : "Missed"
}
}
Example Return:
{
"retcode": 0,
"action": "upgrade",
"message": "OK"
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/calllog/export
POST:
{
"target": "calllog",
"action": "export",
}
Example Return:
History.csv
88
HTTP API Manual for Access Control
Api doorlog
Param Description
ID
Type 0 “Unknow”,
1 "Card",
2 "Password",
3 "Public",
4 "Face",
Name
Status 0 Success
1 Failed
Code
Date
Time
The GET or POST method can be used for this function. Example
Request:
GET: /api/fe/upgrade /api/doorlog/get
POST:
{
"target": "doorlog",
"action": "get"
}
Example Return:
{
"retcode": 0,
"action": "upgrade",
"message": "OK"
}
89
HTTP API Manual for Access Control
Param Description
ID string, index
Request:
POST:
{
"target": "calllog",
"action": "del",
"data" : {
"ID" : "1"
}
}
Example Return:
{
"retcode": 0,
"action": "del",
"message": "OK"
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/doorlog/clear
POST:
{
"target": "doorlog",
"action": "clear",
}
Example Return:
90
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "clear",
"message": "OK"
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/calllog/export doorlog
POST:
{
"target": "calllog", doorlog
"action": "export",
}
Example Return:
DoorLog.xml
The GET or POST method can be used for this function. Example
Request:
GET: /api/pcap/status
POST:
{
"target": "pcap",
"action": "status"
}
Example Return:
91
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "status",
"message": "OK",
"data": {
"FileSize": 0,
"Status": "stop"
}
}
Param Description
type capature type, optional
auto auto stop (capture 60 second)
manual
filter pcap filter type, optional
more info see libpcap
default: “ip”
time capture time 1-180 , optional
default 60 second
only work on type == auto
size optional capture limit size, when reach size
limit it will auto stop
default: 1048576
The GET or POST method can be used for this function. Example
Request:
GET: /api//api/pcap/start
92
HTTP API Manual for Access Control
POST:
{
"target": "pcap",
"action": "start",
"data" : {
"type" : "auto",
"filter" : "ip",
"time": "180",
"size": "1048576"
}
}
Example Return:
{
"retcode": 0,
"action": "start",
"message": "OK",
"data": {
"filter": "ip",
"interface": "eth0",
"size": "1048576",
"time": "180",
"type": "auto"
}
}
The GET or POST method can be used for this function. Example
Request:
GET: /api/pcap/stop
POST:
{
"target": "pcap",
"action": "stop"
}
Example Return:
93
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "stop",
"message": "OK",
"data": {
"FileSize": "314407",
"Time": "9"
}
}
Request:
GET: /api/pcap/export
Example Return:
phone.pcap
The GET or POST method can be used for this function. Example
Request:
POST:
{
"target": "user",
"action": "info"
}
Example Return:
94
HTTP API Manual for Access Control
{
"retcode": 0,
"action": "info",
"message":"OK",
"data": {
"DefaultUserId": 1
}
The GET or POST method can be used for this function. Example
Request:
POST:
{
"target": "user",
"action": "get"
"data": {
"SourceType" : "All"
}
95
HTTP API Manual for Access Control
Example Return:
"retcode": 0, "action":
"info",
"message":"OK", "data": {
"num": 1,
"item": [
{
"CardCode":
"2222",
"FaceUrl": "",
"ID": "2",
"LiftFloorNum":
"1;2",
"Name": "1111",
"PrivatePIN":
"2222",
"ScheduleRelay":
"1001-1",
"SourceType":
"1",
"Type": "0",
"UserID": "2",
"WebRelay": "1"
}
]
}
96
HTTP API Manual for Access Control
The GET or POST method can be used for this function. Example
Request:
POST:
{
"target": "user",
"action": "add"
"data": {
"item": [
{
"UserID": "2",
"CardCode":
"2222",
"FaceUrl": "",
"ID": "2",
"LiftFloorNum":
"1;2",
"Name":
"1111",
"PrivatePIN":
"2222",
"ScheduleRela
y": "1001-1",
"Type": "0",
"WebRelay":
"1"
}
]
}
}
97
HTTP API Manual for Access Control
Example Return:
{
"retcode": 1,
"action": "add",
"message": "OK"
}
Request:
POST:
{
"target": "user",
"action": "set"
"data": {
"item": [
{
"UserID": "5",
"CardCode":
"4321",
"FaceUrl": "",
"ID": "5",
"LiftFloorNum":
"1",
"Name":
"4321",
"PrivatePIN":
"44",
"ScheduleRela
y": "1001-1",
"Type": "0",
"WebRelay":
"1"
}
]
}
} 98
HTTP API Manual for Access Control
Example Return:
{
"retcode": 1,
"action": "set",
"message": "OK"
}
Request:
POST:
{
"target": "user",
"action": "scan"
}
Example Return:
"retcode": 0,
"action": "scam",
"message": "OK"
"data": {
"RFCode":
"99D78D72"
}
99
HTTP API Manual for Access Control
Request:
POST:
{
"target": "user",
"action": "del"
"data": {
"item": [
{
"ID": "4",
}
]
}
}
Example Return:
"retcode": 1,
"action": "del",
"message": "OK"
}
}
100
HTTP API Manual for Access Control
The GET or POST method can be used for this function. Example
Request:
POST:
{
"target": "user",
"action": "clear",
}
Example Return:
{
"retcode": 0,
"action":"clear",
"message":"OK",
The GET or POST method can be used for this function. Example
Request:
101
HTTP API Manual for Access Control
POST:
{
"target": "user",
"action": "export"
}
Example Return:
"retcode": 0,
"action": "export",
"message":"OK",
"data": {
"address":
"/download/UserData.tgz
"
}
Request:
POST:
{
Download UserData.tgz
http://device IP/download/UserData.tgz
http://another device IP /api/user/import
102
HTTP API Manual for Access Control
Example Return:
"retcode": 0,
"action": "import",
"message":"OK",
"data": {}
}
103