Duration : 15 mins
Persona : API Product Team
After you have some API Products up and running you want to have a look at how the program performs and how successful your API program is.
With trend usage data you can see how your API calls are trending over time and predict how the traffic will be in the next year, when you need to do your capacity planning
Through visualization of the data with out of the box analytics, Apigee helps you with finding the trends and patterns of your APIs
When registering an application to an API product that metadata is loaded when verifying an API key or Oauth Token so you can identify the Developer, App and the Product. This data is crucial for insights into your program.
If you have not followed previous modules you can use a load generator to have some data in your reports.
You have to have an API proxy with a default API key policy and 3 API keys ideally for different Apps and API products.
You can create a new proxy by uploading the proxy in the loadgen folder in this repository.
Apigee comes with a lot of pre built reports. For the purpose of these labs and in the interest of time, we will walk through the different dashboards with screenshots from populated demo environments. Feel free to use the optional load generator to follow along in your own environment.
If you prefer you can have a look at the API Dashboards by watching this video that gives you an overview of the metrics dashboards with a lot of filled values: https://youtu.be/mElNO44QQFQ?t=126
To get to the reports open the Analyze menu in the sidebar.
The Proxy Performance dashboard helps you see API proxy traffic patterns and processing times. You can easily visualize how much traffic your APIs generate and how long it takes for API calls to be processed, from the time they are received by Apigee Edge until they are returned to the client app.
The Cache Performance dashboard lets you see at a glance the value of your Apigee Edge cache. The dashboard helps you visualize the benefit of the cache in terms of lower latency and reduced load backend servers.
The Error Code Analysis dashboard tells you about error rates for API proxies and targets. The Error Code Analysis dashboard uses:
The Target Performance dashboard helps you visualize traffic patterns and performance metrics for API proxy backend targets.
The Developer Engagement dashboard tells you which of your registered app developers are generating the most API traffic. For each of your developers, you can find out who is generating the most API traffic and the most errors. For example, if a particular developer's app is generating a lot of errors relative to other developers, you can pro-actively address the problem with that developer.
In the main view, if it is enabled, select the Analyze button under the Actions column for the app to view details about that app and the app developer. The following chart appears:
The Traffic Composition dashboard measures the relative contribution of your top APIs, apps, developers, and products to your overall API program.
The Devices dashboard tells you about the devices and servers that are being used to access your APIs. It lets you spot trends in how users are accessing your APIs. For instance, you might notice that traffic from one type of device is increasing, while another is going down, and then decide if the change requires any action or not.
The Geo Map dashboard tracks traffic patterns, error patterns, and quality of service across geographical locations. You can view information about all your APIs, or zoom in on specific ones.
Play around with different api keys from different API
Note: It takes about 30 minutes for a new custom dimension to be added to the database after the Statistics Collector policy is invoked for the first time, for each environment.
For example, if a Statistics Collector proxy is invoked in the test environment, data for that custom dimension starts to be available in the test environment 30 minutes later, and the custom dimension will appear in the custom reports Dimensions drop-down list.
Now we want to have a look at the data we collected in our API proxy. To do that we need to create a custom report that looks for the value we have defined in the statistics collector policy before.
For our example we want to see the Traffic of our proxy
We also define the Dimensions we want to group our traffic by. By selecting multiple dimensions we can drill down our report to find more information on the traffic metric.
Now we see the traffic split by Apps. This helps us to identify apps that are generating a lot of traffic to look closer at.
You can also download the data as CSV by clicking the download button to the right.
Visit the Management API documentation where you can also conveniently try out API calls:
In the documentation you can interactively make calls to your organization to see how the results look like.
Caution: Update Time Range accordingly to have the end range date in the present.
In this lab you have explored all Reports that show you the success and performance of you API Program and give you valuable insights into how to optimize your APIs.
https://docs.apigee.com/api-platform/analytics/use-analytics-api-measure-api-program-performance
Analytics dashboards overview - https://docs.apigee.com/api-platform/analytics/using-analytics-dashboards
Exract Variables Policy - https://docs.apigee.com/api-platform/reference/policies/extract-variables-policy
Statistics Collector Policy - https://docs.apigee.com/api-platform/reference/policies/statistics-collector-policy
Create and manage custom reports - https://docs.apigee.com/api-platform/analytics/create-custom-reports
Example of custom report with statistics collector - https://docs.apigee.com/api-platform/analytics/analyze-api-message-content-using-custom-analytics
Extract Variables Policy - https://www.youtube.com/watch?v=KqFpnNt_8yo
Measurement and KPIs for APIs - https://www.youtube.com/watch?v=x6r7xHKNINU
Measuring and reporting the success of your API program - https://www.youtube.com/watch?v=VcNKpoakVqQ
Please take a few minutes to provide your feedback on this API Jam here.