Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:dpi:dpi_components:dpiui:jsonrpc_api:start [2021/07/23 10:30] – created arusnak | en:dpi:dpi_components:dpiui:jsonrpc_api:start [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== 5 Description of the JSON-RPC software interface | ||
- | {{indexmenu_n> | ||
- | ==== Description | ||
- | |||
- | 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: | ||
- | < | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | 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: | ||
- | < | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | The response may be returned with an error. Errors are divided into two categories. | ||
- | |||
- | * Global - are processed at the json-rpc module level. For example incorrect parameters were passed. The error is displayed in the error field.< | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | ] | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | * Local - are processed at the API level inside the called function. For example, error occurred while writing to the database. The error is displayed in the result.error field. In this case, result.success = false.< | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Some example requests with CURL === | ||
- | |||
- | Get the application version: | ||
- | < | ||
- | </ | ||
- | |||
- | Make authorization: | ||
- | < | ||
- | curl -b cookie.txt -c cookie.txt -X POST -k -i ' | ||
- | rue}," | ||
- | </ | ||
- | |||
- | Get DPI configuration file: | ||
- | < | ||
- | curl -b cookie.txt -c cookie.txt -X POST -k -i ' | ||
- | </ | ||
- | |||
- | |||
- | ==== Common Functions | ||
- | |||
- | === Api_GetAppVersion | ||
- | |||
- | Displays the application version. | ||
- | |||
- | There are no parameters. | ||
- | |||
- | The request example: | ||
- | < | ||
- | [{ | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | |||
- | }] | ||
- | </ | ||
- | |||
- | The response example: | ||
- | < | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_GetDics === | ||
- | |||
- | Outputs dictionaries. | ||
- | |||
- | Parameters: | ||
- | |||
- | * DicsKeys - Array:list of dictionary identifiers. Displays all of them by default. | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | ] | ||
- | </ | ||
- | |||
- | The response example: | ||
- | < | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | } | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | ==== Authentication and authorization functions | ||
- | |||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | |||
- | === Api_Auth | ||
- | |||
- | Checks and displays the result: whether the user is authorized or not. | ||
- | |||
- | There are no parameters. | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The response example in case the user is not authorized: | ||
- | < | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | The response example in case the user is authorized: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_Login | ||
- | |||
- | Authorizes the user. | ||
- | |||
- | Parameters: | ||
- | |||
- | * username - string:the user name | ||
- | * password - string: | ||
- | * remember - bool: | ||
- | |||
- | The request example | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The example of a successful response: | ||
- | < | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | The example of a response if something' | ||
- | < | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | If the authorization is successfully completed, cookies will be are transmitted in the response headers. They must be transmitted in all subsequent requests. | ||
- | |||
- | === Api_Logout === | ||
- | |||
- | Deauthorizes the current user. | ||
- | |||
- | There are no parameters. | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | ==== User profile management | ||
- | |||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | |||
- | === Api_GetMyProfile | ||
- | |||
- | Displays the user profile. | ||
- | |||
- | There are no parameters. | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_SaveMyProfile | ||
- | |||
- | The user profile editing. | ||
- | |||
- | Parameters: | ||
- | |||
- | * MyProfile - object:the user model | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_ChangeMyPassword | ||
- | |||
- | The user password changing. | ||
- | |||
- | Parameters: | ||
- | |||
- | * OldPassword - object:old password | ||
- | * NewPassword - string:new password | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | ==== User management | ||
- | |||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | |||
- | === Api_GetUsers | ||
- | |||
- | Allows to get list of users. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:user identifier(optional parameter) | ||
- | |||
- | The request example using the user identifier: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The example of successful response to request containing the user identifier: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | The example of successful response to request without parameters: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | ... | ||
- | ] | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_SaveUser | ||
- | |||
- | Create/ | ||
- | |||
- | Parameters: | ||
- | |||
- | * user - object:the user model | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_DeleteUser | ||
- | |||
- | Deletes the user. | ||
- | |||
- | Parameters: | ||
- | |||
- | * user - object:the user model | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | ==== Roles management | ||
- | |||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | |||
- | === Api_GetRoles | ||
- | |||
- | Allows to get a list of users. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:role identifier(optional parameter) | ||
- | |||
- | The example of request with the role ID: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The example of successful response to request containing the role ID: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | ] | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | The example of a successful response to a request without parameters: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | ... | ||
- | ] | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_SaveRole | ||
- | |||
- | Creating/ | ||
- | |||
- | Parameters: | ||
- | |||
- | * role - object:the role model | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | === Api_DeleteRole | ||
- | |||
- | Deleting a role. | ||
- | |||
- | Parameters: | ||
- | |||
- | * role - object:the role model | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | ==== Device control | ||
- | |||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | |||
- | === Api_GetHardwares | ||
- | |||
- | Get the list of equipments. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: | ||
- | |||
- | The request using the hardware identifier example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | Example of a successful response to a request with a hardware identifier: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | ] | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | The example of successful response to the request without parameters: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | ... | ||
- | ] | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_SaveHardware | ||
- | |||
- | Creation/ | ||
- | |||
- | Parameters: | ||
- | |||
- | * hardware - object:the equipment model | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_DeleteHardware | ||
- | |||
- | Equipment removal. | ||
- | |||
- | Параметры: | ||
- | |||
- | * hardware - object:the equipment model | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_RestartHardware | ||
- | |||
- | Equipment restart. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_ReloadHardware | ||
- | |||
- | On-the-fly parameters updating. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_TestConnectToHardware | ||
- | |||
- | Equipment availability test. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_GetDpiConfig | ||
- | |||
- | Get the DPI equipment configuration. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_ValidateDpiConfig | ||
- | |||
- | Validation of the DPI equipment configuration. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | * Config - string: configuration | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | configuration : SUCCESS\n" | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_SetDpiConfig | ||
- | |||
- | Setting DPI configuration to the equipment. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | * Config - string: configuration | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_GetDpiConfigHistory | ||
- | |||
- | Getting the history of DPI configurations on the hardware. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ... | ||
- | ] | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_GetDpiConfigFile | ||
- | |||
- | Get the content of DPI configuration file. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | * File - string:the file name | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_GetDpiInfo | ||
- | |||
- | To get the DPI equipment information. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | "CPU op-mode(s)": | ||
- | "Byte Order": | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | "NUMA node(s)": | ||
- | " | ||
- | "CPU family": | ||
- | " | ||
- | " | ||
- | "CPU MHz": " | ||
- | " | ||
- | " | ||
- | "L1d cache": | ||
- | "L1i cache": | ||
- | "L2 cache": | ||
- | "L3 cache": | ||
- | "NUMA node0 CPU(s)": | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_GetDpiResourcesUsageTick | ||
- | |||
- | To get information about the current state of equipment performance. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | ], | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_GetDpiResourcesStatsUsageForPeriod | ||
- | |||
- | To get information about the DPI equipment performance for the period. | ||
- | |||
- | Параметры: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | * Period - object: | ||
- | * PeriodType - string: | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_ProcessDpiStatLog | ||
- | |||
- | Starts the DPI statistics log processing. It is usually started automatically on a schedule. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_GetStatLogTail | ||
- | |||
- | Gets the " | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | * Tail - int: the " | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | : | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | ARP statistics: | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_DownloadStatLog | ||
- | |||
- | Gets the statistics log file identifier to be used for downloading. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | When the identifier is received, the file can be obtained from the link< | ||
- | |||
- | === Api_GetAlertLogTail | ||
- | |||
- | Gets " | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | * Tail - int: the " | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_DownloadAlertLog | ||
- | |||
- | To get the messages log file identifier to be used for downloading. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int:the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | When the identifier is received the file can be obtained from the link like following < | ||
- | |||
- | ==== Notifications management | ||
- | |||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | |||
- | === Api_GetLastNotifications | ||
- | |||
- | To get the list of the latest notifacations. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Page - int:the page number | ||
- | * Size - int:the number of notifications in the response | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | : Success: loaded.", | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | ] | ||
- | } | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | |||
- | === Api_GetUnreadedNotificationsCount | ||
- | |||
- | To get the number of unread CRITICAL notifications. | ||
- | |||
- | There are no parameters. | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | === Api_SetNotificationsReaded | ||
- | |||
- | Marks notifications as read. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Notifs - array:the array of notifications | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | ... | ||
- | ] | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | === Api_DeleteNotifications | ||
- | |||
- | Deletes notifications. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Notifs - array:the array of notifications | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | ... | ||
- | ] | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | |||
- | ==== Errors sending | ||
- | |||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | |||
- | === Api_SendError | ||
- | |||
- | Sends an error message to the mail specified in the configuration. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Params - object: the error message model | ||
- | |||
- | Sending configurations: | ||
- | |||
- | * subject - string: message subject | ||
- | * body - string: message body | ||
- | * hardware_id - int: equipment identifier | ||
- | * alertLog - bool: to include (or exclude) notification logs file in a message | ||
- | * statLog - bool: to include (or exclude) equipment status logs file in a message | ||
- | * uiLog - bool: to include (or exclude) dpiui logs file in a message | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | |||
- | === Api_LogError | ||
- | |||
- | Writes the error information to the dpiui log file. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Content - string: error message body | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | |||
- | ==== Subscriber management | ||
- | |||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | |||
- | === Api_GetSubscribers | ||
- | Gets the list of subscribers. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Params - object: search options (optional parameter) | ||
- | Possible search parameters Params: | ||
- | * page - int: page number | ||
- | * size - int: dimension of array containing the result | ||
- | * hardware_id - int: equipment identifier | ||
- | * login - string: user name | ||
- | * login_equal - string:... | ||
- | * ip - string: user ip address | ||
- | * ip_equal - string:... | ||
- | * bind_type - ... | ||
- | * services - ... | ||
- | * order_by - string: field used for ordering the subscribers list | ||
- | * order_dir - string: ordering the list in ascending order (" | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | |||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | ] | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | |||
- | === Api_SaveSubscriber | ||
- | |||
- | Saves the subscriber model. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: equipment identifier | ||
- | * Subscriber - object: subscriber model containing new data | ||
- | * SubscriberOld - object: subscriber model containing old data. If this parameter is specified, the subscriber data and its activated services are edited. Otherwise (if not specified) a new subscriber will be created. | ||
- | |||
- | The example of request when creating a subscriber: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example when creating a subscriber: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | The request example when editing a subscriber: | ||
- | < | ||
- | [ | ||
- | |||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example when editing a subscriber: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_DeleteSubscriber | ||
- | |||
- | Deletes a subscriber. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: the equipment identifier | ||
- | * Subscriber - object: the subscriber model | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | |||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | ==== Services management | ||
- | Is under development | ||
- | |||
- | ==== Tariff management ==== | ||
- | Is under development | ||
- | ==== Protocol prioritization management (DSCP) | ||
- | |||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | |||
- | === Api_GetDscpProtocolsConfig | ||
- | |||
- | Gets the DSCP prioritization configuration. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | |||
- | === Api_SetDscpProtocolsConfig | ||
- | |||
- | Sets the DSCP protocol prioritization to be used. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: the equipment identifier | ||
- | * Config - string: configuration content | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_GetDscpProtocolsConfigHistory | ||
- | |||
- | Gets the history of DSCP prioritization configuration changes. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ... | ||
- | ] | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | |||
- | === Api_GetDscpProtocolsConfigFile | ||
- | |||
- | Получение файла конфигурации из истории по имени файла. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: the equipment identifier | ||
- | * File - string: the file name | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | |||
- | ==== ASN prioritization management | ||
- | |||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | * [[dpiui2# | ||
- | |||
- | === Api_GetAsnDscpConfig | ||
- | |||
- | Gets the ASN prioritization configuration. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | |||
- | === Api_SetAsnDscpConfig | ||
- | |||
- | Sets the ASN prioritization configuration. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: the equipment identifier | ||
- | * AsnConfig - string: ASN configuration content | ||
- | * AsnDscpConfig - string: ASNDSCP configuration content | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | === Api_GetAsnDscpConfigHistory | ||
- | |||
- | Gets the history of ASN prioritization configuration changes. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: the equipment identifier | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | ... | ||
- | ] | ||
- | } | ||
- | |||
- | } | ||
- | </ | ||
- | |||
- | |||
- | === Api_GetAsnDscpConfigFile | ||
- | |||
- | Gets the configuration file by file name from the history. | ||
- | |||
- | Parameters: | ||
- | |||
- | * Id - int: the equipment identifier | ||
- | * File - string: the file name | ||
- | |||
- | The request example: | ||
- | < | ||
- | [ | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | " | ||
- | } | ||
- | |||
- | ] | ||
- | </ | ||
- | |||
- | The successful response example: | ||
- | < | ||
- | { | ||
- | |||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | | ||
- | } | ||
- | |||
- | } | ||
- | </ |