com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Viewing API Statistics

API statistics are provided in both the API Publisher and the API Store. Apart from the number of subscriptions per API, all other statistical dashboards require an instance of WSO2 API Manager Analytics installed. For instructions on how to set up Analytics, see Configuring APIM Analytics. Once Analytics is set up, follow the instructions below to view statistics through the API Publisher and API Store.

First, invoke a few APIs to generate traffic and see the statistics.

The following gadgets on API Manager statistical dashboards display real runtime statistics even when Analytics is not set up (as described in Configuring APIM Analytics).

  • Published APIs Over Time
  • Applications Created Over Time
  • Developer Signups Over Time
  • Subscriptions Created Over Time

The other gadgets you see on the API Manager statistical dashboards without setting up Analytics are just samples and are not based on real runtime statistics of your server.

Please note that our data summarization logic summarizes the data on per day basis.

The sections below explain how to access the statistical dashboards:

API Publisher statistics

The gadgets that display publisher statistics can only be viewed via user IDs that have permission to create APIs. For more information, see Managing Users and Roles.

Log in to the API Publisher. Anyone who can create and/or publish APIs can view API-level usage and subscription statistics by clicking on a selected API and referring to its Versions and Users tabs. 

Given below are the statistical dashboards that are available from the Statistics menu. 


In each of the dashboards, you can choose to view all APIs or if you are an API creator, only APIs you have created. You can also select the time period for which you wish to view the statistics.
 

Please note that although the UI shows hour and time range based granularity for filtering statistics, it is not support in the vanilla pack. It is supposed to show statistics only for daily basis granularity and above. Hence hour/time range filtering capability is removed in later releases.


Several examples of usage and performance statistics are given below:

 

  • Published APIs Over Time
  • API Usage
  • API Last Access Times
  • Usage by Resource Path
  • Usage by Destination
  • API Usage Comparison
  • API Throttled Requests

    The total count of the successful request count and throttled request count towards an API over time is denoted in App Throttled Requests graph.

  • Faulty Invocations

    When API is received the expected response it is a successful invocation. If it results an any kind of error response that invocation is called a faulty invocation. The Total number of invocations of each API as a combination of  successful and faulty invocations are denoted in Faulty invocations graph.

  • API Latency Time
  • API Usage Across Geo Locations
  • API Usage Across User Agent

    The proportional distribution of the the usage (invoking) of each API differentiated by the User Agent HTTP Header recived in requests towards the API is denoted in API Usage Across User Agent graph.

  • App Throttled Requests

    The successful request count and throttled request count of each API invoked by each application is denoted in App Throttled Requests graph.

  • Applications Created Over Time
  • API Subscriptions
  • Developer Signups Over Time
  • Subscriptions Created Over Time
    You first need to select the API for which you wish to view subscriptions.

API Store statistics

Log in to the API Store. You can self-subscribe to the store. Next, click the Statistics menu.

Given below are the statistical dashboards that are available:

  • API  Usage: The usage of the API per application
  • Top Users: Users who make the most API invocations per application
  • Resource Usage: Usage of an API and from which resource path per application 
  • Faulty Invocations: Number of faulty API invocations per application
    In a faulty API invocation, the message is mediated though the fault sequence. By default, the API Manager considers an API invocation to be faulty when the backend service is unavailable.

Several examples of usage and performance statistics are given below:

  • API Usage per Application

  • Top Users per Application

    Note that the Registered Users for Application statistics takes the number of users shared each of the Application. To enable application sharing among users in same organization refer Sharing Applications and Subscriptions.

    And for the users to be counted in the statistics in this graph, they should have to generate access tokens using Password Grant type.

  • Resource Usage per Application
  • Faulty Invocations per Application


Admin Portal Statistics

Log in to the Admin portal (https://localhost:9443/admin). API Availability is the only statistical view that exists in the admin portal. Admin users can view API Availability statistics by navigating to ANALYTICS > API AVAILABILITY.

Availability of APIs

The status of the APIs (all API versions) are denoted in Availability of APIs tabular view. 

Status

This indicates the status of the API. There are two values for the API. Those are Available and Limited.

Available - This status indicates that the API is having traffic with normal successful invocations. By default, if an API gets successful invocations at least for one out of 5 invocations within 30000 milliseconds, the status of the API becomes Available.

Note that only the APIs which have traffic will only be viewed by this tabular representation.

Limited - If an API gets an alert due to one of the reasons indicated in AvailabilityofAPIs (healthmonitoring), API status changed to “Limited".

Refer /wiki/spaces/AM2xx/pages/21365508 for more information on how to view the alerts generated.

Availability of APIs statistics directly related with the AvailabilityofAPIs (healthmonitoring) alert type. You can edit the default configurations of the numbers set as parameters to cumstomize generating alerts by navigating to SETTINGS > ANALYTICS and by going to the Edit view of HealthAvailabilityPerMinAlert as below.

Parameter configurations of this Alert type is as below.

Number of continuous responsesConsidering the aspect of generating the alerts, number of responses that should fail to pass the lower percentile. Default value is 5 responses.
Number of continuous response time failuresNumber of minutes that responses should fail to pass the lower percentile for the Alert to be generated. Default value is 5 minutes.
Time intervalTime duration taken to recheck and change the availability of an API. The availability of the API will be rechecked after this time interval and will get new status if the behaviour get changed. Default value is 300 seconds (300000 milliseconds)
Cache Time-outCache time-out value in seconds.
Severity LevelSeverity level of the alert which you can specify as 1, 2 or 3 where 1-severe, 2- moderate, 3- mild respectively.
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.