28 March 2016
Basic knowledge of API Manager
In today’s world if you do not analyze your systems, your process, and data, then you can easily lose focus in your core business and become inefficient. Analysis helps you to pin point focus areas irrespective of the business you are in. For instance, a social network site can analyze the load on its servers and can accordingly scale with minimum possible resources.
With increasing demand of analyzing data, there is a need for tools for accurate data analysis. With this in mind, the API Manager provides highly configurable, user friendly, and powerful Analytics Dashboards that gives you a 360 degree insight of your APIs.
This screenshot shows how Analytics dashboard looks like.
The Analytics Dashboard in API Manager consists of multiple dashboards separated logically. For example, a publisher dashboard has the following panels:
You can switch between different dashboards using the links at the top, as shown below. Your current dashboard is displayed with the search bar, as shown in blue in the screenshot below:
Each dashboard has multiple visualizations (or charts or graphs). Visualizations can be of different forms like pie, donut, bars, and lines. Each visualization provides you information based on the fields they are made of. Fields are a set of different data collected from the API manager, such as, API name, API version, type of request, and response time of request.
A pie visualization on an API name in a particular time frame displays the usage of the APIs .Behind the scenes, it calculates the number of requests from each API. You can also see the count of requests and percentage usage when you mouse-over the visualizations.
A line visualization with response time on X-Axis and time on Y-axis depicts the performance of your APIs in a particular time frame.
The API Manager has different roles: Admin, Publisher, and Subscriber. The Analytics dashboard is available to all the roles. Each Publisher has his own dashboard and can modify (edit, delete, or add) dashboards or visualizations.
If publisher A modifies his dashboard, then publisher B cannot view any modifications. Only publisher A can view the modifications. However in an Administrator dashboard, all administrators can view the modifications.
Subscribers cannot modify their dashboards. Subscribers can only share their dashboards.
Install the API Manager, set up some APIs, and make few API calls.
Once you log in into the portal, you can see a link to launch the Analytics dashboard, as shown in the image below. The dashboard depends on your role.
This section briefly explains the commonly used features in an Analytics dashboard.
Analytics dashboard represents data only for a selected time frame. By default, the time frame is set to the last 15 minutes. You can only analyze the requests that were hit in the last 15 minutes. You can configure the time frame in the dashboard. You can choose a value, such as, 'this day' or 'this year' depending on your requirements.
A custom time frame selected is cached in browser and remains valid until you close the tab or you change the time frame.
To change a time frame, click on the top right link on the navigation bar. A drop-down frame opens with the tabs - Time Filter and Refresh Interval.
In the Time Filter tab, there are three options - Quick, Relative, and Absolute.
In the Quick tab, you can select commonly used intervals like 'Today', 'Yesterday', 'Last 15 mins', or 'Last 30 mins', as shown below.
In the Relative tab, you can customize the time frame further through month and time, as shown below.
You can also choose a time frame directly from visualizations. While analyzing a visualization using a minute bucket (a bucket is the time gap on X-axis in Time based visualization), you can drill down to view details for each second in a particular minute. Check the screenshot below for reference.
If you see the first visualization, it displays the data for approximately 6 minutes. To view the visualization in 16:20 minute, click the time and drag it to the desired time. The time frame for that particular grey shaded area is selected and all visualizations change accordingly. To see the effect, check the screenshot below.
You can see that the time frame for all the visualizations have changed. Even if you have selected the time frame in one visualization, the time frame applies to the entire dashboard.
If the dashboard does not display any data, then probably there was no request in the selected time frame. Increase the time frame, for example, from 15 minutes to 'this day'.
If you want to monitor your dashboard continuously for some time, it is not feasible to refresh the links frequently. In the Refresh Interval tab, you can select a desired time interval for refresh. The values are configurable in seconds, minutes, hours, or a day.
According to the value selected, all visualizations in a dashboard refreshes the data on their own. The refresh interval is also cached in browser and remains same until you close the tab or change the value.
Note: Selecting a low refresh value like 5 seconds can consume your bandwidth. Conversely, if the refresh value is last 3 months, then it can take a few seconds to load the data. So larger the time frame, higher should be the refresh interval.
If an Administrator wants to analyze data for a particular Publisher or if a Publisher wants to analyze data for a particular API or if a Subscriber wants to analyze usage pattern of an application, a useful way is to apply field-level filters.
Select a particular data point in a visualization. For example, if it is a pie data, then click on a particular portion of the pie. You can see that a filter is applied for that value.
In the screenshot above, the first visualization - Request Count for Publishers, you can see the following:
If you want to analyze the publisher that has made maximum API requests, click on the green portion of first pie visualization. See the results in the screenshot below.
Similarly, you can apply field-based filters for all data in any visualization. In time-based visualizations, you can select a particular data point, or in bar-based visualizations, you can select a particular bar.
You can also choose multiple filters at one point, as shown below.
The first visualization is a multi-layered pie-based visualization. The innermost layer displays the API name, the middle layer displays the API version, and the outermost layer displays the resource path. If you click on the outermost layer in order, then you have applied three filters together, API name, version, and resource path.
When you apply a filter, you can see the filter below the search bar. If you mouse-over on the filter, you can see three icons – Disable, Inverse, and Delete.
If you click Disable, you can simply disable the filter, but cannot delete it. If you click Inverse, you can see the results without the filter. If you click Delete, you can delete the filter.
From the search bar, you can search for an API.
For example, if there is an API PublisherDashboardUserSample, then from a pie visualization, you see data only for that API by clicking on a particular portion of that API. From the search bar, type
An example is shown below.
You can also type "status: success" or "status: error" to see all successful or unsuccessful requests.
Note: You can also use wild cards in search bar like "publisher: california*"
There are five different dashboards in the Analytics dashboard for publishers:
Home: It the landing dashboard that provides an overall analysis of your data. It has a time line visualization that displays all successful and unsuccessful requests. It also shows a pie visualization of successful and unsuccessful API requests. The Home dashboard is a bird's eye view of your complete API data.
API: In the APIs dashboard, can compare different APIs with each other. Like time-line based visualizations, the APIs dashboard have different lines for different APIs. There are other visualizations like pie-based visualizations to show request count per API (innermost layer), versions (middle layer), and Resources (outermost layer). You can drill down to the resource level easily.
APIs and versions: In this dashboard, most visualizations are similar, but there are different lines for different versions for a single API. You can compare different versions of each API in this dashboard.
Developers: If your focus area is SLA plans (like Gold, Silver, Platinum, and so on) or types of requests (like Get, Post, and so on) or subscribers or applications, then use the Developers dashboard. It gives you a better perspective of your data from a developer (subscriber) point of view.
Errors: If you want to focus on the errors generated in your APIs, then use the Errors dashboard. The Errors dashboard gives you a complete picture of all kinds of errors. Other useful visualizations include Error count for API's or for Applications, different types of error being hit, and different type of status codes generated with variations of pie and line-based visualizations.
The Administrator Analytics dashboard provides a comprehensive view of the API administrator actions, such as, number of publishers or number of APIs. The dashboard also provides flexibility to create, modify, and view your own custom dashboards.
You can combine multiple visualizations into a single page, and then filter them by providing a search query, or by selecting filters by clicking elements in the visualization.
There are three categories in the Analytics dashboard for Administrators:
The Home dashboard is the landing page that provides an analytical insight of your data. The dashboard contains, for example, request count per node in the form of a pie chart. This is important if you have a cluster setup.
The dashboard also displays the number of requests served by different nodes in the cluster. You can see the following:
The Publisher APIs dashboard provides information about the number of publishers, number of APIs published, and number of requests served per publisher. The dashboard displays a pie-based visualization for request count for publishers, request count for APIs, and request count for nodes.
The dashboard also contains aggregated metrics data, such as, total request count, API count and, publisher count.
The Publishers dashboard provides information about the number of publishers and requests served per publisher. The dashboard consists of a Pie visualization for request count for publishers, request count for APIs, and request count for nodes.
The dashboard also contains aggregated metrics data, such as, total request count and publisher count.
You can create customized dashboards in Administrator Analytics dashboard.
The Subscriber dashboard provides information about the applications that a subscriber has created, such as, subscriptions (API and Application) and errors. You can modify the dashboard. You can only view and share one.
There are three categories in the Analytics dashboard for Subscribers:
The Applications dashboard is the landing page that provides an analytical insight of your data. The dashboard contains request count per application visualized as a pie-chart. The dashboard also displays a time line visualization to display the same data.
The Subscriptions dashboard displays request count per subscription (API and Application) as a pie chart. The pie chart contains the following:
You can drill down to resource level requests easily. The Subscriptions dashboard also contains an area chart visualization to display the same data. The screenshot below displays the other metrics on this dashboard.
The Errors dashboard provides all error-related information. It helps in monitoring the kind of errors being thrown while accessing APIs. The other visualizations include Error count for subscriptions (API and Application) and plans.
In this dashboard, you can apply filter on the basis of applications, APIs, and plans. It also has different type of error codes, and different type of status codes generated with variations of pie and a6rea chart-based visualizations.