All pages

Operate

API

Available

Everything the dashboard does goes through one HTTP API, and you can call it yourself.

Calling the API

The API is served by the control plane under /api/v1, on 127.0.0.1:8080 unless RUNONE_LISTEN says otherwise. Create a token on Settings and send it as a bearer token.

curl -H "Authorization: Bearer $RUNONE_TOKEN" \
  http://127.0.0.1:8080/api/v1/workspaces/my-company/projects

Endpoints

The ones you are most likely to script. Paths are under /api/v1.

Method and pathDoes
GET /workspaces/{workspace}/projectsLists projects. POST creates one.
GET /projects/{project}/environmentsLists environments. POST creates one.
GET /environments/{environment}/servicesLists services. POST creates one.
GET /services/{service}Reads a service, with its status.
PATCH /services/{service}Saves a service's definition.
POST /services/{service}/deployDeploys: builds first if the service comes from Git.
POST /services/{service}/deploymentsDeploys a given image, or an earlier deployment again (from, keep_config).
POST /services/{service}/actionsrestart, stop or start.
GET /services/{service}/runtimeWhat the server reports about the running container.
GET /workspaces/{workspace}/deploymentsLists deployments.
GET /workspaces/{workspace}/pipeline-runsLists builds.
GET /workspaces/{workspace}/logsReads log lines. Filter with service, source, subject; limit up to 1000.
PUT /workspaces/{workspace}/variablesSets a variable.
POST /workspaces/{workspace}/variables/importReads a .env file into a scope.
POST /services/{service}/domainsAdds a domain. POST /domains/{domain}/check checks its DNS.
GET /workspaces/{workspace}/serversLists servers.
GET /workspaces/{workspace}/audit-logsLists audit entries.

Lists

A list returns items and next_cursor. Pass limit (1 to 100, default 20) and, for the following page, cursor with the value of next_cursor. A next_cursor of null means there is nothing more.

Changing a service

PATCH /services/{service} needs an If-Match header carrying the revision you read. If the service changed in the meantime the call fails with REVISION_CONFLICT; read it again and retry.

Errors

An error has a code, a message for people, and the id of the request, which is also in the X-Request-Id header.

{
  "error": {
    "code": "FORBIDDEN",
    "message": "This token's role does not allow that.",
    "request_id": "req_…"
  }
}
CodeHTTP statusMeaning
UNAUTHORIZED401No valid token was sent.
FORBIDDEN403The token's role does not allow this.
RESOURCE_NOT_FOUND404No such resource in this workspace.
VALIDATION_FAILED400, 409, 428The request is wrong: a bad field, a name already taken, or a missing If-Match.
REVISION_CONFLICT409The resource changed since you read it.

The API refuses fields it does not know, so a misspelt field is an error rather than something silently ignored.