If you haven't seen it already, you can take a look at our Getting started with Gearset API guide, and our full API reference provides full details of the endpoints that Gearset exposes.
Usage Limits
Use of the Gearset API is subject to a fair usage policy. There are limits on how frequently API endpoints can be used. These limits are subject to change. Currently, they are:
100 requests per hour per action per job to:
Initiate an action with the automation API (e.g. starting/cancelling a continuous integration job run). These are the POST Requests for the automation API.
5 requests per 5 seconds per action per job to:
Query the status of something with the automation API (e.g. getting the status of a continuous integration job). These are the GET requests for the automation API
10 requests per hour per endpoint to:
Query the reporting API V1/V2 (e.g. lead time for changes as a GET or POST request) except the 'status' endpoint (see below)
Query the audit API (e.g. deployment audit)
12 requests per minute to:
Query the reporting API V2 status endpoint to poll the state of a request (e.g waiting for a lead time for changes request to complete so you can grab the result)
Each endpoint will return headers indicating how close your team is to the limit for that endpoint:
Header | Description |
X-Rate-Limit-Limit | The period over which requests are limited (e.g. 5s for getting job status). Returned when your team has not exceeded the limit. |
X-Rate-Limit-Remaining | How many more requests you are permitted to make within X-Rate-Limit-Limit. Returned when your team has not exceeded the limit. |
X-Rate-Limit-Reset | The date/time (UTC, in ISO-8601 format) when the limit will reset for this endpoint. Returned when your team has not exceeded the limit. |
Retry-After | You should retry after this number of seconds. Returned when your team has exceeded the limit for this endpoint. |