Testmo uses HTTP status codes to indicate if API calls were successful or have failed. Successful API calls return a
2xxresponse (typically a
200 OK). API calls with errors are represented by
4xx(client-side errors) and
5xx(server-side errors) status codes.
Typical HTTP status codes for errors include
401(authentication problems such as invalid API tokens),
404(unknown or deleted objects) or
429(API rate limit reached).
The following table lists typical HTTP error status codes that Testmo API methods return:
If you send more than a typical amount of API requests at once or in a short period of time, Testmo may throttle or limit API requests. Testmo returns a
429status code for API requests that were denied due to reaching a rate limit. Such responses include a
Retry-Afterheader with the minimum amount of time to wait before sending another request (if the
Retry-Afterheader is not included in the response, you should at least wait for 60 seconds).
If you plan to send a large amount of API requests, please consider adding small wait times between API requests to avoid rate limits. Hitting the rate limit too many times may also result in longer periods of
429responses or might even (temporarily) limit the API for your Testmo account.
Sending many test results?
Also consider using our Testmo CLI tool to send your test results instead of using the API directly. Our CLI tool automatically sends test results in bulk and comes with many other useful features built on top of the API.