Coderunners API
Create, upload, deploy, run, and promote standalone coderunners — the deploy path (D-061).
Base path: /v1/workspaces/{workspace_id}/coderunners
Coderunner is the deploy path for functions, jobs, schedules, and services. No App is required. See Developers for gf deploy and MCP.
See also: Customer Portal — Coderunner · Coderunner overview
Auth
All routes: Authorization: Bearer <JWT>. Forwarded to Coderunner with x-client-key (workspace id) and x-userid.
Mint a short-lived CR JWT:
POST /v1/workspaces/{workspace_id}/coderunner/dev-tokenPermission: read
List / create
| Method | Path | Permission | Notes |
|---|---|---|---|
GET | /v1/workspaces/{workspace_id}/coderunners | read | Query: environment_id, app_id |
POST | same | write | Body: title, runtime, workload_type, optional environment_id, app_id, schedule, slug |
workload_type: function | job | schedule | service.
Get / update / delete / status
| Method | Path | Permission |
|---|---|---|
GET | …/coderunners/{id} | read |
PATCH | …/coderunners/{id} | write |
DELETE | …/coderunners/{id} | delete |
GET | …/coderunners/{id}/status | read |
Versions and upload
| Method | Path | Purpose | Permission |
|---|---|---|---|
POST | …/{id}/upload | Multipart ZIP → new version | write |
GET | …/{id}/versions | List versions | read |
GET | …/{id}/versions/{version_id} | Get version | read |
GET | …/{id}/versions/{version_id}/download | Download package | read |
DELETE | …/{id}/versions/{version_id} | Delete version | write |
POST | …/{id}/definition | Ensure upstream definition | write |
Deploy and run
POST /v1/workspaces/{workspace_id}/coderunners/{id}/deployBody (optional): version_id, cpu, memory, envVariable, replicas, schedule, suspended.
POST /v1/workspaces/{workspace_id}/coderunners/{id}/runBody (optional): payload, deployment_id, deployment_url, version_id.
| Method | Path | Permission |
|---|---|---|
GET | …/{id}/deployment | read |
GET | …/{id}/deployments/{deployment_id} | read |
DELETE | …/{id}/deployments/{deployment_id} | write |
GET | …/{id}/logs/{job_id} | read |
Permission for deploy/run: write
Git source
| Method | Path | Permission |
|---|---|---|
GET / PUT / PATCH / DELETE | …/{id}/git-source | read / write |
POST | …/{id}/git-source/deploy | write (202) |
PUT body: repo_url, ref, optional subdir, secret_key (workspace secret for private repos). Webhook: POST /v1/webhooks/git/{source_id}.
Domains
Custom domains for App-bound services:
| Method | Path | Permission |
|---|---|---|
GET / POST | …/{id}/domains | read / write |
DELETE / POST | …/{id}/domains/{domain} / …/verify | write |
Standalone services use the deployment upstream URL.
Compare and promote
GET /v1/workspaces/{workspace_id}/coderunners/compare?source_environment_id=&target_environment_id=
POST /v1/workspaces/{workspace_id}/coderunners/promotePromote pairs[]: source_coderunner_id, optional target_coderunner_id / version_id, optional dry_run.
Runners and executions
| Method | Path | Purpose | Permission |
|---|---|---|---|
GET | /v1/workspaces/{workspace_id}/runners | List deployments | read |
GET | …/runners/{runner_id} | Get runner | read |
POST | …/runners/{runner_id}/restart | Restart | write |
GET | /v1/workspaces/{workspace_id}/executions | List executions | read |
Related
- Coderunner API reference — upstream shapes
- Apps API
- Process log API