V1 REST APIs


Steps for Authentication

To authenticate your requests to the API, you need to include the "apikey" parameter in your HTTP requests. The value of the "apikey" parameter should be your API key.

  1. Click on the the Profile icon present in the top-right corner of the UI.
  2. Click on Edit and select 'Click here' to view the REST API key.
  3. Copy the API key that will be generated - eg: 7b5fde68148fa2419bc2f1a1ab87e757.
  4. Open the browser and go to the following URL 

    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: