Nav

Viewing API Analytics

Access the Analytics dashboard on Anypoint Platform to get insight into how your APIs are being used and how they are performing. 

Note: API Analytics data is available for up to 90 days.

After logging into Anypoint Platform, click API Manager.

analytics-api-mgr

Accessing the Analytics Dashboards

As an Organization Administrator or API Creator, you have access to the Analytics Dashboards for your organization. Click Analytics from the drop-down menu in the top-right of the window.

analytics-access

API Creators and Organization Administrators can view the Analytics dashboard.

When you access the Analytics for your organization, by default you land on your Overview Dashboard. This dashboard displays these charts:

  • Requests by Date: Line chart that shows the number of requests for all APIs in your organization.

  • Requests by Location: Map chart that shows the number of requests for each country of origin.

  • Requests by Application: Bar chart that shows the number of requests from each of the top five registered applications. 

  • Requests by Platform: Ring chart that shows the number of requests broken down by platform.

overviewdash1

All of these charts display, by default, the data for all APIs in your organization for the past day. However, you can use the filters at the top left of the page to change the date range or filter to particular APIs. Note that the time ranges displayed automatically reflect your local time zone.

filters

All of the charts on the Overview Dashboard are cross-filtered. This means that if you filter the data on any one of these charts, the same filter is automatically applied to the other charts on the page. Clicking an individual application in the bar chart, for example, displays all of the requests from that application and the locations for those requests on the map. Here’s how to filter data on individual charts.

Chart How to filter data How to clear your filter

Requests by Date

Click and drag an area of the chart to filter to just that time period. Once you have the slider filter applied, you can drag the ends to the left or right to adjust them as needed.

Click outside the area of the filtered portion.

Requests by Location

Click one or more countries to filter to just those results. Hover over a country for a tooltip displaying the name of the country and the total number of API requests received from that country for the selected time period.

Click the country or countries again to reset the map.

Requests by Application

Click one or more application bars to filter to just those results. Hover over an application’s data bar for a tooltip displaying the name of the application and the total number of requests from that application for that time period.

Click the application(s) again to reset the chart.

Requests by Platform

Click one or more segments to filter to just those results. Hover over a segment for a tooltip displaying the name of the application and the total number of requests from that application for that time period.

Click the segment(s) again to reset the chart.

To export the data for any of these charts, click the export icon in the chart’s upper right corner.

export

Note that even if you have filtered data on one of the charts to show only selected data, the export icon triggers an export of a .csv file of the full data for that chart, filtered by whatever date range and API selection you have made using the filters in the upper left of the page. Exported files are limited to a maximum of 1 million records.

Creating Custom Charts

API Manager allows you to create a wide variety of custom charts to display exactly the data that you wish to track for your APIs. You can display these charts on your Creating a Custom Dashboard.

For example, you can create custom charts that show:

  • Hourly transactions per second between first day of the month and today, filtered by client ID, API version, or SLA tier.

  • Per minute latency average in the last 24 hours, filtered by API or grouped by client geolocation.

  • Number of policy violations grouped per subscribed application, per violated policy name

    Only charts that group by Violated Policy Name include events that triggered a policy violation. All other charts exclude these events. For example, an API gets 100 requests, 90 succeed, and 10 are rejected by the rate-limiting policy. Charts that do not group by Violated Policy Name compute aggregates based on only the 90 requests that were not rate limited. Charts that group by Violated Policy Name, however, include all 100 requests in their computations.

To create a custom chart, click Manage Charts in the top bar:

