OpManager REST API

OpManager offers REST APIs for adding and fetching data from OpManager. A REST API lets external tools talk to OpManager by sending simple web requests via an HTTP call. Using these APIs, you can integrate OpManager with 3rd party IT management/service desk software.

This document provides a list of REST APIs used to send OpManager data to external sources.
To learn more about ingesting data from external websites or third-party tools into OpManager, click here (PDF).

How to use OpManager REST APIs

  • You will need access to an OpManager instance, including its URL and port.
  • Ensure you have an OpManager user account with REST API access enabled.
  • You must have a REST API key: to generate one, navigate to the Settings icon in the top right of OpManager's web client, then go to API Key Management and fill in the required details to copy your key (for detailed steps, click here).
  • OpManager Rest API 
  • You will also need a tool capable of making API calls.

Authenticate using OpManager's API key

Once you have your key, you need to include it in every API request you make. The recommended way is to send it as a request header: when making a call from a tool like Postman, go to the Headers tab and add a row with the key apiKey and your key as the value. The sample configuration below shows what this looks like.

Sample configuration with header:
OpManager Rest API 

Making your first API call

You can use a free API testing tool like Postman to test OpManager APIs before integrating them into your workflows. Here's how to make your first API call using the getDeviceAssociatedMonitors API, which returns all monitors associated with a device along with their last polled values and status.

Step 1: Create a new request

Open Postman or a third party API testing tool, click New, and select HTTP Request. Set the method to GET from the dropdown.

Step 2: Enter the API URL

For example, to call the getDeviceAssociatedMonitors API, enter the following in the URL field:

https://<OpManager-host>:<port>/api/json/device/getDeviceAssociatedMonitors

Replace <OpManager-host> with your OpManager server's IP address or hostname, and <port> with the port it runs on. The default port is 8060. If OpManager is installed on the same machine you're working from, use localhost:8060.

Step 3: Add your API key in the request header

Go to the Headers tab and add a new key-value pair. Set the key as apiKey (case-sensitive) and the value as your API key, copied from Quick Links -> API Key Management. Header-based authentication is recommended over passing the key as a URL parameter.

Step 4: Add the required parameters

Go to the Params tab and add the name parameter with your device name as the value. The value must match exactly as it appears in OpManager. For each API, the parameter description tells you where to find the required values.

Step 5: Send the request

Click Send. A successful request returns an HTTP 200 status code along with a JSON response. You can cross-check the response against the sample response provided in the respective API page.

Troubleshooting

If the request fails, refer to the table below.

IssueLikely Cause
401 UnauthorizedMissing or invalid apiKey, or the key was sent as a parameter on an endpoint that requires the header.
404 Not FoundIncorrect endpoint path or base URL/port.
Connection refused / timeoutOpManager server unreachable, wrong port, or blocked by a firewall.
Empty or null responseREST API access not enabled for the user account.

Enable/Disable REST API access

Enabling or disabling REST API access differs based on the version of OpManager you are using. To check your version, go to Settings -> About OpManager. Then refer to the relevant section below.

API Key Management for versions 12.8.721 and above

From version 12.8.721, the API Key Management feature has been updated with a dedicated management interface.

Accessing API Key Management

API Key Management can be accessed via Quick Links -> API Key Management. This opens the API Key Management page, which lists all existing API keys along with their Name, API Key, Description, Status, API Key Type, Created By, Expires On, and Access toggle.

Generating an API key

Click the Generate API key button on the top right of the API Key Management page. Fill in the following details:

  • Name - A label for the API key.
  • Description - A brief description of its purpose.
  • Expiry Date - Check the box to set an expiry date; leave unchecked for a key that never expires.
  • API Key Type - Choose between Custom or MCP.
OpManager Rest API 
  • Access Type - Select one of the following:
    • All Access - Grants access to all APIs available to the user. Choose Module or Specific API to limit access.
    • Module - Restricts access based on selected modules. Modules are grouped by category (e.g., Common Settings). Permission levels can be set individually for each module:
      • Read/Write - Allows both read and write operations on the module.
      • Read - Allows read-only access to the module.
      • No Access - Blocks all access to the module. This is the default for all modules.

      The listed modules and permissions are based on your current user privileges.

    • Specific API - Restricts the key to individually selected API endpoints. A searchable list of available API endpoints is displayed (e.g., v1/ncmsettings/getSysLogBlockedHosts, v1/nfadevice/getNFAV2TabList). You can search for specific endpoints or use Select All to include all available APIs.

Note: The selected APIs will be accessible only if they are permitted for your user privileges.

Managing existing keys

From the API Key Management listing page, each key can be:

  • Enabled or disabled using the Access toggle.
  • Regenerated using the refresh icon in the Actions Column.
  • Deleted using the delete icon.
OpManager Rest API 

Note: Regenerating a key immediately invalidates the old one. Any scripts or integrations using the old key will need to be updated with the new key. Super admins can view the created key list and can delete or revoke keys, but cannot regenerate them.

Enable / Disable REST API Access for Versions below 12.8.721

From version 12.7.131, the option to enable/disable REST API access has been added.

  • REST API access will be disabled by default for new users created under User Management. An administrator with complete access to all the modules and devices will be able to edit the user under User Management and provide REST API access if required.
OpManager Rest API 
  • If REST API access has been enabled, the REST API menu under Quick Links will display the REST API key, and external REST API calls will be allowed only if the REST API access has been enabled for the user.
OpManager Rest API 
  • If REST API access has been disabled, the REST API menu under Quick Links will display "Contact the administrator user".
OpManager Rest API 

Note:

Enterprise edition user sync: The REST API access will not be synced for users from Central to Probe servers. The synced users in Probes will not have permanent REST API access. For users created in the Probe server, the REST API access can be updated as required.

TFA: If Two-Factor Authentication has been configured, TFA OTP validation is mandatory to enable REST API access.

Regenerate an API key: To regenerate an API key, go to Settings > Basic Settings > REST API in the OpManager web client and click Regenerate Key. Note that regenerating the key invalidates the old one.

Endpoints that require header-only authentication

+