![]() ![]() ![]() |
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:
Requests to OpUtils API is via URL, which connects to the OpUtils database and get the required information. The URL construct of the URL should be as below:
http://<oputils_server_name_or_ip>:<port_number>/oputilsapi/<oputils_module>?v=<api_version>&key=<api_key>&operation=<operation_name>&<operation_parameters>&format=<output_format>
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 the OpUtils is being run, the default being 7080
<api_version> refers to the version of the OpUtils API. The current version is 1
<oputils_module> refers to the OpUtils module which you are querying to get the information. Refer to the Supported OpUtils Modules for which API is currently supported
<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 here.
<operation_name> refers to the API Operation that you use for getting the information. The Operation Name varies for different type of data that you require and for different OpUtils modules. 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.
<output_format> refers to the format at which the results are returned. Refer to Supported Output Formats for details on supported output formats.
Example: http://oputils-test1:7080/oputilsapi/ipam?v=1&key=27559d9f-9866-411e-a71b-c44c2a04f299&operation=GET_SUBNET_SUMMARY&subnetAddress=192.168.118.0&format=xml
API Key validates and authenticates an API request to an OpUtils user so that invalid requests are not entertained. API Key is unique to every OpUtils user and you are allowed to use the API keys of multiple OpUtils users simultaneously.
To generate an API Key, follow the steps below:
Note |
You can regenerate an API key for the users at anytime. However, regenerating an API key invalidates all the previous keys generated for that user. |
The output of an API query will be in XML and JSON format.
OpUtils API currently supports the following modules to get the data:
![]() ![]() ![]() |