EndpointsList OpenCode Servers

OpenCode Servers

List OpenCode Servers

Lists the workspace's OpenCode Servers, oldest first, deleted servers excluded. The default server is created on first use.

GET/opencodes
Authorizationstringheaderrequired

Bearer token for the authenticated caller.

Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens - a workspace-owned token implies its workspace.

Required string length: 1 - 53

Example: "ws_j572abc123def4"

cursorstring

Pagination cursor from a previous response's next_cursor.

limitintegerdefault:50

Items per page (1-100, default 50)

Required range: 1 <= x <= 100

Example: 50

Response

application/json

OpenCode Server list

dataobject[]required
child attributes
data.idstringrequired

OpenCode Server id (oc_...).

Pattern: ^oc_[a-z0-9]{1,64}$

Example: "oc_j572abc123def456"

data.workspace_idstringrequired

Required string length: 1 - 53

data.namestringrequired

Display name.

Required string length: 1 - 100

data.hostnamestringrequired

DNS label chosen for the server's browser UI; unique across the platform. Created from the name plus a short random suffix when not given. The UI is served at web_url until chosen hostnames are routed.

Pattern: ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$

Example: "acme-agents"

data.labelsrecord<string, string>required

Free-form string labels: up to 32 keys of up to 63 characters.

Maximum object length: 32 entries

data.stateenum<string>required

ACTIVE: serves OpenCode protocol traffic. SUSPENDED: the gateway refuses protocol traffic until it is resumed. DELETED: terminal; the id stays reserved. SUSPENDING, RESUMING and DELETING: a requested change is in progress; its Operation finishes when the server reached the new state. A deletion always finishes.

Available options: ACTIVE, SUSPENDING, SUSPENDED, RESUMING, DELETING, DELETED

data.defaultbooleanrequired

True for the Workspace's default server, which exists as soon as the Workspace uses OpenCode and cannot be deleted.

data.budgetobjectrequired
child attributes
data.budget.monthly_limitinteger | nullrequired

Monthly limit in metered usage units. The unit and its pricing are not defined yet; the value is stored and returned, not enforced. null: no limit.

Required range: x >= 0

data.featuresobjectrequired

Web UI feature toggles. Everything else in OpenCode's UI stays on.

child attributes

OpenCode worktree creation in the web UI.

data.features.terminalbooleanrequired

OpenCode terminals in the web UI.

data.vault_idstringrequired

The Vault of the server's third-party credentials: the one named at creation, or the Vault created for this server.

data.web_urlstring | nullrequired

Where people open the server's web UI: https://oc-<key>.akua.run/, a browser origin of its own, derived from the server id. null when this deployment hosts no OpenCode Servers.

data.server_urlstring | nullrequired

The long form of the server's address, https://<api host>/v1/opencodes/{id}/: OpenCode's protocol under api/, its web UI at the base. null when this deployment hosts no OpenCode Servers.

data.short_urlstring | nullrequired

The short form, https://<site host>/{id}/: protocol requests only, always with an explicit token. null when this deployment has none.

data.created_atintegerrequired

Unix timestamp (seconds)

Required range: x >= 0

data.updated_atintegerrequired

Unix timestamp (seconds)

Required range: x >= 0

data.etagstringrequired

Send as If-Match on PATCH.

has_morebooleanrequired

True if more items exist after this page.

next_cursorstring | nullrequired

Opaque cursor for the next page, or null if no more pages.