4.11. Statistics and Analytics

Once the Developer apps go live and start invoking APIs, the API Gateway begins monitoring and collecting data for reporting and analytics. The Statistics also presents real-time streamed analytical information.

Studying the statistical information can provide valuable insights into the popularity and Usage of APIs. Information about how the APIs will be used in the future, and other API-related data and traffic flow enables you to take important business decisions that helps improve profitability of APIs.

Understanding statistical information answers some important questions, such as:

  • Who is consuming which APIs?

  • What is the traffic generated by top APIs?

  • Which APIs brought in the most revenue?

  • Which apps generate the most API traffic?

  • Was there any API downtime due to errors and timeouts?

Gateway Response and Backend Response Time

Consider the scenario If a user is requesting to gateway at time T1, Gateway will pass the request to Backend at time T2. Backend will process the request and pass it to Gateway at time T3 and gateway will pass it to user at time T4.

So Total Response Time to User is T4-T1 Back End Response Time is T3-T2 Gateway Response Time is Total Response Time - Backend Response time i.e (T4-T1)-(T3-T2)

To view Statistics:

  1. In the main Navigation menu, click Statistics. The Statistics screen displays.

Statistics screen

Fig. 4.88 Statistics screen

A collection of icons representing various charts displays. The icon labels and its related information are given below:

Throughput

It is calculated for hours or days for selected APIs and Gateways. The graph is plotted against Total calls Vs Hours.

  • Last 24 hours

  • Last 7 days

  • Last 30 days

  • Last 12 months

  • Custom filter
    • In custom filter user must provide start date and end date and submit, for entered value result will appear.

  • Select APIs
    • We can select specific API or All APIs.

  • Select Gateways
    • Select specific Gateways or All.

It is total successful and failure calls during a time period.

Throughput

Fig. 4.89 Throughput

Here success rate(successful call of API) is 22857221 Failure rate is 44 which is correspondingly displayed in error rate.

Latency

It is the average response time on API calls (backend) during a period.

It is calculated for hours or days for selected APIs and Gateways. The graph is plotted against Time(ms) Vs Hours.

  • Last 24 hours

  • Last 7 days

  • Last 30 days

  • Last 12 months

  • Custom filter
    • In custom filter user must provide start date and end date and submit, for entered value result will appear.

  • Select APIs
    • We can select specific API or All APIs.

  • Select Gateways
    • Select specific Gateways or All.

    Latency

    Fig. 4.90 Latency

Most Used APIs

It will show the most subscribed API Packs.

It is calculated for hours or days for selected APIs are used. The graph is plotted against Calculator Kusum Vs Hours.

  • Last 7 days

  • Last 30 days

  • Last 12 months

  • Custom filter
    • In custom filter user must provide start date and end date and submit, for entered value result will appear.

  • Select APIs
    • We can select specific API or All APIs.

  • Select Gateways
    • Select specific Gateways or All.

    mostusedapis

    Fig. 4.91 Most used Apis

Quoata Consumptions

It Shows much of the subcribed APIs has been used so far.

Here you can select the Apis corresponding to that it shows total number of hits.

quotaconsumption

Fig. 4.92 Quota consumption

API Errors

It is the error or failure of APIs during a time period.

The graph is plotted against Months Vs error percentage.

  • Last 24 hours

  • Last 7 days

  • Last 30 days

  • Last 12 months

  • Custom filter
    • In custom filter user must provide start date and end date and submit, for entered value result will appear.

  • Select APIs
    • We can select specific API or All APIs.

  • Select Gateways
    • Select specific Gateways or All.

    apierrors

    Fig. 4.93 Api Errors

API Timeout

It is the data of how many times API failed to respond in a given time. It is calculated for hours or days for selected APIs and Gateways. The graph is plotted against days Vs Timeout.

  • Live Data

  • Last 24 hours

  • Last 7 days

  • Last 30 days

  • Last 12 months

  • Custom filter
    • In custom filter user must provide start date and end date and submit, for entered value result will appear.

  • Select APIs
    • We can select specific API or All APIs.

  • Select Gateways
    • Select specific Gateways or All.

    API_Timeout

    Fig. 4.94 API_Timeout

Note

Statistics get updated within a minute of usage except Top selling, Max revenue, and Subscription by version.

Next Steps

In the next section, you will learn how to customise the look and feel of the Publisher portal.