API metrics


The API metrics page displays metrics for your API Manager Developer Portal. API metrics are displayed in charts that help you visualize the types of metrics that provide insights into your APIs. As an API developer, you can track the consumption of your APIs, troubleshoot errors, and analyze performance (latency).

APIM Metrics page in Monitor

You can access these metrics by clicking API Metrics in the navigation page for Monitor. Similar to the functionalities available on the Execution Overview and Metrics pages, you can view assets to which you have read and write permissions. As an admin, you can also monitor statistics that give a summary view and details about the APIs (Ultra and Triggered Tasks) and Proxies running in your environment (Org).

Troubleshooting Errors

The API Metrics page serves as the central repository of information about your APIs. You can collect metrics on usage, latency, in addition to the number and type of errors API consumers face. This data collection is an important part of managing API policies because understanding these metrics can help you decide on the combination of policies that best protect the APIs published to your developer portal. Because the API Metrics page supports downloads, you can collect these metrics over time and analyze the patterns for usage trends.

The API Metrics page separates response from target errors, making it easier to determine if the error occurred because of an API policy configuration or originated from the Pipeline runtime. Latency metrics facilitate fine-tuning the efficiency of your traffic control policies for your APIs. Furthermore, you can perform deep dive analysis from the page, and easily access the Pipeline runtime of a target API. This capability allows API developers to fix issues at the Pipeline level and improve the service that the API provides.

Analyzing API Consumption

The API Metrics page renders API usage metrics in visual and statistical views. The API Details table lists the APIs that are handling the most requests. The order of target APIs defaults to requests per minute, essentially giving you a view of the top ten APIs. You can also sort by error percentage and latency, so that you can analyze problems your API consumers are facing when ingesting APIs from your developer portal. These details combined with the widgets give API developers the tools they need to analyze consumption trends and improve the user experience of their APIs.

API Metrics

The Metrics page displays area charts, where you can view metrics for your APIs:

  • Requests: The number of requests during a selected time period (when positioning your cursor over the area chart). The chart displays requests per minute on the top right of the chart, calculated as the rate at which the system is processing requests.
    • For a 1-hour interval, the chart displays the aggregated number of requests processed each minute.
    • For 8-hour and longer time intervals, the chart displays 15-minute data points as the indication of the throughput of the API ecosystem.

You can also use filters to view the value of this metric for your target APIs.

  • Request Errors: The 400 and 500 errors that occur, typically because of an API policy violation or fail authentication, resulting in a canceled request. Pipelines are not prepared or executed in this scenario.
  • Target Errors: The 400 and 500 errors that occur during the Pipeline prepare state and run.
  • Error Percentage: The errors that occur with the API calls as a percentage of the total number of requests. This metric indicates ineffective API design, weak API documentation, and/or even malicious actors accessing the API ecosystem.
    • Request Errors: The errors that violate a policy or fail authentication, resulting in a canceled request. Pipelines are not prepared or executed in this scenario.
    • Target Errors: The errors that occur during the Pipeline prepare state and run.
  • 99 Percentile Latency: Latency is the number of milliseconds the API ecosystem takes to respond to a call. The 99p latency value means that 99 out of 100 API data samples fall below this value. This metric indicates the efficiency or the cycle time of the API ecosystem.
    • Request Latency: The time taken to link the Task definition, run API policies, and authenticate the request in milliseconds (ms).
    • Target Latency: The time taken to prepare and execute the Pipeline to completion in milliseconds (ms).
    • Response Latency: The time taken to collect statistics and process the response to the caller in milliseconds (ms).
  • Queue Size: The number of requests waiting to be processed by your Ultra Tasks. The vertical access gives the number of requests in the queue, and the horizontal access is the timeline.
  • Top API by Request: The top 10 APIs in your environment (Org) by request.
  • Top Consumer by Requests: The top number of requests by API consumer.

Analyzing Request Details

All API Details

You can analyze usage and other statistics in the All API Details widget.

  1. To sort the list, click the column header for the following metrics:
    • Requests per Minute (RPM)
    • # Errors
    • Error (%)
    • Total Time99thP(ms)
      • Request Time Latency 99th P (ms)
      • Wait Time 99th P (ms)
      • Target Time 99th P (ms)
  2. To download a CSV summary of the information, click the download icon ( ).
  3. To display the API Task Details, click the expand icon or the icon next to the API name.
  4. To display the API Request Details, click the API name.

The Total Time is divided into Request, Wait, and Target Times. This breakdown enables you to troubleshoot where issues are occurring with failed requests. For example, a delay between Request and Wait times for requests that result in errors could originate from a policy configuration issue.

API Request Details

The request details table provides additional information about API requests.

  1. To view the API Details, click on the specific API.
  2. Click the Back button to return to the All API Details view.
Table 1. API Request Detail descriptions
Field Description
Time When the API was invoked.
AuthN The authentication type used for the request, if applicable.
Client/Username The client identifier (IP address of the requester) or the username (ID used for authentication).
Role User role, if applicable.
Remote Address The client IP of the API invoker.
Request Method The HTTP method of the API call.
Path Info The name of the path.
Status The HTTP status code. The T or R indicates whether the status is from the Target (T) or the Request (R).
Resp Time (ms) The number of milliseconds from the time the request is received to the time the response is sent.

Select a Time Range

You can customize the API Metrics page to view data for a different time period. Click any one of the following options to change the time range:

  • 1 Hour: View the statistics for the last hour.
  • 8 Hours: View the statistics for the last eight hours.
  • 24 Hours: View the statistics for the last 24 hours.
  • Custom: View statistics for a target time period of days/hours, limited to the last seven days. The maximum number of days that you can choose at a time is three.

Search for an API

To view metrics on a specific API Versions or Proxy, type the name in the Search.

Alternatively, point and click your cursor in the blank field to display a tree of all available API versions and Proxies.