Dispatches API

This is the API used to dispatch runs.

Authentication

To authenticate into the RWX API, create an organization access token or a personal access token and pass it in the authorization header as a bearer token.

Authorization: Bearer 

Content Type

The API only accepts and responds with JSON.

Content-Type: application/json

Dispatching a Run

Use the POST /mint/api/runs/dispatches endpoint to create a dispatch request and then poll GET /mint/api/runs/dispatches/:dispatch_id until the run ID for your dispatch is available. For example, the following curl:

curl -X POST https://cloud.rwx.com/mint/api/runs/dispatches \
  -H "Authorization: Bearer $RWX_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"key": "deploy-application", "params": { "deployment-target": "staging" }, "ref": "main", "title": "Title for my run"}'

will result in a response status of 201 and a response body of {"dispatch_id": "1"}. You can then take that ID and curl:

curl -X GET https://cloud.rwx.com/mint/api/runs/dispatches/1 \
  -H "Authorization: Bearer $RWX_ACCESS_TOKEN" \
  -H "Accept: application/json"

which will result in a response status of 200 and one of the following response bodies:

example response bodies
{"status": "not_ready"}
{"status": "error", "error": "some error message"}
{"status": "ready", "runs" [{"run_id": "2", "run_url": "https://cloud.rwx.com/mint/org/runs/2"}]}