Overview
Overview of the QA Sphere Public API
Welcome to the QA Sphere API documentation. Our API allows you to programmatically manage test cases, runs, and results in your QA Sphere projects.
Authentication
All API requests require authentication using an API key. See the Authentication guide to get started.
Base URL
https://{your-company}.{your-region-code}.qasphere.com/api/public/v0Response Format
All responses are returned in JSON format. Successful responses typically include:
- Status codes in the 2XX range
- Data specific to the endpoint
- Pagination information where applicable
Error responses have a 4XX or 5XX status code and a JSON body with a message. See Errors for the format, the common status codes and when to retry.
Field Types
Request and response schemas are written in a TypeScript-like notation. Besides string, number and boolean, they use two types for strings with a set format:
datetime: a date and time in RFC 3339 format (a profile of ISO 8601), such as2025-01-16T09:12:00Z. Responses can include fractional seconds and a time zone offset, such as2025-03-25T10:48:14.243475+02:00.html: rich text as HTML. The API sanitizes it and keeps only the supported markup; see HTML Support.
Compatibility
API v0 changes are additive only. Existing endpoints keep their response shapes, identifiers and defaults. New endpoints, optional request fields and response fields may be added, so clients should ignore response fields they do not recognize.
Rate Limiting
API requests are rate limited to protect the service and ensure fair usage.
- 20 requests per second sustained, per user, with a burst capacity of 40
The limit is applied per user, not per API key. Every API key you create belongs to the user who created it, and all of that user's API keys and OAuth authorizations draw from the same 20 requests per second. Creating additional API keys under the same account will not raise your throughput — if you need more, distribute the work across separate user accounts.
The limit uses a token bucket with a capacity of 40 that refills at 20 tokens per second, and each request consumes one token. A client that has been idle for at least two seconds can therefore issue up to 40 requests at once; after the bucket is drained, sustained traffic is capped at 20 requests per second. There is no saving up beyond the 40-token capacity.
Handling a 429
When you exceed the limit, the API returns 429 Too Many Requests:
{
"message": "too many requests, please try again later"
}The response includes a Retry-After header giving the number of seconds to wait before the
next request will be accepted:
HTTP/1.1 429 Too Many Requests
Retry-After: 1
X-RateLimit-Scope: public_apiWait at least that long before retrying. If the header is missing, fall back to exponential backoff.
X-RateLimit-Scope: public_api marks a 429 Too Many Requests that came from the per-user throughput limit — your
credentials were accepted and only your request rate was too high, so retrying after Retry-After
will succeed.
Repeated authentication failures
A 429 Too Many Requests without the X-RateLimit-Scope header means the requests reaching us are being
rejected before they are authenticated. Sending invalid credentials repeatedly gets your IP rate
limited even though no single request succeeds, so make sure retry logic stops on 401 Unauthorized instead of
retrying it — waiting out a single Retry-After will not clear this one while the failures
continue.
OAuth device flow limits
The device flow has separate limits for token polling and for code requests.
Token polling does not use 429 Too Many Requests. When a device client polls too frequently, the token
endpoint returns 400 Bad Request with an RFC 8628 slow_down error:
{
"error": "slow_down",
"error_description": "polling too frequently"
}| Limit | Scope | Applies to | Handled by |
|---|---|---|---|
| 1 per 5 seconds | Per device code | Polling the token endpoint (RFC 8628 §3.4) | The OAuth client or tool |
| 120 per minute | Per IP address | All requests to the token endpoint, from all OAuth flows | The OAuth client or tool |
Token polling is normally performed by the OAuth client or tool, not by the person authorizing
it. The client must start with the interval returned by the device authorization endpoint. If
the token endpoint returns slow_down, it must increase that interval by 5 seconds before
continuing to poll, as RFC 8628 §3.5 describes. Do not depend on a Retry-After header on a
slow_down response. The QA Sphere CLI handles this automatically.
The device authorization endpoint (§3.1) accepts 30 requests per minute per IP address. This limit is
shared with the revocation endpoint and the OAuth consent screen. Above that, the endpoint returns
429 Too Many Requests with a Retry-After header. Requesting a new device code starts a new
authorization attempt and is under the user's control. After a 429 Too Many Requests, wait for the
Retry-After time before starting another attempt instead of repeatedly requesting new codes.
Staying under the limit
- Retry on
429 Too Many Requestswith exponential backoff, honoringRetry-After - For ordinary public API requests, do not retry
4xxresponses other than429 Too Many Requests. OAuth device flow clients must continue onauthorization_pendingand retry more slowly onslow_down - Use batch endpoints instead of many individual requests where one exists
- Cache responses that change infrequently, such as project and folder listings
- Keep client-side concurrency modest; parallel workers share the same per-user budget
If you use the QA Sphere CLI, all of this is handled
for you, from v0.8.0 onward. Earlier versions do not recognize 429 Too Many Requests and will fail against these
limits, so upgrade if you are on v0.7.0 or older.
Getting Started
- Create an API key
- Test the authentication with the tags endpoint
- Explore the available endpoints based on your needs
Need Help?
- Contact support for assistance
- Report issues through your account dashboard