Free training - ManageEngine OpUtils

OpUtils REST API

OpUtils offers REST APIs for adding and fetching data from OpUtils. Using these APIs, you can integrate OpUtils with third-party IT management/service desk software.

How OpUtils REST APIs work?

The APIs work with an API key. The API key is unique for each OpUtils account and is mandatory for all API requests.

How to view the API Key?

To view or copy an API key, go to Quick links > Rest API Key option in OpUtils web client.(The quick link option is the Gear icon on the top right corner)

Enable / Disable Rest API access

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.

If the REST API access has been disabled, the REST API menu under Quick links will display "Contact the administrator user".

Note:

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

Regenerate an API key: To generate an API key, go to Settings > Basic Settings > REST API in OpManager web client and click on Regenerate Key.

Overview

OpUtils Application Programming Interface (API) allows you to programmatically connect to the database used by OpUtils to get the required information. While it is also possible to manually connect to the database using ODBC and fetch the information by constructing an SQL query, API eases it by not requiring you to be conversant with the database schema and relationships with various database tables. OpUtils API benefits you in many ways:

  • Get the required information programmatically to be used in other in-house or third-party applications
  • Link it to other third-party reporting tools for customized reporting
  • You don't need to understand how the data is stored in the various database tables and the relationships with other tables/data.

Using API

Requests to OpUtils API via URL, which connects to the OpUtils database and get the required information. The URL construct should be as follow:

https://<oputils_server_name_or_ip>:<port_number>/oputilsapi/<oputils_module>?apiKey=<api_key>&operation=<operation_name>&<operation_parameters>

where,

<oputils_server_name_or_ip> refers to the dns name or the IP Address of the computer where OpUtils is installed

<port_number> refers to the port at which OpUtils runs, the default being 8060 or 8061

<oputils_module> refers to the specific OpUtils module you're querying to obtain the information.

<api_key> refers to the API Key for authenticating the query. The API Key is unique for every OpUtils User and has to be generated as per the instructions provided.

<operation_name> refers to the API Operation that you use for getting the information. The Operation Name varies depending on the type of data you need and the specific OpUtils modules. Please refer to module specific document for supported operations and operation parameters.

<operation_parameters> refers to the parameters or arguments for the parameter. Not all operations require a parameter; refer to module specific document for supported operations and operation parameters.

Example:
https://oputils-test1:8060/oputilsapi/ipam?apiKey=27559d9f-9866-411e-a71b-c44c2a04f299&operation=GET_SUBNET_SUMMARY&subnetAddress=12.18.118.0

HTTP Methods

OpUtils API uses appropriate HTTP verbs for every action.

Method Description:

  • GET - Used for retrieving resources.
  • POST - Used for creating resources and performing resource actions.
  • PUT - Used for updating resources.
  • DELETE - Used for deleting resources.

Supported Output Format/Response

The output of an API query will be in JSON format.

JSON RESPONSE PARAMETERS:

  • code - NetFlow Analyzer error code. Indicates zero for a success response and non-zero in case of an error.
  • message - Status Message for the invoked API.
  • data - Comprising the invoked API's Data.

IP Address Manager

IPAM module will help you get the following information about your IP space from OpUtils database:

  • Subnet Summary: Get the summary information about your subnets like Subnet Name, Subnet Address, Subnet Mask, Subnet Size, Used and Available IP Addresses, etc.
  • IP Address Details: Get the complete details of each and every IP in your network like IP Address, MAC Address, IP Status, DNS Status, Reserved Status, Connected Device Type, Authenticity, etc.
  • Subnet Summary: Get the complete details of all the subnets that are discovered in the network, which includes the details on the IP Address in each and every subnet.
  • IPAM Alerts: Get alerts on IPAM when specific IP Address is used or when the IP Address is available.
  • IPAM History: Retrieve the history of IP allocations and usage, track changes made to IP addresses, and gather specific details such as logged-on users, time of logon, date, etc., for auditing purposes.
  • Add AD Domain: Provides you the ability to add AD domain to your network.
  • Add Subnet: Provides you the ability to add a subnet to your network.

Subnets

getAllSubnetSummary

API name: getAllSubnetSummary

Method: GET

Description: Provides the summary details of all the subnets in your network. This operation does not require any additional parameter.

