These methods configure the Mikiri WAF agents and read the data those agents record. Installation of the API agent is described in Mikiri WAF API.
POST, the request body is JSON (Content-type: application/json);api.example.com:8080 - the address and port set in the configuration of the Nginx web server in front of the API;Each request must contain the key parameter - the license key (PRODUCT KEY) of the installed copy of Mikiri WAF. The key determines the cluster (CID) and the limits of the tariff plan: data is always returned and changed only within the cluster of this key. How to check the key the response of the licensing server, are described in Access and license.
For the settings and rules that the agents synchronize on a schedule, the get_%ENTITY%_hash methods are provided. They return the hash of the current data: if the hash has not changed, a full download is not required.
{"status": "success", "hash": "%hash%"}
The same parameters are used for the data selection methods:
limit - the maximum number of output records;offset - the page number. With "limit": 100 and "offset": 0, records 1-100 are displayed, with "offset": 1 - records 101-200, etc. Using the parameter without limit (or with limit less than 1) is not allowed;reverseOrder - reverse sorting by the record identifier. If this option is omitted, the default value is false.The response contains:
count - the number of records in the current response (after applying limit);totalCount - the total number of records matching the filter (before applying limit).Many options and rules accept a host or a URL as a value. The conditions for triggering such a value are selected based on the following order of priority from highest to lowest:
example.com — the option is triggered for the host example.com only;.example.com — the option is triggered for the host example.com and its subhosts;*.example.com — the option is triggered only for the subhosts of the host example.com, excluding the main host;* — the option is triggered for all hosts.It is allowed to use as a host:
example.com, .example.com, *.example.com, *;10.10.10.1, [fe80:0:0:0:200:f8ff:fe21:67cf].If the option accepts a URL as a value:
example.com, any URL of the host example.com will be taken into account;example.com/login/*, any URL that starts with example.com/login/ will be taken into account, for example: example.com/login/aaa or example.com/login/bbb;*, any URL will be taken into account.To use * as a regular character in a URL, you must escape it, for example: example.com/login/aa\\*a will match example.com/login/aa*a. If the character * is the rightmost character of the URL, then without escaping, it will be perceived as the search identifier for the occurrence of the URL not as a regular character.
Hosts are converted to punycode. The possibility of specifying a port depends on the method: the corresponding restrictions are given in the description of the settings of each agent.
AND principle the values within one parameter - according to the logical OR principle;null in the list means searching for records with an empty field (where this is allowed).Part of the functionality is available only for the Enterprise plan. When accessed with a key of the Business plan, the API returns the code 401 and the body:
{"status": "fail", "description": "Not available for your plan"}
The API checks the plan for:
/filter/v1/get_rprl_hash, /filter/v1/get_rprl, /filter/v1/set_rprl;/scanner/v1/* methods;/csp/v1/* methods /scanner/v1/set_csp_inventory;/stats/v1/* methods;/rollback/v1/{get,set,del,diff,restore}_rprl and /rollback/v1/{get,set,del,diff,restore}_scanner_settings;waf_response_url, waf_response_url_wl and waf_response_url_dm options the log_response parameter of the waf_log_request option, in the Filter settings.Nginx settings, the event log and the other sections are limited by the plan on the account side. The note at the beginning of each section states that restriction.
Settings are managed using specially designed queries in accordance with the general conventions.