← All posts

What is API Analytics?

• Written by Gsanalytic
What is API Analytics

Analytics is used for the discovery, interpretation, and communication of meaningful patterns in data



Analyzing data can determine the relationship between different parts of data and whether patterns exist. However, there are different ways to analyze data based on the type and origin. Therefore, the analyst has to choose a certain analysis to perform. This is preferably one that fits the type of data they have collected.



The two main types of data are qualitative or quantitative.





  • Generally speaking, qualitative data can be an observation that is good, bad, colorful, tall, strong, etc.




  • Quantitative data are observed as numbers.





A qualitative analyst at an art show may describe the quality of a painting by observing it then writing down words. In contrast, a quantitative analyst may measure the dimensions of the paintings and record numbers.



API analytics are all the ways that we can record qualitative and quantitative data from our API requests to be used in a meaningful way.



If we wanted to know how long an API request took, we could measure the latency. Latency is the time interval between events. Computers can do things pretty quickly, so this is usually measured in milliseconds (ms.).



Why Collect Qualitative Analytics?



Despite the importance of quantitative data in API analytics qualitative data plays an important role. An example of qualitative data in API analyses is the HTTP method of the request.



Additionally, you can use qualitative data to help categorize quantitative data. For example, a user is complaining that a certain action on their app takes a long time. In your analysis, you notice that a POST request (a type of HTTP method) is sent when the user performs the action and that it has an abnormally high latency. In this simple example, the use of both qualitative and quantitative API analytics produced a meaningful discovery in the data.



Why is API Analytics Important?



The importance of API analytics is inferred from the simple example at the end of the previous section. If someone collects analytics, they could use the analytics to describe, diagnose, prescribe, or predict patterns in the data.



These analytics have the power to solve real-world business problems that have a monetary impact on the organization.



API Analytics Example



API Analytics Example



To give a concrete example, an organization or developer subscribes to an API and, depending on its pricing, is given a quota. The plan costs $100 per month and allows for 10,000 API requests a month, but any requests over that quota incur a cost of $0.10 per request.



This can be interpreted to mean that any requests over the quota cost ten times more than the requests under the quota.



If the team manager receives an invoice that has an overage cost of $88 at the end of the month, they are going to want to know;



Who sent the 880 extra requests
Why there were so many requests
What they can do to solve this problem


Gsanalytic allows API subscriptions and usage to be divided at the organization, team, application, or API level.



Consequently, determining who sent excess requests is a simple task. You can pinpoint the requests down to the application.



Next, using Gsanalytic analytics, you can view;





  • when the requests were sent




  • what the endpoint was




  • which HTTP method was used




  • the parameters for each request





All of these analytics help you determine why the requests were sent.



Determining what can be done is not as straightforward. There may be a rogue HTTP request function that keeps retrying on failed requests despite incorrect parameters. Another possibility is that the application saw an unexpected increase in users, which means that the forecasted requests were insufficient.



One scenario is solved by fixing the bug in the code, another is solved by upgrading the subscription plan to handle the increase in use.



Either way, the importance of collecting API analytics is clear!


Written by Gsanalytic

Email me your next post


Gsanalytics

Build and hosted in the EU 🇪🇺
100% self-funded and independent
Built by @gsanalytic