URL: api/json/ipam/getAllSubnetSummary?apiKey=<api_key>&&rows=100&page=1

Request sample:
https://122.10.22.160:8060/api/json/ipam/getAllSubnetSummary?apiKey=df2eac29ef194f4e5e412d36d6899611&&rows=100&page=1

Sample Response:

{"total":"1", "records":"1", "page":"1", "rows":[{"availableCount":"0", "transientPercentage":86,"Action":"", "ip-not-in-ad-count":"254", "notScannedCount":"0", "subnet-size":"254", "totalCount":"254", "subnet-name":"", "scandetails":"1110", "availablePercentage":0,"subnet-description":"", "added-time":"", "reserved-used":"0", "percentage":"14.17%", "dns-not-available-count":"212", "reserved-count":"0", "scan-status":"Scanned", "vlan-name":"", "usedCount":"36", "scan-status-int":"2", "notScannedPercentage":0,"subnetid":"4", "reserved-not-scanned":"0", "subnet-address-cidr":"121.22.10.0/24", "forward-lookup-failed-count":"4", "last-scan-time":"25 Oct 23,05:06PM", "subnet-mask":"255.255.255.0", "ipaddress-in-long":"2887222529", "reverse-lookup-failed-count":"34", "transientCount":"218", "dns-success":"0", "usedPercentage":"14.17", "group-name":"DefaultGroup", "reserved-transient":"0", "snapshot-id":"304", "subnet-address":"121.22.10.0", "broadcast-address":"121.22.10.255", "reserved-available":"0", "credentialId":"", "location":"", "ip-mismatch-count":"4", "ip-in-ad-count":"0", "created-by":"--"}],"status":"Success"}

Parameter name
Description
apiKey
Api Key as string
rows
Specify the no of IP Addresses you want to fetch Warning : Higher count consumes high CPU and run time memory.
page
Specify the pagination number

IP addresses

IPAM alerts

IPAM history

getAllIPAMHistory ( IPAM history of a specific subnet )

API name: getAllIPAMHistory

Method: GET

Description: Provides the details on specific subnet history.

URL: /api/json/ipam/getAllIPAMHistory?apiKey=<api_key>&subnetAddress=<subnet_address>

Request sample:
https://122.10.22.160/api/json/ipam/getAllIPAMHistory?apiKey=f6f17c2e26cceb01e1020ce68cade2cf&subnetAddress=121.22.10.0

Sample Response:

{"rows":[{"phone-number":"", "mac-address":"Device Removed", "system-description":"", "ip-address":"121.22.10.13", "dns-name":"", "cd-key":"", "serial-number":"", "device-type":"", "generated-time":"15 Nov 23, 07:22 PM", "asset-tag":"", "location":"", "ipaddress-in-long":2887294479},{"phone-number":"", "mac-address":"Device Removed", "system-description":"", "ip-address":"121.22.10.15", "dns-name":"", "cd-key":"", "serial-number":"", "device-type":"", "generated-time":"15 Nov 23, 07:22 PM", "asset-tag":"", "location":"", "ipaddress-in-long":2887294221}],"status":"Success"}

Parameter name
Description
apiKey
Api Key as string
subnetAddress
Specify the Subnet Address you want to fetch

IPAM settings

IPAM reports

Switch Port Mapper

Switch Port Mapper module APIs will help you get the following information about your monitored switch ports from OpUtils database:

  • Switch summary: Get the summary information of a specific switch are of all monitored switches added to your OpUtils console.
  • Switch port details: Get the complete details of specific or all switch ports in your network.
  • Switch history: View the port utilization history logged over time by OpUtils. You can get the history of all or specific switch ports.
  • Switch port mapper alerts: Get switch port specific alerts triggered by the Switch Port Mapper module.
  • Adding a switch port: Add a particular switch port to be monitored, manually to the OpUtils console using the specified switch port mapper API.

Switches

Port details

Port history

Port history

Custom Columns

Add AD domain

Audits

Thank you for your feedback!

Was this content helpful?

We are sorry. Help us improve this page.

How can we improve this page?
Do you need assistance with this topic?
By clicking "Submit", you agree to processing of personal data according to the Privacy Policy.
 
Back to Top