All requests to the server are sent by the POST method. The response headers containt Cookie. They have to be transmitted in all the subsequent requests.
An array of [] objects of following type is transferred within the request body
The example of request:
{ "jsonrpc":"2.0", "method":"Api_GetAppVersion", -- the method name "params":{}, -- Object with parameters "id":1515659482430 - request identifier (it can be any random number) }
If the request contains an array of several objects, then corresponding response will also contain an array. If the request contains an array of just one object, then corresponding response will return one object instead, not an array.
Note: the letter case and the type of parameters matters.
The response example:
{ "jsonrpc":"2.0", "id":1515659482430, -- identifier specified in request "result":{ "success":true, -- result (Boolean value) "data":"2.0.0" -- data (string, array, object) } }
The response may be returned with an error. Errors are divided into two categories.
{ "jsonrpc":"2.0", "id":1515660273515, "error":{ "code":6000, "message":"Invalid parameters", "data":{ "errors":[ { "code":"required_field", "message":"Mandatory parameter is not passed or it is empty", "object_name":"Test" } ] } } }
{ "jsonrpc":"2.0", "id":1515660902722, "result":{ "success":false, "error":{ "code":-203, "msg":"Duplicate entry" }, "data":null } }
Get the application version:
curl -b cookie.txt -c cookie.txt -X POST -k -i 'https://192.168.1.123/api/jsonrpc' --data '[{"jsonrpc":"2.0","method":"Api_GetAppVersion","params":{},"id":1563436495288}]'
Make authorization:
curl -b cookie.txt -c cookie.txt -X POST -k -i 'https://192.168.1.123/api/jsonrpc' --data '[{"jsonrpc":"2.0","method":"Api_Login","params":{"username":"admin","password":"vasexperts","remember":t rue},"id":1563438645838}]'
Get DPI configuration file:
curl -b cookie.txt -c cookie.txt -X POST -k -i 'https://192.168.1.123/api/jsonrpc' --data '[{"jsonrpc":"2.0","method":"Api_GetDpiConfig","params":{"Id":1},"id":1563448913831}]'
Displays the application version.
There are no parameters.
The request example:
[{ "jsonrpc":"2.0", "method":"Api_GetAppVersion", "params":{}, "id":1515659482430 }]
The response example:
{ "jsonrpc":"2.0", "id":1515659482430, "result":{ "success":true, "data":"2.0.0" } }
Outputs dictionaries.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDics", "params":{}, "id":1515921551526 } ]
The response example:
{ "jsonrpc":"2.0", "id":1515921551526, "result":{ "success":true, "data":{ "RolesDic":{ "1":{ "dic_id":"1", "value":"Administrator" } }, "HardwaresDic":{ "1":{ "dic_id":"1", "value":"Test bed. 34", "ip":"x.x.x.x", "port":"22", "login":"dpisu" }, "2":{ "dic_id":"2", "value":"Operational test bed .83 !", "ip":"y.y.y.y", "port":"22", "login":"dpisu" } } } } }
Checks and displays the result: whether the user is authorized or not.
There are no parameters.
The request example:
[ { "jsonrpc":"2.0", "method":"Api_Auth", "params":{ }, "id":1515661809137 } ]
The response example in case the user is not authorized:
{ "jsonrpc":"2.0", "id":1515661809137, "error":{ "code":7000, "message":"Unauthorized" } }
The response example in case the user is authorized:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data":{ "username":"admin" } } }
Authorizes the user.
Parameters:
The request example
[ { "jsonrpc":"2.0", "method":"Api_Login", "params":{ "username":"admin", "password":"vasexperts", "remember":true }, "id":1515662219320 } ]
The example of a successful response:
{ "jsonrpc":"2.0", "id":1515662219320, "result":{ "success":true, "data":{ "username":"admin" } } }
The example of a response if something's gone wrong:
{ "jsonrpc":"2.0", "id":1515662233320, "result":{ "success":false, "error":{ "code":404, "msg":"Invalid credentials" }, "data":null } }
If the authorization is successfully completed, cookies will be are transmitted in the response headers. They must be transmitted in all subsequent requests.
Deauthorizes the current user.
There are no parameters.
The request example:
[ { "jsonrpc":"2.0", "method":"Api_Logout", "params":{ }, "id":1515662234646 } ]
Displays the user profile.
There are no parameters.
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetMyProfile", "params":{ }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "user_id": "1", "username": "admin", "name": "Strogiy S.S.", "email": "email@email.ru", "phone": "2-2-2", "company": "VasExpert", "position": "Administrator" } } }
The user profile editing.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_SaveMyProfile", "params":{ "MyProfile":{ "user_id": "1", "username": "admin", "name": "Strogiy S.S.", "email": "email@email.ru", "phone": "2-2-2", "company": "VasExpert", "position": "Administrator" } }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "user_id": "1", "username": "admin", "name": "Strogiy S.S.", "email": "email@email.ru", "phone": "2-2-2", "company": "VasExpert", "position": "Administrator" } } }
The user password changing.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_SaveMyProfile", "params":{ "OldPassword":"vasexperts", "NewPassword":"vasexperts1" }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "user_id": "1", "username": "admin", "name": "Strogiy S.S.", "email": "email@email.ru", "phone": "2-2-2", "company": "VasExpert", "position": "Administrator", "password": "$2y$10$t/PdsQVXr927wyunbdET1.EHtuxTBg4iKmtHlJ4jfmU0XR4qPUANu" } } }
Allows to get list of users.
Parameters:
The request example using the user identifier:
[ { "jsonrpc":"2.0", "method":"Api_GetUsers", "params":{ "Id":1 }, "id":1515661809137 } ]
The example of successful response to request containing the user identifier:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "user_id": "1", "username": "admin", "name": "Strogiy S.S.", "email": "email@email.ru", "phone": "2-2-2", "company": "VasExpert", "position": "Administrator", "role_sections": "hardware.read,hardware.write,..." } } }
The example of successful response to request without parameters:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": [ { "user_id": "1", "username": "admin", "name": "Strogiy S.S.", "email": "email@email.ru", "phone": "2-2-2", "company": "VasExpert", "position": "Administrator", "role_sections": "hardware.read,hardware.write,..." }, ... ] } }
Create/modify the user data.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_SaveUser", "params":{ "user":{ "user_id": "1", "username": "admin", "name": "Strogiy S.S.", "email": "email@email.ru", "phone": "2-2-2", "company": "VasExpert", "position": "Administrator", "password":"vasexperts", "role": "1", "role_sections": "hardware.read,hardware.write,..." } }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "user_id": "1", "username": "admin", "name": "Strogiy S.S.", "email": "email@email.ru", "phone": "2-2-2", "company": "VasExpert", "position": "Administrator", "password": "$2y$10$rxlWVJdRybSf9N6nAQE9j.i2LrSTbpGzoiDwsVVsAP9OQ5vDY0uhu" } } }
Deletes the user.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_DeleteUser", "params":{ "user":{ "user_id": "2", "username": "admin", "name": "Strogiy S.S.", "email": "email@email.ru", "phone": "2-2-2", "company": "VasExpert", "position": "Administrator", "password":"vasexperts", "role": "1", "role_sections": "hardware.read,hardware.write,..." } }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Allows to get a list of users.
Parameters:
The example of request with the role ID:
[ { "jsonrpc":"2.0", "method":"Api_GetRoles", "params":{ "Id":1 }, "id":1515661809137 } ]
The example of successful response to request containing the role ID:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": [ { "role_id": "1", "role": "Администратор", "sections": "hardware.read,hardware.write,..." } ] } }
The example of a successful response to a request without parameters:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": [ { "role_id": "1", "role": "Administrator", "sections": "hardware.read,hardware.write,..." }, ... ] } }
Creating/modifying the role data.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_SaveRole", "params":{ "role":{ "role_id": "1", "role": "Administrator", "sections": "hardware.read,hardware.write,..." } }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "role_id": "1", "role": "Administrator", "sections": "hardware.read,hardware.write,..." } } }
Deleting a role.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_DeleteRole", "params":{ "role":{ "role_id": "1", "role": "Administrator", "sections": "hardware.read,hardware.write,..." } }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Get the list of equipments.
Parameters:
The request using the hardware identifier example:
[ { "jsonrpc":"2.0", "method":"Api_GetHardwares", "params":{ "Id":1 }, "id":1515661809137 } ]
Example of a successful response to a request with a hardware identifier:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": [ { "hardware_id": "1", "name": "Test bed. 34", "ip": "188.227.73.34", "port": "22", "login": "admin", "password": "vasexperts", "ssl_key": "", "sudocheck": "1", "load_cs": 0, "port_cs": "1500", "protocol_cs": "udp", "ip_cs": "217.71.228.148", "status_cs": 0 } ] } }
The example of successful response to the request without parameters:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": [ { "hardware_id": "1", "name": "Test bed. 34", "ip": "188.227.73.34", "port": "22", "login": "admin", "password": "vasexperts", "ssl_key": "", "sudocheck": "1", "load_cs": 0, "port_cs": "1500", "protocol_cs": "udp", "ip_cs": "217.71.228.148", "status_cs": 0 }, ... ] } }
Creation/modification of the equipment data.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_SaveHardware", "params":{ "hardware":{ "hardware_id": "1", "name": "Test bed. 34", "ip": "188.227.73.34", "port": "22", "login": "admin", "password": "vasexperts", "ssl_key": "", "sudocheck": "1", "load_cs": 0, "port_cs": "1500", "protocol_cs": "udp", "ip_cs": "217.71.228.148", "status_cs": 0 } }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "hardware_id": "1", "name": "Test bed. 34", "ip": "188.227.73.34", "port": "22", "login": "admin", "password": "vasexperts", "ssl_key": "", "sudocheck": "1", "load_cs": 0, "port_cs": "1500", "protocol_cs": "udp", "ip_cs": "217.71.228.148", "status_cs": 0 } } }
Equipment removal.
Параметры:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_DeleteRole", "params":{ "hardware":{ "hardware_id": "1", "name": "Test bed. 34", "ip": "188.227.73.34", "port": "22", "login": "admin", "password": "vasexperts", "ssl_key": "", "sudocheck": "1", "load_cs": 0, "port_cs": "1500", "protocol_cs": "udp", "ip_cs": "217.71.228.148", "status_cs": 0 } }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Equipment restart.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_RestartHardware", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
On-the-fly parameters updating.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_ReloadHardware", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Equipment availability test.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_TestConnectToHardware", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Get the DPI equipment configuration.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDpiConfig", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data":"string:content" } }
Validation of the DPI equipment configuration.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_ValidateDpiConfig", "params":{ "Id":1, "Config":"string:content" }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data":"FastDPI 7.4 Minsk (Dec 12 2017) : Check configuration '/tmp/dpi/fastdpi.conf' : \n\nResult check configuration : SUCCESS\n" } }
Setting DPI configuration to the equipment.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_SetDpiConfig", "params":{ "Id":1, "Config":"string:content" }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Getting the history of DPI configurations on the hardware.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDpiConfigHistory", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": [ "2015.03.22.03.26.12.000000.fastdpi.conf", "2015.03.22.03.26.22.000000.fastdpi.conf", "2015.03.22.19.03.53.000000.fastdpi.conf", "2015.03.22.19.44.35.000000.fastdpi.conf", "2015.03.23.01.30.11.000000.fastdpi.conf", "2015.03.23.01.31.26.000000.fastdpi.conf", ... ] } }
Get the content of DPI configuration file.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDpiConfigFile", "params":{ "Id":1, "File":"2015.03.22.03.26.12.000000.fastdpi.conf" }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": "string:content" } }
To get the DPI equipment information.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDpiInfo", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "FastDPI": "FastDPI 7.4 Minsk (Dec 12 2017)", "Architecture": "x86_64", "CPU op-mode(s)": "32-bit, 64-bit", "Byte Order": "Little Endian", "CPU(s)": "8", "On-line CPU(s) list": "0-7", "Thread(s) per core": "2", "Core(s) per socket": "4", "Socket(s)": "1", "NUMA node(s)": "1", "Vendor ID": "GenuineIntel", "CPU family": "6", "Model": "58", "Stepping": "9", "CPU MHz": "3392.160", "BogoMIPS": "6784.32", "Virtualization": "VT-x", "L1d cache": "32K", "L1i cache": "32K", "L2 cache": "256K", "L3 cache": "8192K", "NUMA node0 CPU(s)": "0-7" } } }
To get information about the current state of equipment performance.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDpiResourcesUsageTick", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "cpus_info": null, "cpus_usage": { "stat_key": 1, "us": 0.40000000000000002, "sy": 3.5, "ni": 0, "idle": 95.299999999999997, "wa": 0.69999999999999996, "hi": 0, "si": 0, "st": 0, "date": "2018.01.13 10:43:03" }, "mem_usage": { "stat_key": 2, "total": 8030376000, "used": 2301548000, "free": 5728828000, "buffers": 138556000, "date": "2018.01.13 10:43:03" }, "swap_usage": { "stat_key": 2, "total": 2097144000, "used": 42040000, "free": 2055104000, "cached": 795280000, "date": "2018.01.13 10:43:03" }, "top_processes": [ { "pid": "23650", "virt": "10.0g", "res": "997m", "shr": "10m", "cpu": 110.59999999999999, "mem": 12.699999999999999, "command": "fastdpi_main", "date": null }, { "pid": "13347", "virt": "98.0m", "res": "3960", "shr": "3000", "cpu": 9.9000000000000004, "mem": 0, "command": "sshd", "date": null }, { "pid": "13342", "virt": "15036", "res": "1380", "shr": "996", "cpu": 4, "mem": 0, "command": "top", "date": null }, { "pid": "1084", "virt": "0", "res": "0", "shr": "0", "cpu": 1, "mem": 0, "command": "kauditd", "date": null }, { "pid": "13351", "virt": "98.0m", "res": "2004", "shr": "1024", "cpu": 1, "mem": 0, "command": "sshd", "date": null }, { "pid": "1", "virt": "19232", "res": "884", "shr": "748", "cpu": 0, "mem": 0, "command": "init", "date": null }, { "pid": "2", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "kthreadd", "date": null }, { "pid": "3", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/0", "date": null }, { "pid": "4", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "ksoftirqd/0", "date": null }, { "pid": "5", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/0", "date": null }, { "pid": "6", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "watchdog/0", "date": null }, { "pid": "7", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/1", "date": null }, { "pid": "8", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/1", "date": null }, { "pid": "9", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "ksoftirqd/1", "date": null }, { "pid": "10", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "watchdog/1", "date": null }, { "pid": "11", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/2", "date": null }, { "pid": "12", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/2", "date": null }, { "pid": "13", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "ksoftirqd/2", "date": null }, { "pid": "14", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "watchdog/2", "date": null }, { "pid": "15", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/3", "date": null }, { "pid": "16", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/3", "date": null }, { "pid": "17", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "ksoftirqd/3", "date": null }, { "pid": "18", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "watchdog/3", "date": null }, { "pid": "19", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/4", "date": null }, { "pid": "20", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/4", "date": null }, { "pid": "21", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "ksoftirqd/4", "date": null }, { "pid": "22", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "watchdog/4", "date": null }, { "pid": "23", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/5", "date": null }, { "pid": "24", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "migration/5", "date": null }, { "pid": "25", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "ksoftirqd/5", "date": null }, { "pid": "26", "virt": "0", "res": "0", "shr": "0", "cpu": 0, "mem": 0, "command": "watchdog/5", "date": null } ], "date": "2018.01.13 10:43:03", "cpus_count": "8" } } }
To get information about the DPI equipment performance for the period.
Параметры:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDpiResourcesStatsUsageForPeriod", "params":{ "Id":1, "Period":{ "start":"2018-01-13T21:00:00.000Z", "end":"2018-01-13T21:00:00.000Z" }, "PeriodType":"H" }, "id":1515921656764 }
The successful response example:
{ "jsonrpc":"2.0", "id":1515921656764, "result":{ "success":true, "data":{ "2018-01-14 11":{ "cpus_usage":{ "stat_key":"1", "us":"0.12121212121212127", "sy":"0.47272727272727294", "ni":"0", "idle":"99.14545454545457", "wa":"0.2787878787878788", "hi":"0", "si":"0", "st":"0", "date":"2018-01-14 11" }, "mem_usage":{ "stat_key":"2", "virt":"10787827712", "res":"3747196928", "date":"2018-01-14 11" }, "dnas_usage":{ "1_0_out":{ "stat_key":"1_0_out", "cluster_id":"1", "dna_id":"0", "act_rcvd_pkts":"165.87878787878788", "act_send_pkts":"0", "act_esnd_pkts_err":"0", "act_drop_pkts":"0", "act_eemt_pkts_err":"0", "date":"2018-01-14 11" }, "1_1_in":{ "stat_key":"1_1_in", "cluster_id":"1", "dna_id":"1", "act_rcvd_pkts":"0", "act_send_pkts":"165.87878787878788", "act_esnd_pkts_err":"0", "act_drop_pkts":"0", "act_eemt_pkts_err":"0", "date":"2018-01-14 11" } }, "ifs_usage":{ "1":{ "cluster_id":"1", "abs_rcvd_pkts":"1755914.8181818181", "abs_rcvd_bytes":"1572754593.4545455", "abs_rcvd_pkts_dropped":"0", "act_captured_pkts_sec":"0.03606060606060608", "act_processed_pkts_sec":"0.03606060606060608", "act_send_pkts_sec":"0.03606060606060608", "date":"2018-01-14 11" } }, "http_usage":{ "stat_key":"5", "url":"1517", "url_lock":"0", "ssl":"2653", "ssl_lock":"0", "cna":"8", "cna_lock":"0", "sni":"2645", "sni_lock":"0", "quic":"392", "quic_lock":"0", "chnprc":"0", "ccheck":"487579", "ccheck_ip_check":null, "ccheck_lock":null, "ftp":0, "ftp_lock":0, "smtp":0, "smtp_lock":0, "pop3":0, "pop3_lock":0, "imap":0, "imap_lock":0, "xmpp":0, "xmpp_lock":0, "date":"2018-01-14 11" }, "date":"2018-01-14 11" }, "2018-01-14 12":{ "cpus_usage":{ "stat_key":"1", "us":"2.4529953917050675", "sy":"1.2198156682027643", "ni":"0", "idle":"95.97419354838706", "wa":"0.3612903225806449", "hi":"0", "si":"0", "st":"0", "date":"2018-01-14 12" }, "mem_usage":{ "stat_key":"2", "virt":"10787827712", "res":"3747747245.419355", "date":"2018-01-14 12" }, "dnas_usage":{ "1_1_in":{ "stat_key":"1_1_in", "cluster_id":"1", "dna_id":"1", "act_rcvd_pkts":"23789.79262672811", "act_send_pkts":"175827.29493087556", "act_esnd_pkts_err":"0", "act_drop_pkts":"0", "act_eemt_pkts_err":"0", "date":"2018-01-14 12" }, "1_0_out":{ "stat_key":"1_0_out", "cluster_id":"1", "dna_id":"0", "act_rcvd_pkts":"175827.29493087556", "act_send_pkts":"23789.79262672811", "act_esnd_pkts_err":"0", "act_drop_pkts":"0", "act_eemt_pkts_err":"0", "date":"2018-01-14 12" } }, "ifs_usage":{ "1":{ "cluster_id":"1", "abs_rcvd_pkts":"1795976.133640553", "abs_rcvd_bytes":"1597939948.7695854", "abs_rcvd_pkts_dropped":"0", "act_captured_pkts_sec":"22.814608294930885", "act_processed_pkts_sec":"22.814608294930885", "act_send_pkts_sec":"22.814608294930885", "date":"2018-01-14 12" } }, "http_usage":{ "stat_key":"5", "url":"1527.6036866359448", "url_lock":"0", "ssl":"2943.2258064516127", "ssl_lock":"0", "cna":"8", "cna_lock":"0", "sni":"2935.2258064516127", "sni_lock":"0", "quic":"392", "quic_lock":"0", "chnprc":"0", "ccheck":"488168.02764976956", "ccheck_ip_check":null, "ccheck_lock":null, "ftp":0, "ftp_lock":0, "smtp":0, "smtp_lock":0, "pop3":0, "pop3_lock":0, "imap":0, "imap_lock":0, "xmpp":0, "xmpp_lock":0, "date":"2018-01-14 12" }, "date":"2018-01-14 12" } } } }
Starts the DPI statistics log processing. It is usually started automatically on a schedule.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_ProcessDpiStatLog", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Gets the "tail" of the DPI statistics log.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetStatLogTail", "params":{ "Id":1, "Tail":20 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": "\ttotal : allocate=165/7555650\n[STAT ][2018/01/13-13:56:08:375363] Detailed statistics on HTTP :\n\tthread_slave=0 :\n\t\turl/lock=4/0 ( 5,0,0 )( 1,1,0 )\n\t\tssl/lock=25/0 ( 0,1,0 )( 1,2,1 )\n\t\t\tcna/lock=0/0 ( 0,1 )\n\t\t\tsni/lock=25/0 ( 0,0 )\n\t\tquic/lock=0/0 ( 0,0,0 )( 0,0,0 )\n\t\tchnprc=0\n\t\tccheck/ip_check/lock=309/20/0\n\tTotal : \n\t\turl/lock=4/0 ( 5,0,0 )( 1,1,0,98879 )\n\t\tssl/lock=25/0 ( 0,1,0 )( 1,2,1,196647 )\n\t\t\tcna/lock=0/0 ( 0,1 )\n\t\t\tsni/lock=25/0 ( 0,0 )\n\t\tquic/lock=0/0 ( 0,0,0 )( 0,0,0,0 )\n\t\tchnprc=0\n\t\tccheck/ip_check/lock=309/20/0\n[STAT ][2018/01/13-13:56:08:375374] [BRAS] ARP statistics:\n\tprocessed: subs->inet=0, inet->subs=0; originated=0\n" } }
Gets the statistics log file identifier to be used for downloading.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_DownloadStatLog", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": "fq4KpGuICfAxICtX5lAC" } }
When the identifier is received, the file can be obtained from the link
http://<server ip address>/api/file/fq4KpGuICfAxICtX5lAC
Gets "tail" of the DPI messages log.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetAlertLogTail", "params":{ "Id":1, "Tail":20 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": "\t\tbras_max_session_duration =604800 seconds\n\t\tbras_dhcp_request_delay =300 seconds\n\tARP proxy:\n\t\tbras_arp_proxy =0x0000 (local:off, gateway:off)\n\t\tbras_arp_ip =0.0.0.0 (not specified)\n\t\tbras_arp_mac =00:00:00:00:00:00\n\tBRAS services:\n\t\tbras_dhcp_auth_mix =1 (enabled)\n\t\tbras_ip_source_guard =0 (disabled)\n\t\tbras_terminate_local =0 (disabled)\n\t\tbras_vlan_terminate =0 (disabled)\n\t\tbras_vlan_subst =\n\t\tbras_terminate_l2 =0 (disabled)\n\t\tbras_term_by_as =0 (disabled)\n\t\tbras_gateway_ip =0.0.0.0\n\t\tbras_gateway_mac =00:00:00:00:00:00\n[COMMON ][2018/01/13-13:32:48:364905] [0x7fac68409820] BRAS PPPoE: disabled\n[INFO ][2018/01/13-13:32:48:365180][0x7fac68409820] DSCP settings is loaded.\n[WARNING ][2018/01/13-13:35:58:302925][0x7faa21306700] NFLW : very long operation to send data, duration=11000669 msec, tmout=10000380 msec, cntr=1\n[ERROR ] [2018/01/13-13:37:13:630075][0x7faa138fe700] bpm : Error reset_bypass_wd_timer, if='dna0', errno=95 : Operation not supported\n" } }
To get the messages log file identifier to be used for downloading.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDpiInfo", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": "tjFNBnsRkQmXlJbBsCHM" } }
When the identifier is received the file can be obtained from the link like following
http://<ip адрес сервера>/api/file/fq4KpGuICfAxICtX5lAC
To get the list of the latest notifacations.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetLastNotifications", "params":{ "Page":1, "Size":3 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "page": 1, "size": 3, "count": 200, "rows": [ { "notif_id": "391439", "hardware_hardware_id": "2", "users_user_id": null, "date": "2018-01-12T09:22:32", "from": "Result 'check license', err_code=1", "text": " Result 'check license', err_code=1 : Success: loaded", "importance": "COMMON", "readed": "0", "deleted": "0" }, { "notif_id": "391438", "hardware_hardware_id": "2", "users_user_id": null, "date": "2018-01-12T09:22:32", "from": "Check license", "text": " Check license : devices dna0 <--> dna1 ...", "importance": "COMMON", "readed": "0", "deleted": "0" }, { "notif_id": "391437", "hardware_hardware_id": "2", "users_user_id": null, "date": "2018-01-12T09:20:32", "from": "bl_updater_thread", "text": " bl_updater_thread : Notifications(updatenotifications) list loaded with result, rc=0 : Success: loaded.", "importance": "INFO", "readed": "0", "deleted": "0" } ] } } } }
To get the number of unread CRITICAL notifications.
There are no parameters.
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetUnreadedNotificationsCount", "params":{ }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": 123 } }
Marks notifications as read.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_SetNotificationsReaded", "params":{ "Notifs":[ { "notif_id": "391439", "hardware_hardware_id": "2", "users_user_id": null, "date": "2018-01-12T09:22:32", "from": "Result 'check license', err_code=1", "text": " Result 'check license', err_code=1 : Success: loaded", "importance": "COMMON", "readed": "0", "deleted": "0" }, ... ] }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Deletes notifications.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_DeleteNotifications", "params":{ "Notifs":[ { "notif_id": "391439", "hardware_hardware_id": "2", "users_user_id": null, "date": "2018-01-12T09:22:32", "from": "Result 'check license', err_code=1", "text": " Result 'check license', err_code=1 : Success: loaded", "importance": "COMMON", "readed": "0", "deleted": "0" }, ... ] }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Sends an error message to the mail specified in the configuration.
Parameters:
Sending configurations:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_SendError", "params":{ "Params":{ "hardware_id": "1", "subject":"test", "body":"test", "alertLog":true, "statLog":true, "uiLog":true } }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Writes the error information to the dpiui log file.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_LogError", "params":{ "Content":"error text" }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Gets the list of subscribers.
Parameters:
Possible search parameters Params:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetSubscribers", "params":{ "Params":{ "hardware_id":"1", "page":0, "size":100, "login":"", "ip":"", "bind_type":"", "services":"" } }, "id":1515929803508 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515929803508, "result":{ "success":true, "data":{ "page":0, "size":100, "count":6, "rows":[ { "hardware_id":"1", "login":"llllyyy", "ip":"5.5.5.7", "bind_type":"1", "services":"5," }, { "hardware_id":"1", "login":"user11", "ip":"1.1.1.1", "bind_type":"0", "services":"4," }, { "hardware_id":"1", "login":"user22", "ip":"1.1.1.3", "bind_type":"1", "services":"2,3,4,5,6," }, { "hardware_id":"1", "login":"user3", "ip":"2.2.2.2", "bind_type":"1", "services":"2,3,4,5,6," }, { "hardware_id":"1", "login":"user4", "ip":"3.3.3.3", "bind_type":"1", "services":"4," }, { "hardware_id":"1", "login":"userxx", "ip":"5.5.5.6", "bind_type":"1", "services":"3,4,6," } ] } } }
Saves the subscriber model.
Parameters:
The example of request when creating a subscriber:
[ { "jsonrpc":"2.0", "method":"Api_SaveSubscriber", "params":{ "Id":1, "Subscriber":{ "id":1515929803535, "hardware_id":0, "login":"test", "ip":"77.77.77.77", "bind_type":"0", "services":"4,6,", "tariff":"", "valid":true, "oldSubscriber":{ "id":1515929803535, "hardware_id":0, "login":"", "ip":"", "bind_type":1, "services":"", "tariff":"", "valid":true } }, "SubscriberOld":{ "id":1515929803535, "hardware_id":0, "login":"", "ip":"", "bind_type":1, "services":"", "tariff":"", "valid":true } }, "id":1515929803535 } ]
The successful response example when creating a subscriber:
{ "jsonrpc":"2.0", "id":1515929803535, "result":{ "success":true, "data":{ "bind":{ "success":true, "data":{ "bind_result":{ "total":"1", "success":"1", "fail":"0", "were_set_before":"0", "were_not_set_before":"0", "data":{ } }, "unbind_result":null } }, "services":{ "success":true, "data":{ "bind_result":{ "total":"1", "success":"1", "fail":"0", "were_set_before":"0", "were_not_set_before":"0", "data":{ } }, "unbind_result":null } }, "sync_bind":{ "success":true, "data":0.0988309383392334 }, "sync_services":{ "success":true, "data":0.08402705192565918 } } } }
The request example when editing a subscriber:
[ { "jsonrpc":"2.0", "method":"Api_SaveSubscriber", "params":{ "Id":1, "Subscriber":{ "id":1515929804490, "hardware_id":"1", "login":"test123", "ip":"77.77.77.77", "bind_type":"0", "services":"1,4,6,", "tariff":"", "valid":true, "oldSubscriber":{ "id":1515929804490, "hardware_id":"1", "login":"test", "ip":"77.77.77.77", "bind_type":"0", "services":"4,6,", "tariff":"", "valid":true } }, "SubscriberOld":{ "id":1515929804490, "hardware_id":"1", "login":"test", "ip":"77.77.77.77", "bind_type":"0", "services":"4,6,", "tariff":"", "valid":true } }, "id":1515929804490 } ]
The successful response example when editing a subscriber:
{ "jsonrpc":"2.0", "id":1515929804490, "result":{ "success":true, "data":{ "bind":{ "success":true, "data":{ "bind_result":{ "total":"1", "success":"1", "fail":"0", "were_set_before":"0", "were_not_set_before":"0", "data":{ } }, "unbind_result":null } }, "services":{ "success":true, "data":{ "bind_result":{ "total":"1", "success":"1", "fail":"0", "were_set_before":"0", "were_not_set_before":"0", "data":{ } }, "unbind_result":{ "total":"1", "success":"1", "fail":"0", "were_set_before":"0", "were_not_set_before":"0", "data":{ } } } }, "sync_bind":{ "success":true, "data":0.1651449203491211 }, "sync_services":{ "success":true, "data":0.1676170825958252 } } } }
Deletes a subscriber.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_DeleteSubscriber", "params":{ "Id":1, "Subscriber":{ "id":1515929804638, "hardware_id":"1", "login":"test123", "ip":"77.77.77.77", "bind_type":"0", "services":"1,4,6,", "tariff":"", "valid":true } }, "id":1515929804638 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515929804638, "result":{ "success":true, "data":{ "services":{ "success":true, "data":{ "bind_result":null, "unbind_result":{ "total":"1", "success":"1", "fail":"0", "were_set_before":"0", "were_not_set_before":"0", "data":{ } } } }, "unbind":{ "success":true, "data":{ "total":"1", "success":"1", "fail":"0", "were_set_before":"0", "were_not_set_before":"0", "data":{ } } }, "sync_bind":{ "success":true, "data":0.07761001586914062 }, "sync_services":{ "success":true, "data":0.0842139720916748 } } } }
Is under development
Is under development
Gets the DSCP prioritization configuration.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDscpProtocolsConfig", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": "ftp cs4\nhttps cs1\nBittorrent cs7\nTCP Unknown cs7\ndefault keep\n" } }
Sets the DSCP protocol prioritization to be used.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_SetDscpProtocolsConfig", "params":{ "Id":1, "Config":"ftp cs4\nhttps cs1\nBittorrent cs7\nTCP Unknown cs7\ndefault keep\n" }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true } }
Gets the history of DSCP prioritization configuration changes.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDscpProtocolsConfigHistory", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": [ "2015.06.03.03.54.25.000000.protocols.dscp", "2015.06.03.04.00.28.000000.protocols.dscp", "2015.06.04.15.48.34.000000.protocols.dscp", ... ] } }
Получение файла конфигурации из истории по имени файла.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetDscpProtocolsConfigFile", "params":{ "Id":1, "File":"2015.06.03.03.54.25.000000.protocols.dscp" }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": "dns cs0\nhttp cs1\nhttps cs1\nBittorrent cs7\nICMPv6 cs0\nICMP cs0\ndefault cs2\n" } }
Gets the ASN prioritization configuration.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetAsnDscpConfig", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "asn": { "success": true, "data": "192.168.1.16/32 64512\n192.168.1.111/32 64512\n" }, "asn_dscp": { "success": true, "data": "64512 pass\n64512 cs0\n64513 drop\n64514 pass\n64514 peer\n" } } } }
Sets the ASN prioritization configuration.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_SetDscpProtocolsConfig", "params":{ "Id":1, "AsnConfig":"192.168.1.16/32 64512\n192.168.1.111/32 64512\n", "AsnDscpConfig":"64512 pass\n64512 cs0\n64513 drop\n64514 pass\n64514 peer\n" }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": { "asn": { "success": true }, "asn_dscp": { "success": true } } } }
Gets the history of ASN prioritization configuration changes.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetAsnDscpConfigHistory", "params":{ "Id":1 }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": [ "2015.06.07.08.29.29.000000.asnum.dscp", "2015.06.07.08.30.12.000000.asnum.dscp", "2015.06.07.08.33.40.000000.asnum.dscp", ... ] } }
Gets the configuration file by file name from the history.
Parameters:
The request example:
[ { "jsonrpc":"2.0", "method":"Api_GetAsnDscpConfigFile", "params":{ "Id":1, "File":"2015.06.07.08.29.29.000000.asnum.dscp" }, "id":1515661809137 } ]
The successful response example:
{ "jsonrpc":"2.0", "id":1515662165576, "result":{ "success":true, "data": "11111 pass\n11112 pass\n11113 pass\n11114 pass\n11115 pass\n11116 pass\n11117 pass\n11118 pass\n11119 pass\n11120 pass\n64514 pass\n" } }