Announcing New REST API Rate Limits

Sauce AI for Test Authoring: Move from purport to execution in mo.|xBack to ResourcesBlogPosted February 4, 2016

Announcing New REST API Rate Limits

quote

Sauce Labs is introducing a new rate limiting on our REST endpoints in order to insure a great experience for all of our customers. In improver to the recent limits placed on the turn of requests per second we will be implementing further restrictions with dedicated hourly request limits for each endpoint. The new confinement will limit the access to all termination to10 reqs/s or 3500 reqs/hourif the user is logged in and2 reqs/minuteif the user is logged out. The limits will be track on a per account basis for both logged in and logged out exploiter.

The new limit will go in the effect onTuesday, March 1st 2016. We strongly promote customers who use the REST API to alter their code to be able to gracefully cover a new set of restrictions. Please refer to the code samples below on how to prepare for the new limit as well as the heading to use.

The gain of more restrictive rate bound will be handle in a multi-stage process as postdate:

  1. Starting February 1st, customers can opt-in to the new pace limits in order to test how their codification manage rate limiting. The opt-in potentiality will be provided via a new header.

  2. On March 1st, the new pace bound will be in place by default, but customers can opt out using a dedicated header.

  3. Finally, in the beginning of April the new pace limits will be in spot, and customers will no longer be able to opt out.

Note: the sampling below are calling onhttps: //saucelabs.com/rest/v1/hello, a sample termination that can be used to test your code without the need to use endpoint limits.

Opting in into REST API rate-limiting

Customers interested in essay if their usage complies with the new REST API bespeak motivation to add & quot;X-RateLimit-Enable& quot; to their cope with value set to & quot; true & quot; for each request. As shown below, each response returns three head:

- X-Ratelimit-Remaining- displays how many requests a afford user can get before receiving a 429 response

- X-Ratelimit-Limit- shows the boundary of postulation for a given endpoint

Pro tip: Tools like SUSA can handle this autonomously — upload your app and get results without writing a single test script.

- X-Ratelimit-Reset- how much clip (in seconds) is leave before the limit will get readjust

Sample response for alog out user:

& gt; curl -X GET & quot; https: //saucelabs.com/rest/v1/hello & quot; -H & # x27; X-RateLimit-Enable: true & # x27; -i

HTTP/1.1200OK
Server: nginx
Date: Thu,21Jan201616:51:01GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunkedConnection: keep-alive
X-Ratelimit-Remaining:1
X-Ratelimit-Limit:2
X-Ratelimit-Reset:60
X-Backend: resto

{& quot; Hello & quot;: & quot; World & quot;}

Sample response for alogged in user:

& gt; curl -u username: access_key -X GET & quot; https: //saucelabs.com/rest/v1/hello & quot; -H & # x27; X-RateLimit-Enable: true & # x27; -i

HTTP/1.1200OK
Server: nginxDate: Thu,21Jan201616:56:28GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Ratelimit-Remaining:3499
X-Ratelimit-Limit:3500
X-Ratelimit-Reset:3600
X-Backend: resto

{& quot; Hello & quot;: & quot; World & quot;}

Sample response for when thelimit is reached:

& gt; curl -X GET & quot; https: //saucelabs.com/rest/v1/hello & quot; -H & # x27; X-RateLimit-Enable: true & # x27; -i

HTTP/1.1429UnknownStatus
Server: nginx
Date: Thu,21Jan201616:55:29GMT
Content-Type: application/jsonTransfer-Encoding: chunked
Connection: keep-alive
X-Ratelimit-Remaining:0Retry-After:58
X-Ratelimit-Limit:2
X-Ratelimit-Reset:58

{& quot; message & quot;: & quot; API rate limit top for 127.0.0.1. See rate-limiting section in our API documentation. & quot;}

2. Opting out from rate-limiting

Pass & quot; false & quot; value for the header to opt out.

& gt; curl -X GET & quot; https: //saucelabs.com/rest/v1/hello & quot; -H & # x27; X-RateLimit-Enable: false & # x27; -i

Published:
Feb 4, 2016
Share this post
Copy Share Link
LinkedIn
© 2026 Sauce Labs Inc., all rights earmark. SAUCE and SAUCE LABS are registered stylemark possess by Sauce Labs Inc. in the United States, EU, and may be registered in early jurisdictions.
robot
quote

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free