The Analytics API provides users with key information about their API usage, and how that compares with the call quotas established for each API or API method.
The data pertaining to usage against the limit of a specific resource is called rate-limit data, and you can use the Analytics API to get rate-limit data on a per-user or per-application basis.
The following are the main resources of the Analytics API:
GET methods in each of these resources returns the rate-limit data for an application and a user, respectively. Rate-limit data consists of the following information:
limit– The quota, or the total number of requests you can make against a resource within the stated time window.
remaining– The remaining number of requests the user or application can make to the associated resource before reaching the quota.
reset– The date and time the limit and remaining values are reset.
timeWindow– The length of the time window to which the quota is applied, expressed in seconds.
Business use cases
The following are some of the Analytics API's high-level use cases:
The data returned by the methods in the Analytics API lets users review the current resource usage and lets them compare that to the quota given for each resource. Developers can take action depending on the remaining requests available before the quota resets. If the user or application is in danger of reaching the call limit, developers can programmatically throttle their request rate, at least until the time window is reset.
Retrieve call-limit data for an application
Each application can make a set number of requests to any one resource for an eBay-specified time window. The getRateLimit method returns call-limit data for a set of resources. For each resource returned, the call-limit data includes the number of calls an application can make against a resource in a given time window, the number of calls remaining for the current time window, the data and time the time window resets, and the specified length of time for the resource.
Retrieve call-limit data for a user
Much like using getRateLimit for retrieving application-specific call-limit data, use the getUserRateLimit method to retrieve call-limit data for a specific user of an application.
The Analytics API is not restricted by marketplace or user.