Setup

To perform a call to the endpoint you need to pass authentication credentials as headers, the examples provided use Postman, an hypertext transfer protocol (HTTP) client.

Remember to use your Nozomi Networks Solution's web interface internet protocol (IP) address instead of the example one.

Basic authentication

Nozomi Networks suggests to create dedicated users for OpenAPI usage, with minimal permissions necessary to access the required data sources.

Figure 1. How to perform an authenticated call

How to perform an authenticated call

Token authentication

As an alternative to basic authentication, use OpenAPI keys created from the Web user interface (UI) to sign in. See Chapters 3 and 5 in the N2OS User Manual for instructions on creating an OpenAPI key.

Note:
Only local users can have OpenAPI keys.

Using token authentication is a two step process. First, use the /api/open/sign_in endpoint with a valid key to obtain a JSON web token (JWT) token.

Figure 2. Obtaining a JWT token

Obtaining a JWT token

Then, use the JWT token as bearer token for any successive call to the application programming interface (API).

Figure 3. Authentication with bearer token

Authentication with bearer token

Remarks

  1. The JWT token expires 30 minutes after being created. To use API for a longer time, request a new token by calling sign_in again.
  2. Any number of JWT tokens can be created.