analytics-custom-charts

  1. On the Charts page, click New to create a new custom chart. You are directed to the Create API Chart screen.

    createchart

  2. Give your chart a Title, and, optionally, a Description.

  3. Click one of the illustrations on the right of your preview to select a chart type:

    Icon Chart Type Chart Options

    line-chart-icon

    Line chart

    Data Source, Metric: metrics and Total, Data Interval: durations

    bar-chart-icon

    Bar chart

    Data Source, Metric: metrics and Total, Group By: categories

    stack-chart-icon

    Stack chart

    Data Source, Metric: metrics and Total, Group By: categories, Then By: categories

    ring-chart-icon

    Ring chart

    Data Source, Metric: metrics and Total, Group By: categories

    map-chart-icon

    Map chart

    Data Source, Metric: metrics and Total

  4. Select a Data Source value:

    • All APIs in your organization

    • A specific API

  5. Select from one of the Metrics metrics value and a Total:

    • Request Size (in bytes)

    • Requests

    • Response Size (in bytes)

    • Response Time (in milliseconds)

  6. If a Line Chart, select a Data Interval durations value:

    • Minutes

    • Hours

    • Days

  7. If a Bar Chart or Stack Chart, select a category for Group By, and if your chart supports it, a category for Then By:

    • API Name

    • API Version

    • Application

    • Browser

    • City

    • Client IP

    • Continent

    • Country

    • Hardware Platform

    • OS Family

    • OS Major Version

    • OS Minor Version

    • OS Version

    • Postal Code

    • Resource Path

    • Status Code

    • Timezone

    • User Agent Type

    • User Agent Version

    • Verb

    • Violated Policy Name

      For Stack chart, you can group your data in two different dimensions. The first defines the distinct columns, the second defines the stacks within these columns. The same options are available on the second grouping dimension as on the first.

  8. Click Save Chart when finished.

You are redirected back to your Charts list, where you should now see the custom chart that you have created listed. Note that only you can see the custom charts that you create – these are not shared with other members of the API Creators or Organization Administrator roles.

See the next section for information about how to add charts to your Custom Dashboard.

Example Custom Chart: Policy Violations Per Application

  1. Click Manage Charts and click New.

  2. Name your chart Policy Violations Per Application.

  3. Specify the Description as Number of violations per subscribed application

  4. Select a Stack chart for its type:

    create-chart-1

  5. Keep the fields Data Source and Metric on their default values.

  6. Since this is a stack chart, there are two levels of grouping that must be selected: the first defines the columns, the second defines the stacks within these columns. In the first grouping pick Application, to display each application in a different column; in the second grouping pick Violated Policy Name to tack these in each column.

    create-chart-2

  7. Click Save Chart to have your chart created:

    analytics-violated-policies-2

Creating a Custom Dashboard

After you create custom charts, you can display them side by side on a custom dashboard that is unique to you. Any other members of the Organization Administrator role do not share your custom charts or custom dashboard – these views are unique to each user.

If you have not created charts yet, see Creating Custom Charts.

To access your custom dashboard, click the Custom Dashboard tab at the top of the window:

analytics-custom-dashboard

  1. The first time you open your custom dashboard, it is blank. Click Edit Dashboard in the upper right.

  2. Drag and drop charts from the drawer on the left of the screen onto your dashboard, rearranging them as needed into the order that you want.

    If you don’t have any charts yet, see Creating Custom Charts.

  3. After you add a chart to your dashboard, you have the option to open it for editing or click the X to remove it from your dashboard.

  4. Once you are satisfied with your custom dashboard, click Save Dashboard in the upper right. You are redirected to a view of your saved custom dashboard.

custom-dashboard

When you view your custom dashboard, note that you have a date range picker in the upper left corner that allows you to adjust the time period for all the charts on your dashboard.

Exporting Analytics Data

You can export your analytics data from the charts displayed on your Overview Dashboard or your Custom Dashboard. On either dashboard, click the export icon to download a .csv file with the data for that chart.

analytics-export-icon.png

For Example:

export

Note that the data that you download reflects the selection of the filtering options offered in the upper left corner of your dashboard. However, if you are exporting chart data from the Overview Dashboard and you have selected one or more subsections of a chart, the export files do not reflect that selection – instead any export always contains the full data for that chart without considering the chart-level filters that you may have applied.

See Also