Note: The Wrk API is currently in close beta.
Information in this document can change without notice.
Introduction
The Wrk API is organized around REST. Our API has predictable resource-oriented URLs, accepts and returns JSON-encoded requests and responses. It uses standard HTTP response codes authentication, and verbs.
You can interact with the API through HTTP requests from any language or via our Python library.
Authentication
The Wrk API uses API keys to authenticate requests. You can view and manage your API keys in your account.
Your API keys carry many privileges, so be sure to keep them secure. Do not share your key publicly. API keys can be revoked if necessary.
All API requests must be made over HTTPS or the calls will fail.
Core Resources
Errors
HTTP STATUS CODE SUMMARY
200 | OK | Everything worked as expected |
400 | Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 | Unauthorized | No valid API key provided. |
402 | Request Failed | The parameters were valid, but the request failed. |
403 | Forbidden | The API key doesn’t have permissions to perform the request. |
404 | Not Found | The requested resource doesn’t exist. |
429 | Too Many Requests | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests. |
50x | Server Errors | An error with the server has occurred. |
Wrk uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g. a required parameter was missing). Codes in the 5xx range indicate an error with the API service.
Some 4xx errors that could be handled programmatically include an error code that briefly explains the error report.
Attributes
error nullable dictionary
code string
Some errors can be handled programmatically, short string indicating the error code reportedmessage string
A human friendly message providing more details about the error.param nullable string
If the error is parameter-specific, the parameter related to the error.