Introduction of RESTful APIs for NIPS Version 5610 and 5611

Introduction of RESTful APIs for NIPS Version 5610 and 5611

outubro 28, 2022 | Adeline Zhang

A RESTful API means that API works in REST standard. RESTful API requires the front end to send requests in one predefined format, so the server only needs to use one unified interface to process. NSFOCUS NIPS can use RESTful API to get the device information or change settings.

API tools need to be authorized first before using the API. The usage of API, such as interface addresses and syntax rules, are the same between the NIPS version 5610 and version 5611, but the authorization methods are different.

The address of the API interface is HTTPS://NIPS_IP:8081. Please refer to the product RESTAPI interface manual for detailed instructions.

RESTful API for NIPS version 5610

API authorization needs to use the web username and password. Basic Auth will be used in API authorization.

For example, getting the enabled service through API can be set like the following:

1. Configure the authorization information: Set the authorization type to Basic Auth, and add the username and password.

2. Input the API path and set the correct request method.

3. Execute the API to get the expected results.

RESTful API for NIPS version 5611

For example, to obtain the NIPS message list through the API, perform the following steps:

1. Access the login interface(/api/system/account/login/login) in order to get api_key and security_key.

Request parameters are shown as the following.

For the password parameters, it can be obtained when login into the web using the console of the browser.

Tips: api_key and security_key will be changed whenever login, so remember to obtain the latest values when re-open the API tools.

2. When accessing other interfaces, add the API key, time, and sign to the header. Then input the API path and set the correct request method.

API key is the api_key value returned by the login interface;

time indicates the current timestamp in UNIX timestamp format;

sign indicates the signature information. The signature obtaining method is SHA256 encrypted character string of security-key:xx;api-key:xx;time:timestamp in UNIX timestamp format;rest-uri:/api/path.

3. Execute the API to get the expected results.