The WireMock Cloud REST API is served from https://api.wiremock.cloud/v1. It accepts and returns application/json.

Authentication

There are three ways to authenticate yourself with the WireMock Cloud API:

1. API Token authentication (preferred)

Pass an Authorization header of the form Token <api-key>:
request
GET /v1
Authorization: Token <api-key>
Accept: application/json
Your API key can be retrieved from the web application at https://app.wiremock.cloud/account/security. Unfortunately while this is our preferred authentication mechanism, it is not supported by the OpenAPI 3.x specification so it is not the one that features in the generated documentation examples.

2. Basic authentication (legacy)

Pass an Authorization header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:api-key.
request
GET /v1
Authorization: Basic <encoded-value>
Accept: application/json
Your API key can be retrieved from the web application at https://app.wiremock.cloud/account/security. Unfortunately the generated documentation erroneously describes the <encoded-value> as the base64-encoded string username:password rather than username:api-key - at present we cannot fix this.

3. OAuth 2.0 Device Authorization Flow

An enterprise customer wishing to use OAuth 2.0 Access Tokens to authenticate to the WireMock Cloud API, e.g. from their own CLI, and happy to do more integration work, may request access by contacting the WireMock team and then implement the device authorization flow. They can then pass an Authorization header of the form {token_response.token_type} {token_response.access_token}:
request
GET /v1
Authorization: {token_response.token_type} {token_response.access_token}
Accept: application/json

Documentation

The full API is documented under API Reference.