REST API Monitoring


REST API - An Overview

REST (REpresentational State Transfer) is a design concept (architecture) for managing state information which defines how data communication is to be done using HTTP protocols. The API calls which adhere to the REST definition (pretty much most of them!) are called REST APIs.

Monitoring REST API - What we do

  • Monitor the availability and response time of your REST API endpoints.
  • Get insight into the response time of mobile and web applications that use your API.
  • Verify that the APIs are returning the correct data in the response details tab.
  • Get notification when key API transactions fail.
  • Detect downtime and fix critical issues before customers are affected.

REST API monitoring - Adding a new REST API monitor

Using the REST API to add a new RESTAPI monitor: Click here

To configure RESTAPI monitor, follow the steps mentioned below:

  1. Click on New Monitor link. Select REST API.
  2. Enter Display Name of the monitor.
  3. Enter REST API URL i.e the API call to be monitored.
  4. Enter Timeout in Seconds - the amount of time spent by APM to establish a connection with the server hosting the API service.
  5. Select the Form Submission method used to access the API.
  6. Enter the credential details for User Authentication like user name and password if required or select credentials from a Credential Manager list. If no authentication is required, then leave the fields blank.
  7. Configure the HTTP(s) Headers required to establish a connection with the API server. Use _sep_ to separate the header name and value. For specifying multiple headers, use the separator #.
    Example: User-Agent_sep_Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36#Accept-Charset_sep_utf-8
  8. Specify the type of response to be expected. For XML and JSON response, user can define specific response values to monitor in the Response Details tab in the Monitor Details page.
  9. Make sure the proxy settings configured in Applications Manager matches with the proxy settings in the browser. Bypassing the local addresses and subnet mask are required based on the API being monitored.
  10. Make sure that the content you try to match is present in the API response.
  11. Click Test Credentials button, to make sure the API service is accessible from the Applications Manager installed machine.
  12. Choose the Monitor Group from the combo box with which you want to associate REST API Monitor (optional). You can choose multiple groups to associate your monitor.
  13. Click Add Monitor(s). This discovers the REST API service from the network and starts monitoring.

Monitored Parameters

Go to the Monitors Category View by clicking the Monitors tab. Click on REST API under the Web Server/Services table. Displayed is the REST API bulk configuration view distributed into three tabs:

  • Availability tab gives the Availability history for the past 24 hours or 30 days.
  • Performance tab gives the Health Status and events for the past 24 hours or 30 days.
  • List view enables you to perform bulk admin configurations.
Parameter Description
Response Time It is the total time taken to get a REST API response. The response time of a RESTAPI monitor is calculated as the sum of DNS lookup time, connection time and the time contracted to receive the response in JSON, text or XML.
  • Response Time
  • Domain Name Resolution Time
  • Connection Time
  • Request Processing Time
  • Download Time
Response Content Details The size of the response in bytes along with the percentage change in size between consecutive polls.
  • Page Size
  • Page Size Change

Custom Attributes

Based on the response obtained, the user can define their own attributes for monitoring specific values in the API response.

  • If the response is of type XML - Using the XSLT transformation (Ref. https://www.w3schools.com/xml/xsl_transformation.asp), the user can define specific values to be monitored. Ensure that the following criteria are met :
    • The output method should be of type 'text'. Syntax : <xsl:output method="text"/>
    • The final output should be of the format AttrName::AttrVal. Example : Days:<xsl:value-of select="days"/> would create an attribute 'Name' whose value will be the value of the <days> tag present in the API Response.
  • If the response if of type JSON - The JSON schema can be used to configure user-defined attributes. Ensure that the following criteria are met :
    • The attribute should be defined as AttrName::AttrValue. Example: Temperature::response.weather.temperature. This will create an attribute name 'Temperature' containing the value of the temperature variable returned
    • Multiple JSON Schemas can be defined by using new line as the delimiter.
    • If the JSON key itself contains a dot(.) then please replace it with '_sep_'. This should be done for all the individual keys which contain a dot(.) in it. In the above example, say the last key 'temperature' was defined as 'temperature.celsius'. Then the format should be Temperature::response.weather.temperature_sep_celsius.