Applications Manager REST APIs


ManageEngine Applications Manager provides REST APIs for fetching data from Applications Manager. Using these APIs, Applications Manager's data can be integrated with any internal portal or third-party system management software. The data can be represented in a single dashboard itself.Also Applications Manager's REST API sequence monitor will help you to monitor a sequence of APIs in a single session.

By using any XML parser in a scripting language, Java, C, Perl or Python, etc. you can make HTTPs requests in the format recommended in the API. This data can then be inserted into your own database or put in any format that you need.

Note:
  • It is highly recommended to use the secure channel (HTTPS) mode to communicate with Applications Manager so as to avoid any security issues during REST API calls.
  • Applications Manager's REST APIs have a limit of 1000 calls per minute.

Prerequisites

Applications Manager User Account:

Each Applications Manager User should have a valid UserName to use the API.

Take an intranet portal for example. When each user logs in, the assigned monitors and alarms will be shown. So, it is imperative that each user should have separate API keys. When GetAlarms API is invoked with the key generated for that particular operator, it will list the alarms that are assigned to that person alone.

How do APIs work?

In order to use the API, each user should obtain an API key - which is a long text and is unique to their Applications Manager Account. The API key has to be passed as parameter in every API request made.

Generate API Key

The User can register for the API key from within Applications Manager product using the "REST API" option in the Settings tab.

Note: Generating an API Key is a one-time process. The API Key you generate is unique to that particular installation.

Steps for using REST API

  1. Click on the Settings tab
  2. Under Integration with Portals, click REST API.
  3. An API key is generated - eg.7b5fde68148fa2419bc2f1a1ab87e757
  4. Open the browser, the URL would be

    https://apm-prod-server:8443/AppManager/xml/ListServer?apikey=7b5fde68148fa2419bc2f1a1ab87e757&type=all

  5. By changing <type> to the required monitor, data pertaining to that monitor can be retrieved. Check if the following URL works fine.

    https://apm-prod-server:8443/AppManager/xml/ListServer?apikey=7b5fde68148fa2419bc2f1a1ab87e757&type=server

    Above URL will give data of all the server monitors. 'all' will give the entire Applications Manager's data.

  6. By using any XML parser in a scripting language, Java, C, Perl or Python etc, you can make HTTPs requests in the format recommended in the API. This data can then be inserted into your own database or put in any format that you need.

Using REST API through Curl command

You can also perform REST API calls through curl command from command line by specifying the required details in the following format:

curl -d "[API_REQUEST_PARAMETERS]" [API_URL]

Example

curl -d "apikey=7b5fde68148fa2419bc2f1a1ab87e757&type=server" https://apm-prod-server:8443/AppManager/xml/ListServer?

Note: This command only works for POST requests.

For get requests, follow the below format:

curl "[API_URL]?[API_REQUEST_PARAMETERS]"

Example

curl "http://localhost:9090/AppManager/xml/ShowPolledData?apikey=34ddf955a14953bbf7740c9f38d6be5d&resourceid=10000231&attributeID=402&period=1"

Using REST API through Wget command

You can also perform REST API calls through wget command from command line by specifying the required details in the following format:

wget [COMPLETE_RESTAPI_URL]

Example

wget https://apm-prod-server:8443/AppManager/xml/ListServer?apikey=7b5fde68148fa2419bc2f1a1ab87e757&type=server

REST API Key Regeneration

A user logged into Applications Manager can view his API Key by clicking on the user photo to edit his details. If the user has an administrator account, the REST API key can be viewed in the Settings tab, under REST API.

An Admin user can regenerate an API key for him as well as for other users.

The REST API key is regenerated instantly. You should be prepared to modify the API Key in your web portal(s) that uses the API Key, soon after the regeneration, to insure that it continues to function correctly.

REST APIs for Various Operations

Browse through the below sections to know about the operations that can be performed using REST API: