The Reporting API endpoints can use these types of rate limiting:
-
Request count-based rate limiting
-
Cost-based rate limiting
-
Async flow rate limiting
Check the report documentation under Available reports to see which rate limiting types the report uses.
Request count-based rate limiting
The request count-based rate limiting restricts the serving of API responses based on the number of requests made in a time interval of one minute.
The rate limiting value is configured individually for each API endpoint. Check the report documentation under Available reports.
If multiple API clients within the same account are calling the API, the rate limit is applied globally to all the API clients at a given time. When the limit is reached, the API responds with an HTTP 429 error, and you can't make new requests until the next rate-limiting bucket refill. You need to consider the limit when you call successive operations as part of a loop.
These response headers show the request count-based rate limiting values:
Header | Description |
---|---|
akamai-sync-ratelimit-limit | The maximum number of your allowed hits stored in a bucket. |
akamai-sync-ratelimit-remaining | The remaining number of your allowed hits. |
akamai-sync-ratelimit-refill | The number of allowed hits to be added to a bucket during a refill. |
akamai-sync-ratelimit-next | The date and time of the next bucket refill. |
akamai-sync-ratelimit-reset | The date and time when the bucket will be fully refilled. |
Cost-based rate limiting
The cost-based rate limiting focuses on the resources consumed by each API request. The cost value is assessed based on factors such as the computational resources used. This can be correlated with metrics like the volume of data processed, including the data range and the number of business objects, or the complexity of operations involved in generating results, such as multiple aggregations, complex filtering, or heavy regular expressions.
The API endpoints implement a leaky bucket algorithm that keeps track of the limit consumed by an account and an API endpoint. The client receives a rate limiting response after exhausting all allocated tokens in a time interval. Upon receiving this response, the client should pause sending requests until the specified time. If multiple requests encounter rate limits, consider introducing an additional jitter beyond the bucket refill time to help reduce the load on the system and get a successful response.
These response headers show the cost-based rate limiting values:
Header | Description |
---|---|
akamai-sync-costratelimit-limit | The maximum number of tokens stored in a bucket. |
akamai-sync-costratelimit-remaining | The remaining number of tokens. |
akamai-sync-costratelimit-refill | The number of tokens to be added to a bucket during a refill. |
akamai-sync-costratelimit-next | The date and time of the next bucket refill. |
akamai-sync-costratelimit-reset | The date and time when the bucket will be fully refiled. |
Async flow rate limiting
There is a limit of concurrent asynchronous POST requests for an account. These are requests which are either actively being processed or waiting for the processing, for which the data isn’t ready yet. Check the rate limiting value in the report documentation under Available reports.
These response headers show the rate limiting values for the async flow:
Header | Description |
---|---|
akamai-async-maxactivequeries | The maximum limit of your allowed active async queries. |
akamai-async-activequeries | The number of currently active async queries. |
akamai-async-remainingactivequeries | The number of remaining async queries that you can run before hitting the limit. |
Additionally, these response headers show the hit-based rate limits for the GET data endpoint:
Header | Description |
---|---|
akamai-async-ratelimit-limit | The maximum number of your allowed hits stored in a bucket. |
akamai-async-ratelimit-remaining | The remaining number of your allowed hits. |
akamai-async-ratelimit-refill | The number of allowed hits to be added to a bucket during a refill. |
akamai-async-ratelimit-next | The date and time of the next bucket refill. |
akamai-async-ratelimit-reset | The date and time when the bucket will be fully refilled. |