API routes | RelayRunner Docs
API routes
Every route in the RelayRunner API, with its parameters and responses.
1.0.0
OpenAPI 3.1.0
RelayRunner API
https://relayrunner.dev/docs/reference/api
Apache-2.0
Download OpenAPI Document json Download OpenAPI Document yaml
The API behind the RelayRunner MCP server: a workspace's runners, runs, routing and usage. Sign in with OAuth (the workspace:read scope): the person picks which workspaces the token may read. The routes that change settings work only in workspaces where the person turned on Allow changes for the connection in Settings › Agents. To connect an AI agent, use the MCP server at https://agents.relayrunner.app/mcp instead: MCP clients sign in on their own and get these routes as tools. Call this API directly only from your own OAuth client. Each connection can make 300 requests a minute; past that the API answers 429.
Server
Server:https://api.relayrunner.dev/api
AuthenticationRequired
Authorize
| OAuth 2.1 with PKCE. Clients can register themselves (dynamic client registration). Discovery: https://app.relayrunner.dev/.well-known/oauth-authorization-server/api/auth More |
|
| Auth URL: https://app.relayrunner.dev/api/auth/oauth2/authorize Clear Value |
Token URL: https://app.relayrunner.dev/api/auth/oauth2/token Clear Value |
| Redirect URL: https://relayrunner.dev/docs/reference/api/routes Clear Value |
|
| Client ID: | |
| Client Secret: | |
| Use PKCE: SHA-256 |
|
| Credentials Location: header |
|
| Scopes Selected 1 / 1 Add ScopeDeselect All |
Client Libraries
Shell
Ruby
Node.js
PHP
Python
MoreSelect from all clients
Shell Curl
Get the current user
Copy link
Auth Required
Copy as Markdown
The signed-in user and the workspaces this token may read.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The user and the token's grant.
application/json
- 400
The request failed. Branch on error.code; error.message is for people and can change. See https://relayrunner.dev/docs/reference/errors.
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/me
Shell Curl
curl https://api.relayrunner.dev/api/me \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /me)
Status: 200 The user and the token's grant.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"user": {},
"agent": {}
}
JSONCopy
JSONCopy
The user and the token's grant.
Get a workspace
Copy link
Auth Required
Copy as Markdown
One workspace, your role in it and its connected GitHub accounts.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The workspace.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/workspaces/current
Shell Curl
curl https://api.relayrunner.dev/api/workspaces/current \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /workspaces/current)
Status: 200 The workspace.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"workspace": {},
"role": "string",
"installations": [\
{}\
]
}
JSONCopy
JSONCopy
The workspace.
Get the runner order
Copy link
Auth Required
Copy as Markdown
The providers jobs are tried on, top to bottom. With repo, the order that repo's jobs walk: its own (scope is repository) or the workspace's. Without it, ownOrders lists the repos with their own. version changes whenever the order does.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
Query Parameters
- repo
Type: stringCopy link to repo
A repository in the workspace, as owner/name, for its own runner order.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The runner order.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/workspaces/ {workspaceId}/runner-order
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/runner-order' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /workspaces/{workspaceId}/runner-order)
Status: 200 The runner order.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"order": {},
"scope": "workspace",
"isDefault": true,
"version": "string"
}
JSONCopy
JSONCopy
The runner order.
Set the runner order
Copy link
Auth Required
Copy as Markdown
Replaces the workspace's runner order, or with repo gives that repo its own, which it keeps when the workspace's changes. With version, it fails with 409 RUNNER_ORDER_CHANGED if the order changed since that version was read. The workspace's order needs an owner or admin; a repo's, also anyone who can push to it on GitHub. Needs Allow changes for the agent in the workspace (Settings › Agents); otherwise 403 AGENT_CHANGES_OFF. Logged in Activity.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
Query Parameters
- repo
Type: stringCopy link to repo
A repository in the workspace, as owner/name, for its own runner order.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Body
required
application/json
- steps
Type: array ofobject
required
Copy link to steps
- version
Type: stringCopy link to version
Responses
- 200
The new order and the one it replaced.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 409
application/json
- 429
application/json
Request Example for put/workspaces/ {workspaceId}/runner-order
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/runner-order' \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"steps": [\
{}\
],
"version": ""
}'
cURLCopy
cURLCopy
Test Request(put /workspaces/{workspaceId}/runner-order)
Status: 200 The new order and the one it replaced.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 409 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"order": {},
"version": "string",
"previous": {}
}
JSONCopy
JSONCopy
The new order and the one it replaced.
Use the workspace's runner order
Copy link
Auth Required
Copy as Markdown
Puts repo back on the workspace's runner order. The same people as setting the repo's order. Needs Allow changes for the agent in the workspace (Settings › Agents); otherwise 403 AGENT_CHANGES_OFF. Logged in Activity.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
Query Parameters
- repo
Type: string
required
Copy link to repo
A repository in the workspace, as owner/name, for its own runner order.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The order the repo walks now and the one it had.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 409
application/json
- 429
application/json
Request Example for delete/workspaces/ {workspaceId}/runner-order
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/runner-order?repo=' \
--request DELETE \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(delete /workspaces/{workspaceId}/runner-order)
Status: 200 The order the repo walks now and the one it had.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 409 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"order": {},
"previous": {}
}
JSONCopy
JSONCopy
The order the repo walks now and the one it had.
List auto jobs
Copy link
Auth Required
Copy as Markdown
Jobs whose relay lets RelayRunner pick the runner, from the last 30 days, with each one's size and first provider (null is the default) and whether you may change it (canEdit), and the default size.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The default size and the auto jobs.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/workspaces/ {workspaceId}/auto-jobs
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/auto-jobs' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /workspaces/{workspaceId}/auto-jobs)
Status: 200 The default size and the auto jobs.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"size": 1,
"jobs": [\
{}\
]
}
JSONCopy
JSONCopy
The default size and the auto jobs.
Set a job's size
Copy link
Auth Required
Copy as Markdown
One auto job's size in vCPUs and the provider it tries first. Null puts either back on the default; one left out stays as it is. Owners and admins can change any job, and anyone who can push to the job's repo on GitHub can change its jobs. Needs Allow changes for the agent in the workspace (Settings › Agents); otherwise 403 AGENT_CHANGES_OFF. Logged in Activity.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
- jobId
Type: integer
required
Copy link to jobId
Integer numbers.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Body
required
application/json
- first
Type: string|nullenumCopy link to first
values
machine
- github
- blacksmith
- depot
- namespace
- warpbuild
- ubicloud
- boat
- Show all values
size
Type: integer|nullenumCopy link to size
Integer numbers.
values
2481632null
Responses
- 200
The new setting and the one it replaced.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 409
application/json
- 429
application/json
Request Example for put/workspaces/ {workspaceId}/auto-jobs/ {jobId}
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/auto-jobs/1' \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"size": 2,
"first": "machine"
}'
cURLCopy
cURLCopy
Test Request(put /workspaces/{workspaceId}/auto-jobs/{jobId})
Status: 200 The new setting and the one it replaced.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 409 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"previous": {}
}
JSONCopy
JSONCopy
The new setting and the one it replaced.
Set the default size
Copy link
Auth Required
Copy as Markdown
The size, in vCPUs, of auto jobs without their own. Needs Allow changes for the agent in the workspace (Settings › Agents); otherwise 403 AGENT_CHANGES_OFF. Logged in Activity.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Body
required
application/json
- size
Type: integerenum
required
Copy link to size
Integer numbers.
values
2481632
Responses
- 200
The new size and the one it replaced.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 409
application/json
- 429
application/json
Request Example for put/workspaces/ {workspaceId}/auto-size
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/auto-size' \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"size": 2
}'
cURLCopy
cURLCopy
Test Request(put /workspaces/{workspaceId}/auto-size)
Status: 200 The new size and the one it replaced.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 409 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"size": 1,
"previous": 1
}
JSONCopy
JSONCopy
The new size and the one it replaced.
Get automatic retries
Copy link
Auth Required
Copy as Markdown
Whether jobs a runner failed are re-run, where, and how many times per run.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The retry settings.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/workspaces/ {workspaceId}/retry-settings
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/retry-settings' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /workspaces/{workspaceId}/retry-settings)
Status: 200 The retry settings.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"enabled": true,
"runner": "string",
"max": 1
}
JSONCopy
JSONCopy
The retry settings.
Set automatic retries
Copy link
Auth Required
Copy as Markdown
Turns automatic retries on or off. A setting left out stays as it is. Needs Allow changes for the agent in the workspace (Settings › Agents); otherwise 403 AGENT_CHANGES_OFF. Logged in Activity.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Body
required
application/json
- enabled
Type: booleanCopy link to enabled
- max
Type: integer min: 1 max: 2Copy link to max
Integer numbers.
- runner
Type: "any"or"same"or"other"enumCopy link to runner
Responses
- 200
The new settings and the ones they replaced.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 409
application/json
- 429
application/json
Request Example for put/workspaces/ {workspaceId}/retry-settings
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/retry-settings' \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"enabled": true,
"runner": "any",
"max": 1
}'
cURLCopy
cURLCopy
Test Request(put /workspaces/{workspaceId}/retry-settings)
Status: 200 The new settings and the ones they replaced.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 409 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"previous": {}
}
JSONCopy
JSONCopy
The new settings and the ones they replaced.
Get AI
Copy link
Auth Required
Copy as Markdown
When the workspace turned off AI features, or null while they're on.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
Whether AI is off.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/workspaces/ {workspaceId}/ai
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/ai' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /workspaces/{workspaceId}/ai)
Status: 200 Whether AI is off.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"offAt": null
}
JSONCopy
JSONCopy
Whether AI is off.
Turn AI on or off
Copy link
Auth Required
Copy as Markdown
Turning AI off also deletes the AI answers saved so far. Needs Allow changes for the agent in the workspace (Settings › Agents); otherwise 403 AGENT_CHANGES_OFF. Logged in Activity.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Body
required
application/json
- enabled
Type: boolean
required
Copy link to enabled
Responses
- 200
Whether AI is on now, and before.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 409
application/json
- 429
application/json
Request Example for put/workspaces/ {workspaceId}/ai
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/ai' \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"enabled": true
}'
cURLCopy
cURLCopy
Test Request(put /workspaces/{workspaceId}/ai)
Status: 200 Whether AI is on now, and before.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 409 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"enabled": true,
"previous": true
}
JSONCopy
JSONCopy
Whether AI is on now, and before.
List workflows
Copy link
Auth Required
Copy as Markdown
Every workflow that ran in the workspace's repos in the last 14 days, with how many of its runs went through RelayRunner, unrouted first, plus the hosted provider labels jobs ran on.
Path Parameters
- workspaceId
Type: string
required
Copy link to workspaceId
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
Recent workflows and hosted labels.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/workspaces/ {workspaceId}/router-setup
Shell Curl
curl 'https://api.relayrunner.dev/api/workspaces/{workspaceId}/router-setup' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /workspaces/{workspaceId}/router-setup)
Status: 200 Recent workflows and hosted labels.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"days": 1,
"workflows": [\
{}\
],
"labels": [\
{}\
]
}
JSONCopy
JSONCopy
Recent workflows and hosted labels.
List runners
Copy link
Auth Required
Copy as Markdown
Every runner: connected machines and self-hosted runners from GitHub.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The workspace's runners.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/machines
Shell Curl
curl https://api.relayrunner.dev/api/machines \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /machines)
Status: 200 The workspace's runners.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"machines": [\
{}\
]
}
JSONCopy
JSONCopy
The workspace's runners.
Pause a runner
Copy link
Auth Required
Copy as Markdown
Stops routing jobs to a runner, in every workspace, until it's resumed. Only a connected machine's owner, or an owner or admin for a runner added from GitHub. Needs Allow changes for the agent in the workspace (Settings › Agents); otherwise 403 AGENT_CHANGES_OFF. Logged in Activity.
Path Parameters
- machineId
Type: string
required
Copy link to machineId
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The runner.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 409
application/json
- 429
application/json
Request Example for post/machines/ {machineId}/pause
Shell Curl
curl 'https://api.relayrunner.dev/api/machines/{machineId}/pause' \
--request POST \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(post /machines/{machineId}/pause)
Status: 200 The runner.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 409 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"machine": {}
}
JSONCopy
JSONCopy
The runner.
Resume a runner
Copy link
Auth Required
Copy as Markdown
Routes jobs to a paused runner again. Same rules as pausing. Needs Allow changes for the agent in the workspace (Settings › Agents); otherwise 403 AGENT_CHANGES_OFF. Logged in Activity.
Path Parameters
- machineId
Type: string
required
Copy link to machineId
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The runner.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 409
application/json
- 429
application/json
Request Example for post/machines/ {machineId}/resume
Shell Curl
curl 'https://api.relayrunner.dev/api/machines/{machineId}/resume' \
--request POST \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(post /machines/{machineId}/resume)
Show Schema
{
"machine": {}
}
JSONCopy
JSONCopy
The runner.
List runs
Copy link
Auth Required
Copy as Markdown
Workflow runs from the last 14 days, newest first.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
Recent runs.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/runs
Shell Curl
curl https://api.relayrunner.dev/api/runs \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /runs)
Status: 200 Recent runs.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"runs": [\
{}\
],
"truncated": true
}
JSONCopy
JSONCopy
Recent runs.
List a run's jobs
Copy link
Auth Required
Copy as Markdown
One run attempt's jobs and where each ran.
Path Parameters
- repositoryId
Type: integer min: 1
required
Copy link to repositoryId
Integer numbers.
- runId
Type: integer min: 1
required
Copy link to runId
Integer numbers.
- runAttempt
Type: integer min: 1
required
Copy link to runAttempt
Integer numbers.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The run's jobs.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/runs/ {repositoryId}/ {runId}/ {runAttempt}/jobs
Shell Curl
curl https://api.relayrunner.dev/api/runs/1/1/1/jobs \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /runs/{repositoryId}/{runId}/{runAttempt}/jobs)
Status: 200 The run's jobs.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{}
Copy
Copy
The run's jobs.
Explain a run's failures
Copy link
Auth Required
Copy as Markdown
Why a run attempt's jobs failed: each failed job's first failed step, whether its runner failed it before any step ran, GitHub's annotations, and the end of its log up to the last error. Covers up to 5 failed jobs.
Path Parameters
- repositoryId
Type: integer min: 1
required
Copy link to repositoryId
Integer numbers.
- runId
Type: integer min: 1
required
Copy link to runId
Integer numbers.
- runAttempt
Type: integer min: 1
required
Copy link to runAttempt
Integer numbers.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The run's failed jobs.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/runs/ {repositoryId}/ {runId}/ {runAttempt}/failures
Shell Curl
curl https://api.relayrunner.dev/api/runs/1/1/1/failures \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /runs/{repositoryId}/{runId}/{runAttempt}/failures)
Status: 200 The run's failed jobs.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"jobs": [\
{}\
],
"more": 1
}
JSONCopy
JSONCopy
The run's failed jobs.
List activity
Copy link
Auth Required
Copy as Markdown
The activity log, newest first: where each job was routed and why.
Query Parameters
- before
Type: integer min: 1Copy link to before
The previous page's nextBefore.
- filter
Type: stringenumCopy link to filter
values
jobcheckmachinemembersettings
- since
Type: integer min: 0Copy link to since
Only events after this time, in milliseconds since the epoch.
- repository
Type: stringCopy link to repository
Only this repository (owner/name).
- result
Type: stringenumCopy link to result
values
passedfailedcancelledskippedrunning
- machine
Type: stringCopy link to machine
Only this machine, by id.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
One page of activity.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/activity
Shell Curl
curl https://api.relayrunner.dev/api/activity \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /activity)
Status: 200 One page of activity.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"items": [\
{}\
],
"nextBefore": null
}
JSONCopy
JSONCopy
One page of activity.
Get usage
Copy link
Auth Required
Copy as Markdown
Jobs under a minute and what rounding up to whole minutes cost.
Query Parameters
- days
Type: integer min: 1 max: 90
Default
30
Copy link to days
How many days back to look (1 to 90).
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
The usage report.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/usage
Shell Curl
curl 'https://api.relayrunner.dev/api/usage?days=30' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /usage)
Status: 200 The usage report.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{}
Copy
Copy
The usage report.
Get check savings
Copy link
Auth Required
Copy as Markdown
What optimized checks saved.
Query Parameters
- days
Type: integer min: 1 max: 90
Default
30
Copy link to days
How many days back to look (1 to 90).
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
Optimized check savings.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/usage/checks
Shell Curl
curl 'https://api.relayrunner.dev/api/usage/checks?days=30' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /usage/checks)
Status: 200 Optimized check savings.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{}
Copy
Copy
Optimized check savings.
Get Actions minutes
Copy link
Auth Required
Copy as Markdown
Each connected GitHub account's Actions minutes this billing cycle.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
Actions minutes by account.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/usage/actions
Shell Curl
curl https://api.relayrunner.dev/api/usage/actions \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /usage/actions)
Status: 200 Actions minutes by account.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{}
Copy
Copy
Actions minutes by account.
Get job times
Copy link
Auth Required
Copy as Markdown
How long each job usually takes on each runner environment.
Query Parameters
- days
Type: integer min: 1 max: 30
Default
14
Copy link to days
How many days back to look (1 to 30).
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
Job times by workflow, job and environment.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/job-times
Shell Curl
curl 'https://api.relayrunner.dev/api/job-times?days=14' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /job-times)
Status: 200 Job times by workflow, job and environment.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{}
Copy
Copy
Job times by workflow, job and environment.
Get signals
Copy link
Auth Required
Copy as Markdown
What's making CI slow, costly or busier than it needs to be: each signal's area, jobs, minutes, estimated cost and the repos and workflows it affects most, plus every job's minutes by person, repository, workflow, branch and trigger.
Query Parameters
- days
Type: integer min: 1 max: 90
Default
30
Copy link to days
How many days back to look (1 to 90).
- breakdown
Type: 0or1enum
Default
1
Copy link to breakdown
0 leaves out the breakdown.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Responses
- 200
Signals and the breakdown.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for get/signals
Shell Curl
curl 'https://api.relayrunner.dev/api/signals?days=30&breakdown=1' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
cURLCopy
cURLCopy
Test Request(get /signals)
Status: 200 Signals and the breakdown.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"days": 1,
"totals": {},
"signals": [\
{}\
]
}
JSONCopy
JSONCopy
Signals and the breakdown.
Send feedback
Copy link
Auth Required
Copy as Markdown
Report a bug, a confusing result or a missing feature to the team.
Headers
- x-relayrunner-workspace
Type: stringCopy link to x-relayrunner-workspace
The workspace to read, by id. Needed only when the token's grant covers more than one workspace.
Body
required
application/json
- category
Type: stringenum
required
Copy link to category
values
bugconfusingfeature_requestother
- summary
Type: string min length: 1 max length: 200
required
Copy link to summary
- details
Type: string max length: 4000Copy link to details
- tool
Type: string max length: 64Copy link to tool
Responses
- 201
Stored. The answer never repeats what was sent.
application/json
- 400
application/json
- 401
application/json
- 403
application/json
- 404
application/json
- 429
application/json
Request Example for post/feedback
Shell Curl
curl https://api.relayrunner.dev/api/feedback \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"category": "bug",
"summary": "",
"details": "",
"tool": ""
}'
cURLCopy
cURLCopy
Test Request(post /feedback)
Status: 201 Stored. The answer never repeats what was sent.Status: 400 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 401 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 403 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 404 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.Status: 429 The request failed. Branch on `error.code`; `error.message` is for people and can change. See https://relayrunner.dev/docs/reference/errors.
Show Schema
{
"id": "string",
"redacted": 1
}
JSONCopy
JSONCopy
Stored. The answer never repeats what was sent.