R12 Publication-2025July16
Open API
NetBrain supports Open API achieved by OAuth 2.0 protocol. OAuth Clients are managed in System Management Page > Open API tab.
Add an OAuth Client
Follow the steps below to add an OAuth Client.
- Go to System Management > Open API.
- Click Add OAuth Client, then define the following settings in the Add OAuth Client window.
- In the Name field, give the client a name.
- Token Expiration Time: Select token expiration time.
- Authentication Method: Select from Header/Body/Auto to decide the authentication is carried out using header or body or automatically.
- Client Secret Expiration Time: Define the period within which the secret is valid. The secret will become invalid after this period, and you need to reset the client secret.
- Run as User: Click Select in this field, then the Run as User dialog will pop up. In this dialog, select a user associated with the current client ID, then the OAuth Client will run with the same privilege as the selected user.
- Click Save in the Add OAuth Client window, an information dialog will appear to provide information about the client secret. Users are prompted to keep the Client ID and Client Secret information.
- View the added OAuth Client. A new OAuth Client will be added as an entry in the Open API table.
Delete an OAuth Client
Follow the steps below to delete an OAuth Client.
- Go to System Management > Open API.
- Select a target entry from the table, then click Delete from the right-click menu of the entry.
- In the pop-up confirmation dialog, click Yes to delete the OAuth client.
Reset Client Secret
Client Secret can be reset, then the previous Client Secret will become invalid and the new Client Secret will be generated.
- From the dropdown menu of the target OAuth Client, click Regenerate Client Secret.
- In the pop-up Confirmation dialog, Click Yes.
- The new Client Secret is generated, and you are prompted to save the new client Secret.
Advanced Settings of OAuth Client
You can disable/enable using OAuth Service over HTTPS/HTTP.
- Click the
icon in the Open API Page.
- In the pop-up dialog, you can do the following:
- Enable OAuth Server over checkbox is checked and the HTTPS option is selected by default. You can change to the HTTP option, however, it is strongly recommended to enable OAuth Service over HTTPS other than HTTP. Using HTTP may cause data leakage and system risk.
- Enable Token User Authentication (Legacy): From version R12, NetBrain supports OAuth 2.0 and token users accounts are disabled by default. It is recommended to access open API with OAuth 2.0 protocol. However, you can enable token user here and set the token expiration time to continue with token authentication.
- Click Save to save the settings.
Note: If the Enable OAuth Server over checkbox is unchecked, all the OAuth2 client_credentials are disabled, and all the client secrets will become invalid.
Download Open API Specification
NetBrain Open API can be downloaded, then users can import the file to Restful API server to use NetBrain's Restful API.
- Go to System Management > Open API.
- Click Download Open API Specification, and the Download Open API Specification dialog will appear.
- In the Download Open API Specification dialog, define the following:
- Select an API version. By default, the latest API version is selected.
- Select a format. The open API can be exported to JSON or YAML format.
- Click Download.