The REST API backs the web console and SSH commands. The endpoint inventory
below and the machine-readable OpenAPI 3.1 document are
generated from the public router; internal endpoints are excluded.
authentication
Mint a named token with kedge token, then send it as a Bearer token:
curl -s https://kedge.dev/api/account \
-H "Authorization: Bearer $KEDGE_TOKEN"
Revoke it with the account token operation. Health and OpenAPI are the only
unauthenticated operations in this reference.
conventions
- Base URL:
https://kedge.dev/api
- JSON request and response bodies, except SSE, NDJSON, logs, and proxies.
- Send
Content-Type: application/json for JSON writes.
- Apps resolve by name or ID. Stable members are selected by ordinal
beneath their owning app.
- Errors are JSON objects shaped as
{"error":"message"} with an appropriate
HTTP status.
examples
Deploy a prebuilt image and follow its logs:
curl -sX POST https://kedge.dev/api/apps \
-H "Authorization: Bearer $KEDGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"hello-nginx","image":"nginx:1.29"}'
curl -sN 'https://kedge.dev/api/apps/hello-nginx/logs?follow=true' \
-H "Authorization: Bearer $KEDGE_TOKEN"
Run one line in a disposable sandbox:
curl -sX POST https://kedge.dev/api/eval \
-H "Authorization: Bearer $KEDGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"runtime":"python3","code":"print(6*7)","network":false}'
Streaming endpoints intentionally have no short server deadline. Clients
should set their own connect and idle timeouts and reconnect SSE streams.
endpoints
account
| method |
path |
purpose |
GET |
/account |
Get the current account |
GET |
/account/events |
List events |
POST |
/account/tokens |
Create an API token |
DELETE |
/account/tokens/{name} |
Delete token |
GET |
/account/usage |
Get usage |
GET |
/account/usage/history |
Get history |
GET |
/account/webhooks |
List webhooks |
POST |
/account/webhooks |
Create webhook |
DELETE |
/account/webhooks/{webhookID} |
Delete webhook |
apps
| method |
path |
purpose |
GET |
/apps |
List apps |
POST |
/apps |
Create an app |
POST |
/apps/imports |
Import a Git repository |
GET |
/apps/imports/preview |
Preview a Git import |
DELETE |
/apps/{appID} |
Delete app |
GET |
/apps/{appID} |
Get app |
GET |
/apps/{appID}/auth/providers |
List providers |
POST |
/apps/{appID}/auth/sessions/revoke |
Create revoke |
GET |
/apps/{appID}/auth/users |
List users |
POST |
/apps/{appID}/auth/users/{userID}/disable |
Create disable |
POST |
/apps/{appID}/auth/users/{userID}/enable |
Create enable |
DELETE |
/apps/{appID}/database |
Detach an app database |
PUT |
/apps/{appID}/database |
Attach an app database |
POST |
/apps/{appID}/deploy |
Deploy an app |
GET |
/apps/{appID}/deploys |
List deploys |
GET |
/apps/{appID}/domains |
List domains |
POST |
/apps/{appID}/domains |
Create domain |
DELETE |
/apps/{appID}/domains/{domain} |
Delete domain |
GET |
/apps/{appID}/domains/{domain} |
Get domain |
POST |
/apps/{appID}/domains/{domain}/verify |
Verify domain |
GET |
/apps/{appID}/env |
Get app environment |
PATCH |
/apps/{appID}/env |
Merge app environment |
PUT |
/apps/{appID}/env |
Replace app environment |
DELETE |
/apps/{appID}/env/{key} |
Delete env |
DELETE |
/apps/{appID}/expiry |
Clear app expiry |
PUT |
/apps/{appID}/expiry |
Set app expiry |
POST |
/apps/{appID}/fork |
Fork an app |
GET |
/apps/{appID}/logs |
Get app logs |
GET |
/apps/{appID}/members |
List members |
POST |
/apps/{appID}/members/{ordinal}/migrate |
Migrate member |
GET |
/apps/{appID}/metrics/{path} |
Query app metrics |
GET |
/apps/{appID}/previews |
List previews |
POST |
/apps/{appID}/previews |
Create preview |
DELETE |
/apps/{appID}/previews/{ref} |
Delete preview |
POST |
/apps/{appID}/previews/{ref}/deploy |
Deploy preview |
POST |
/apps/{appID}/rollback |
Roll back an app |
deploys
| method |
path |
purpose |
GET |
/deploys/{deployID} |
Get deploy |
builds
| method |
path |
purpose |
POST |
/builds |
Create build |
GET |
/builds/{buildID} |
Get build |
GET |
/builds/{buildID}/logs |
Get logs |
data
| method |
path |
purpose |
GET |
/databases |
List databases |
POST |
/databases |
Create database |
DELETE |
/databases/{name} |
Delete database |
GET |
/volumes |
List volumes |
DELETE |
/volumes/{ref} |
Delete volume |
domains
| method |
path |
purpose |
GET |
/domains |
List domains |
POST |
/domains |
Create domain |
GET |
/domains/search |
Search domains |
POST |
/domains/{domain}/autorenew |
Set auto-renew for domain |
POST |
/domains/{domain}/renew |
Renew domain |
sandboxes
| method |
path |
purpose |
POST |
/eval |
Evaluate one-shot code |
GET |
/runtimes |
List runtimes |
POST |
/sandbox/exec |
Run a sandbox command |
events
| method |
path |
purpose |
GET |
/events |
List or follow events |
system
| method |
path |
purpose |
GET |
/health |
Check API health |
GET |
/openapi.json |
Get the OpenAPI document |