swagger: '2.0' info: description: The Analytics API retrieves call-limit data and the quotas that are set for the RESTful APIs and the legacy Trading API.

Responses from calls made to getRateLimits and getUerRateLimits include a list of the applicable resources and the "call limit", or quota, that is set for each resource. In addition to quota information, the response also includes the number of remaining calls available before the limit is reached, the time remaining before the quota resets, and the length of the "time window" to which the quota applies.

The getRateLimits and getUserRateLimits methods retrieve call-limit information for either an application or user, respectively, and each method must be called with an appropriate OAuth token. That is, getRateLimites requires an access token generated with a client credentials grant and getUserRateLimites requires an access token generated with an authorization code grant. For more information, see OAuth tokens.

Users can analyze the response data to see whether or not a limit might be reached, and from that determine if any action needs to be taken (such as programmatically throttling their request rate). For more on call limits, see Compatible Application Check. version: v1_beta.0.0 title: Analytics API contact: name: eBay Inc. license: name: eBay API License Agreement url: https://go.developer.ebay.com/api-license-agreement host: api.ebay.com basePath: /developer/analytics/v1_beta schemes: - https paths: /rate_limit/: get: tags: - rate_limit description: This method retrieves the call limit and utilization data for an application. The data is retrieved for all RESTful APIs and the legacy Trading API.

The response from getRateLimits includes a list of the applicable resources and the "call limit", or quota, that is set for each resource. In addition to quota information, the response also includes the number of remaining calls available before the limit is reached, the time remaining before the quota resets, and the length of the "time window" to which the quota applies.

By default, this method returns utilization data for all RESTful API and the legacy Trading API resources. Use the api_name and api_context query parameters to filter the response to only the desired APIs.

For more on call limits, see Compatible Application Check. operationId: getRateLimits produces: - application/json parameters: - name: api_context in: query description: This optional query parameter filters the result to include only the specified API context.

Valid values: required: false type: string - name: api_name in: query description: This optional query parameter filters the result to include only the APIs specified.

Example values: required: false type: string responses: '200': description: OK schema: $ref: '#/definitions/RateLimitsResponse' '204': description: No Content '500': description: Internal Server Error x-response-codes: errors: '105000': domain: API_ANALYTICS category: APPLICATION description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance. security: - Client Credentials: - https://api.ebay.com/oauth/api_scope /user_rate_limit/: get: tags: - user_rate_limit description: This method retrieves the call limit and utilization data for an application user. The call-limit data is returned for all RESTful APIs and the legacy Trading API that limit calls on a per-user basis.

The response from getUserRateLimits includes a list of the applicable resources and the "call limit", or quota, that is set for each resource. In addition to quota information, the response also includes the number of remaining calls available before the limit is reached, the time remaining before the quota resets, and the length of the "time window" to which the quota applies.

By default, this method returns utilization data for all RESTful APIs resources and the legacy Trading API calls that limit request access by user. Use the api_name and api_context query parameters to filter the response to only the desired APIs.

For more on call limits, see Compatible Application Check. operationId: getUserRateLimits produces: - application/json parameters: - name: api_context in: query description: This optional query parameter filters the result to include only the specified API context.

Valid values: required: false type: string - name: api_name in: query description: This optional query parameter filters the result to include only the APIs specified.

Example values: required: false type: string responses: '200': description: OK schema: $ref: '#/definitions/RateLimitsResponse' '204': description: No Content '500': description: Internal Server Error x-response-codes: errors: '105000': domain: API_ANALYTICS category: APPLICATION description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance. security: - Authorization Code: - https://api.ebay.com/oauth/api_scope/sell.inventory - https://api.ebay.com/oauth/api_scope/sell.inventory.readonly - https://api.ebay.com/oauth/api_scope/sell.marketplace.insights.readonly - https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly - https://api.ebay.com/oauth/api_scope/sell.marketing - https://api.ebay.com/oauth/api_scope/sell.marketing.readonly securityDefinitions: Authorization Code: description: The security definitions for this API. Please check individual operations for applicable scopes. type: oauth2 authorizationUrl: https://auth.ebay.com/oauth2/authorize tokenUrl: https://api.ebay.com/identity/v1/oauth2/token flow: accessCode scopes: https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly: ' This scope would allow signed in user to read catalog data.' https://api.ebay.com/oauth/api_scope/sell.marketing.readonly: View your eBay marketing activities, such as ad campaigns and listing promotions https://api.ebay.com/oauth/api_scope/sell.inventory: View and manage your inventory and offers https://api.ebay.com/oauth/api_scope/sell.marketing: View and manage your eBay marketing activities, such as ad campaigns and listing promotions https://api.ebay.com/oauth/api_scope/sell.inventory.readonly: View your inventory and offers https://api.ebay.com/oauth/api_scope/sell.marketplace.insights.readonly: ' This scope would allow signed in users read only access to marketplace insights.' Client Credentials: description: The security definitions for this API. Please check individual operations for applicable scopes. type: oauth2 tokenUrl: https://api.ebay.com/identity/v1/oauth2/token flow: application scopes: https://api.ebay.com/oauth/api_scope: View public data from eBay definitions: Rate: type: object properties: limit: type: integer description: The maximum number of requests that can be made to this resource during a set time period. The length of time to which the limit is applied is defined by the associated timeWindow value.

This value is often referred to as the "call quota" for the resource. remaining: type: integer description: The remaining number of requests that can be made to this resource before the associated time window resets. reset: type: string description: The data and time the time window and accumulated calls for this resource reset.

When the reset time is reached, the remaining value is reset to the value of limit, and this reset value is reset to the current time plus the number of seconds defined by the timeWindow value.

The time stamp is formatted as an ISO 8601 string, which is based on the 24-hour Universal Coordinated Time (UTC) clock.

Format: [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss].[sss]Z
Example: 2018-08-04T07:09:00.000Z timeWindow: type: integer description: A period of time, expressed in seconds. The call quota for a resource is applied to the period of time defined by the value of this field. description: This complex type defines a "rate" as the quota of calls that can be made to a resource per time window, the remaining number of calls before the threshold is met, the amount of time until the time window resets, and the length of the time window (in seconds). RateLimit: type: object properties: apiContext: type: string description: The context of the API for which rate-limit data is returned. For example buy, sell, commerce, developer or tradingapi. apiName: type: string description: The name of the API for which rate-limit data is returned. For example browse for the Buy API, inventory for the Sell API, taxonomy for the Commerce API, or tradingapi for Trading API. apiVersion: type: string description: The version of the API for which rate-limit data is returned. For example v1 or v2. resources: type: array description: A list of the methods for which rate-limit data is returned. For example item for the Feed API, getOrder for the Fulfillment API, getProduct for the Catalog API, AddItems for the Trading API. items: $ref: '#/definitions/Resource' description: This complex types defines the resource (such as an API method) for which the rate-limit data is returned.

A method is included in an API, and an API is part of an API context for the API version specified. RateLimitsResponse: type: object properties: rateLimits: type: array description: The rate-limit data for the specified APIs. The rate-limit data is returned for all the methods in the specified APIs and data pertains to the current time window. items: $ref: '#/definitions/RateLimit' description: This complex type defines a list of rate-limit data as it pertains to a method within the specified version of an API. Resource: type: object properties: name: type: string description: The name of the resource (an API or an API method) to which the rate-limit data applies. rates: type: array description: A list of rate-limit data, where each list element represents the rate-limit data for a specific resource. items: $ref: '#/definitions/Rate' description: This complex type defines the resource (API method) and the current rate-limit data for that resource.