dFlow API
curl -X GET 'https://k8s.dflow.sh/oauth/authorize'curl -X POST 'https://k8s.dflow.sh/oauth/token'curl -X POST 'https://k8s.dflow.sh/oauth/register'curl -X GET 'https://k8s.dflow.sh/oauth/jwks'curl -X POST 'https://k8s.dflow.sh/v1/oauth/consent'curl -X GET 'https://k8s.dflow.sh/v1/oauth/grants'bearerAuthgrant_id*stringConfirm-Name?stringapplication/json- body
confirm_name?stringRevoked
curl -X DELETE 'https://k8s.dflow.sh/v1/oauth/grants/string' \ -H 'Content-Type: application/json' \ -d '{}'Process is up. This check does not touch a database.
application/json- response
status*stringcurl -X GET 'https://k8s.dflow.sh/healthz'{ "status": "ok"}RFC 9728 protected-resource metadata. Requires DFLOW_API_PUBLIC_URL. The resource is the public MCP URL (DFLOW_API_PUBLIC_URL + DFLOW_MCP_PATH, default /mcp).
Protected resource metadata for MCP.
application/json- response
curl -X GET 'https://k8s.dflow.sh/.well-known/oauth-protected-resource'{}Same document as /.well-known/oauth-protected-resource when DFLOW_MCP_PATH is /mcp.
Protected resource metadata for MCP.
application/json- response
curl -X GET 'https://k8s.dflow.sh/.well-known/oauth-protected-resource/mcp'{}RFC 8414 discovery document. Requires DFLOW_API_PUBLIC_URL on the API process. Authorization server metadata for remote MCP connectors (RFC 8414).
Authorization server metadata including PKCE S256.
application/json- response
curl -X GET 'https://k8s.dflow.sh/.well-known/oauth-authorization-server'{}Registry-style server.json manifest with the Streamable HTTP MCP endpoint, transport type, and OAuth discovery URLs. Requires DFLOW_API_PUBLIC_URL.
MCP discovery document.
application/json- response
curl -X GET 'https://k8s.dflow.sh/.well-known/mcp.json'{}Distribution token endpoint. It answers 404 unless DFLOW_REGISTRY_AUTH=on. Basic auth is the workspace repository prefix and a derived password. The token grants push and pull only for that prefix. The password is not returned.
service?stringscope?stringA short-lived registry token.
curl -X GET 'https://k8s.dflow.sh/registry/token'HTTP 200 means the registered checks passed. Those checks are the database ping and a token row. When a worker is running, the claim loops must have ticked within three idle intervals. When a maintenance election is running, a leader must have been observed within two minutes. The 503 body does not name which check failed.
Registered checks passed.
application/json- response
status*stringlive_informers*booleanTrue when DFLOW_LIVE_INFORMERS is on. Off does not change the HTTP status.
ws_events*booleanTrue when DFLOW_WS_EVENTS is on. Off does not change the HTTP status.
degraded*booleanTrue when live_informers or ws_events is false. The status stays ready.
curl -X GET 'https://k8s.dflow.sh/readyz'{ "status": "ready", "live_informers": true, "ws_events": true, "degraded": false}Build version and API version.
application/json- response
version*stringapi_version*stringchannel*stringValue of DFLOW_CHANNEL. Empty when unset. beta is the beta channel.
terms_version*stringValue of DFLOW_TERMS_VERSION. Empty when signup does not require acceptance.
workspace_events*booleanTrue when this API serves the workspace event stream. The dashboard uses that stream when this is true.
maintenance*booleanTrue when DFLOW_MAINTENANCE_MODE is on. Mutating product routes return 503; GETs, probes, /v1/version, /v1/admin/*, and auth refresh/logout still work. Not workspace suspend.
curl -X GET 'https://k8s.dflow.sh/v1/version'{ "version": "dev", "api_version": "v1", "channel": "", "terms_version": "", "workspace_events": false, "maintenance": false}Token id, display prefix, role, scope, workspace id, and stage_only. A user session also includes user_id, email, and credential_kind user. An API token includes credential_kind api_token and omits user_id and email. The bearer secret is absent. stage_only is true when the credential may stage drafts and may not write the cluster. An MCP OAuth session may also include oauth_client_id and oauth_scopes.
application/json- response
curl -X GET 'https://k8s.dflow.sh/v1/whoami'{}The JSON token is checked and then discarded. The response sets an HttpOnly cookie. session_id is shown once and is not a bearer token. The browser pages use a form instead of this route.
Cookie set. Body contains session_id and expires_at. The bearer token is absent.
curl -X POST 'https://k8s.dflow.sh/v1/sessions'The cookie must match session_id, or the bearer must own the session. The API token used to open the session stays.
The session is gone.
curl -X DELETE 'https://k8s.dflow.sh/v1/sessions/{session_id}'Newest first. Each item includes status (open, triaged, in_progress, waiting, resolved, or closed). A workspace token sees that workspace. A user token with no workspace sees that user's reports. The platform token sees every report. The rows come from the database.
Items include id, title, kind, message, clickup, and created_at. next is null when the page is complete.
curl -X GET 'https://k8s.dflow.sh/v1/issues'Any signed-in caller can report an issue. JSON or multipart. The response id starts with iss_. status starts as open. Optional tags are deploy, route, database, billing, docs, and agent. Optional screenshots are png, jpeg, or webp, at most 3, 2 MB each, and are not stored in the database. screenshots is skipped, stored, or failed. clickup is skipped when the API has no ClickUp token, stored when a task was created, and failed when the task was not created. A failed ticket still keeps the issue. A stored task is tagged dFlow Cloud, customer report, and the kind.
The report is stored. clickup_task_id and clickup_url are present only when clickup is stored. status is open.
curl -X POST 'https://k8s.dflow.sh/v1/issues'Returns the status stored in the database. It does not call ClickUp.
The report, including the message.
curl -X GET 'https://k8s.dflow.sh/v1/issues/{issue_id}'Reads the ClickUp task for this report and stores the mapped status. List and inspect stay on the database. At most one refresh per minute per issue for this caller. A process-wide cap also applies. Retry-After is 60 when rate limited. A report without a ClickUp task, or a missing ClickUp task, is precondition. This is not a webhook.
The report with the updated status when ClickUp mapped to a known value.
curl -X POST 'https://k8s.dflow.sh/v1/issues/{issue_id}/status/refresh'User created. A token pair is included when email verification is off, and workspace_id is that user's personal workspace. When verification is on, delivery is log or smtp, the verify token is not in this response, and the personal workspace is created at the first successful login. Optional invite_code is ignored when signup mode is open. Invite mode requires a valid code. The code is not returned. Optional accept_terms is ignored when DFLOW_TERMS_VERSION is empty. When that setting is set, accept_terms true stores it.
curl -X POST 'https://k8s.dflow.sh/v1/auth/register'curl -X POST 'https://k8s.dflow.sh/v1/auth/verify'curl -X POST 'https://k8s.dflow.sh/v1/auth/login'Optional JSON body {"accept_terms":true} records the server terms version, the same rule as password login. An empty object is valid.
provider*string"google""github"Authorization URL and one-time poll token.
curl -X POST 'https://k8s.dflow.sh/v1/auth/oauth/google/start'provider*string"google""github"code?stringstate?stringHTML page telling the person to return to the terminal.
curl -X GET 'https://k8s.dflow.sh/v1/auth/oauth/google/callback'curl -X POST 'https://k8s.dflow.sh/v1/auth/oauth/poll'curl -X POST 'https://k8s.dflow.sh/v1/auth/refresh'curl -X POST 'https://k8s.dflow.sh/v1/auth/logout'Accepted. delivery is log or smtp. The response does not say whether the email exists and does not include the reset token.
curl -X POST 'https://k8s.dflow.sh/v1/auth/forgot'curl -X POST 'https://k8s.dflow.sh/v1/auth/reset'curl -X POST 'https://k8s.dflow.sh/v1/auth/workspace'curl -X POST 'https://k8s.dflow.sh/v1/auth/invites/accept'The invite token is shown once. delivery is log or smtp when a copy was also sent. A personal workspace returns precondition.
curl -X POST 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/invites'Owner, admin, or platform owner. Developer and viewer receive forbidden. Returns user_id, email, and role. A personal workspace lists its owner only.
members array of user_id, email, and role.
curl -X GET 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/members'Same grant matrix as invites, checked against the new role. An admin cannot change an owner. The last owner cannot be demoted. A personal workspace returns precondition and does not change the role.
application/json- body
role*stringThe updated member.
curl -X PATCH 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/members/{user_id}' \ -H 'Content-Type: application/json' \ -d '{ "role": "string"}'Body confirm_email must equal the member email. Same caller rule as role change. An admin cannot remove an owner. The last owner cannot be removed. A personal workspace returns precondition.
application/json- body
confirm_email?stringThe removed member row.
curl -X POST 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/members/{user_id}/remove' \ -H 'Content-Type: application/json' \ -d '{}'A verified user receives every workspace they belong to, including the personal one, even when the session is inside one workspace. An API token receives only its workspace. A platform owner receives a page of every workspace. Any verified user can create another workspace. An API token cannot. An invite into the personal workspace is rejected.
Items of id and name. next is null when the page is complete.
curl -X GET 'https://k8s.dflow.sh/v1/workspaces'Workspace created. personal is false. Any verified user becomes the owner. An API token cannot create a workspace. The platform owner is forbidden. The personal workspace from signup stays private and cannot accept invites.
curl -X POST 'https://k8s.dflow.sh/v1/workspaces'The body includes limits and usage when the API is enforcing workspace caps. limits is the cap. usage is the desired work already stored. A missing cap row uses the platform defaults. It is not unlimited.
The workspace, its limits, and its usage.
curl -X GET 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}'Projects, their environments, the applications and services in each environment, and totals. Counts include every row. They do not stop at the list page of 50. usage matches the usage object on workspace inspect when caps are enforced. A token for another workspace gets the same not_found response as a missing workspace. There is no dflow CLI command for this read. The MCP tool is workspace_overview.
Projects, environment rows, counts, totals, and usage.
application/json- response
projects*array<>totals*usage?curl -X GET 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/overview'{ "projects": [ { "id": "string", "name": "string", "created_at": "2019-08-24T14:15:22Z", "application_count": 0, "service_count": 0, "environments": [ { "id": "string", "name": "string", "status": "string", "application_count": 0, "service_count": 0, "applications": [ { "id": "string", "name": "string", "status": "string", "image": "string" } ], "services": [ { "id": "string", "name": "string", "provider": "string", "status": "string" } ] } ] } ], "totals": { "projects": 0, "environments": 0, "applications": 0, "services": 0 }, "usage": { "environments": 0, "applications": 0, "databases": 0, "cpu": "string", "memory": "string", "storage": "string", "replicas": 0 }}Newest platform operations in the workspace, including history for deleted applications and databases. Supports optional environment_id and type filters, plus cursor pagination with page_size (default 50, max 100) and page_token or cursor. The response includes next_page_token and next_cursor when another page exists.
workspace_id*stringenvironment_id?stringtype?stringchip?stringActivity filter (all, deploys, builds, routes, backups, restores, deletes, running, pending, failed).
hide_succeeded_repairs?booleanWhen true, hides succeeded application.repair rows (default true).
page_token?stringcursor?stringAlias for page_token.
page_size?integerlimit?integerAlias for page_size.
One page of operations and filter counts.
application/json- response
items*array<>next_page_token?stringnext_cursor?stringSame value as next_page_token.
counts?curl -X GET 'https://k8s.dflow.sh/v1/workspaces/string/operations'{ "items": [ { "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string", "resource_name": "string", "resource_deleted": true, "project_name": "string", "env_name": "string" } ], "next_page_token": "string", "next_cursor": "string", "counts": { "all": 0, "deploys": 0, "builds": 0, "routes": 0, "running": 0, "pending": 0, "failed": 0, "repairs": 0, "backups": 0, "restores": 0, "deletes": 0 }}Server-sent events for one workspace the caller can see. The first line is data: ready. A create or delete wakes the stream with data: changed. The public website proxies this as /api/watch with the session cookie. This route is not an MCP tool.
text/event-stream.
curl -X GET 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/watch'Server-sent events with durable intent rows (event: intent) and coalesced live patches (event: live). A connect with no Last-Event-ID and no after query starts at the current cursor. Last-Event-ID wins when both are set; otherwise after is the last seq the client applied. A cursor older than the retained rows, or a non-numeric cursor, sends event: resync. More than the per-user cap (DFLOW_WS_STREAMS_PER_USER, default 8) returns 429 with Retry-After. This route is not an MCP tool. GET /readyz does not accept after.
workspace_id*stringafter?integerLast applied seq when Last-Event-ID is absent. Zero or omitted starts at the current cursor. A negative or non-numeric value is treated as a bad cursor and the stream sends event: resync.
int64text/event-stream.
curl -X GET 'https://k8s.dflow.sh/v1/workspaces/string/events'Platform owner only. Omitted fields keep the stored value, or the platform default when the workspace has no row yet. Zero is stored and then refuses that kind of work. A workspace token is forbidden. This route is not an MCP tool.
The stored cap. cpu, memory, and storage are quantities such as 4000m and 8Gi.
curl -X PUT 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/limits'Platform owner only. Sets suspended_at and suspended_reason, writes an audit row, and returns an operation that scales Deployments to zero and adds ResourceQuota dflow-suspend with pods 0. While the row is set, workspace writes return forbidden with message workspace suspended. Reads stay allowed. A workspace token is forbidden. This route is not an MCP tool. Idempotency-Key is required.
application/json- body
reason*string1 <= length <= 200Full Operation record accepted for polling. id, operation_id, and resource_id are the same aliases the operator CLI reads.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X POST 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/suspend' \ -H 'Content-Type: application/json' \ -d '{ "reason": "string"}'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Platform owner only. Clears suspended_at and returns an operation that deletes ResourceQuota dflow-suspend and restores the replica counts recorded at suspend. A workspace that is not suspended returns conflict. This route is not an MCP tool. Idempotency-Key is required.
Full Operation record accepted for polling. id, operation_id, and resource_id alias the same operation.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X POST 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/unsuspend'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Returns an authorization_url for github.com. Requires a signed-in user. Workspace ownership needs owner or admin.
authorization_url for the install redirect.
curl -X POST 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/github/install/start'curl -X GET 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/github/installations'curl -X DELETE 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/github/installations/{installation_id}'items with full_name, private, default_branch, html_url.
curl -X GET 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/github/repos'curl -X GET 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/github/branches?repo=string'Public browser redirect from GitHub. No bearer token. The state query value is the one-time credential: raw URL-safe base64 of 32 bytes. Anything else is HTTP 400 and does not touch the database. The user id is not in the query. One address is limited to 30 calls a minute; the 31st is HTTP 429. When DFLOW_WEB_PUBLIC_URL is set, success is HTTP 303 to {origin}/dashboard/settings/connections/ with the query and fragment cleared. When that origin is empty, success is HTTP 200 text/html that says the install finished and to return to the dashboard. Failures stay JSON.
HTML page when DFLOW_WEB_PUBLIC_URL is empty. The page says the install finished and to return to the dashboard.
curl -X GET 'https://k8s.dflow.sh/v1/github/app/callback'Public endpoint. When the GitHub App is configured, DFLOW_GITHUB_APP_WEBHOOK_SECRET must be set or delivery is refused with HTTP 412. When the secret is set, X-Hub-Signature-256 is required.
curl -X POST 'https://k8s.dflow.sh/v1/github/app/webhook'Project items. next is null when the page is complete.
curl -X GET 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/projects'The workspace id is in the path. A repeated Idempotency-Key with the same name returns HTTP 200. A different name with that key returns 409. A missing key still creates the project.
The project row. No namespace is created.
curl -X POST 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/projects'Removes the project after every application, database, volume, and job is gone. Empty environments are torn down on the same path as environment.delete, so Kubernetes namespaces are removed before the project row. Sends Confirm-Name with the project name. By default HTTP 201 stages project.delete into the first environment's draft. No project.delete operation is queued until changes deploy. Query trust_skip=true returns HTTP 202 with project.delete when teardown is needed, or HTTP 204 when there are no environments left. Returns HTTP 412 when resources remain or an environment delete is still in progress.
trust_skip?booleanWhen true, queue project.delete immediately instead of staging.
Confirm-Name*stringMust equal the project name.
The delete was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X DELETE 'https://k8s.dflow.sh/v1/projects/{project_id}' \ -H 'Confirm-Name: string'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}Deleted environments are omitted. This route does not read Kubernetes.
Environment items.
curl -X GET 'https://k8s.dflow.sh/v1/projects/{project_id}/environments'Stores a namespace name and does not create that namespace in Kubernetes. namespace_created is false. Optional region, such as in or us, selects one cluster in that region. The application and its database stay on that cluster. An omitted region uses the single workspace cluster, or the hosted cluster when the workspace has none. When no cluster is registered, the environment is stored and a later deploy asks for one. The stored cluster_id is not changed later.
The environment row.
curl -X POST 'https://k8s.dflow.sh/v1/projects/{project_id}/environments'By default HTTP 201 stages environment.delete into the environment draft. No environment.delete operation is queued until changes deploy. Query trust_skip=true returns HTTP 202 and a pending environment.delete operation when no application row and no volume exists. Returns HTTP 412 when an application or a volume, mounted or not, still exists; delete each volume with POST /v1/volumes/{volume_id}/delete first. A second delete while the environment is deleting returns the same operation. This route does not delete a Kubernetes namespace.
trust_skip?booleanWhen true, queue environment.delete immediately instead of staging.
The delete was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X DELETE 'https://k8s.dflow.sh/v1/environments/{env_id}'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}Deleted applications are omitted. desired is the latest deployment. observed is the last worker snapshot, or null.
Application items. next is null when the page is complete.
curl -X GET 'https://k8s.dflow.sh/v1/environments/{env_id}/applications'The environment must be active. A viewer cannot create one. The platform owner cannot create one. No Kubernetes object is created.
The application. desired and observed are null.
curl -X POST 'https://k8s.dflow.sh/v1/environments/{env_id}/applications'Every application in the environment, each with its latest release, route, volumes, and jobs, plus the unmounted volumes, the services and a backup count per service, and totals. One authorization check is the environment. Totals count every row and do not stop at the list page of 50. A token for another workspace gets not_found. There is no dflow CLI command for this read. The MCP tool is env_canvas.
Applications, services, and totals for the environment.
application/json- response
environment_id*stringname*stringapplications*array<>services*array<>unmounted_volumes*array<>Disks in the environment that no application mounts. A mounted disk is on its application's volumes list. totals.volumes counts both.
totals*curl -X GET 'https://k8s.dflow.sh/v1/environments/{env_id}/canvas'{ "environment_id": "string", "name": "string", "applications": [ { "id": "string", "environment_id": "string", "name": "string", "status": "string", "desired": {}, "observed": null, "document": null, "created_at": "2019-08-24T14:15:22Z", "latest_release": { "id": "string", "revision": "string", "image_digest": "string", "image": "string", "status": "string", "current": true, "created_at": "2019-08-24T14:15:22Z" }, "route": { "id": "string", "host": "string", "tls": "string", "address": "string", "custom_domains": [ { "host": "string", "tls": "string" } ] }, "volumes": [ {} ], "jobs": [ {} ] } ], "services": [ { "id": "string", "name": "string", "provider": "string", "status": "string", "desired": null, "observed": null, "backup_count": 0, "password_revealed_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" } ], "unmounted_volumes": [ { "id": "string", "workspace_id": "string", "environment_id": "string", "application_id": "string", "name": "string", "size_gi": 1, "storage_class": "string", "mount_path": "string", "claim_name": "string", "status": "pending", "observed_phase": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "totals": { "applications": 0, "services": 0, "volumes": 0, "jobs": 0, "backups": 0 }}Returns revision, count, and masked diff entries for the environment draft.
Diff view; empty draft returns revision 0 and count 0.
curl -X GET 'https://k8s.dflow.sh/v1/environments/{env_id}/changes'curl -X DELETE 'https://k8s.dflow.sh/v1/environments/{env_id}/changes'Body is one entry object or an array of entries with target env or secret, op set or unset, key, and value.
trust_skip?booleanWhen true, each entry deploys immediately in a private one-entry change set.
Entries staged into the open change set, or trust-skip finished without a deploy operation.
curl -X POST 'https://k8s.dflow.sh/v1/environments/{env_id}/changes/entries'curl -X PATCH 'https://k8s.dflow.sh/v1/environments/{env_id}/changes/entries/{entry_id}'curl -X DELETE 'https://k8s.dflow.sh/v1/environments/{env_id}/changes/entries/{entry_id}'Requires revision matching the open draft. Returns 409 when revision mismatches or an entry is stale. Stage-only tokens are forbidden.
application/json- body
revision*integerentry_ids?array<string>Deploy accepted; one application.deploy operation per affected app.
application/json- response
curl -X POST 'https://k8s.dflow.sh/v1/environments/{env_id}/changes/deploy' \ -H 'Content-Type: application/json' \ -d '{ "revision": 0}'{}state?stringHistorical change sets.
curl -X GET 'https://k8s.dflow.sh/v1/environments/{env_id}/change-sets'curl -X GET 'https://k8s.dflow.sh/v1/change-sets/{id}'Requires a bearer token. Returns product capability, not tenant data. Registered providers are postgresql, mysql, mongodb, and redis, each with capabilities provision, status, and deprovision.
Provider name and capability list for each registered provider.
application/json- response
items*array<>curl -X GET 'https://k8s.dflow.sh/v1/providers'{ "items": [ { "name": "postgresql", "capabilities": [ "provision", "status", "deprovision" ] }, { "name": "mysql", "capabilities": [ "provision", "status", "deprovision" ] }, { "name": "mongodb", "capabilities": [ "provision", "status", "deprovision" ] }, { "name": "redis", "capabilities": [ "provision", "status", "deprovision" ] } ]}Deleted instances are omitted. Requires workspace membership.
Service instance items.
curl -X GET 'https://k8s.dflow.sh/v1/environments/{env_id}/services'By default stages service.create; deploy applies the row and queues service.provision. trust_skip=true validates immediately, inserts a pending service_instances row, and returns a pending service.provision operation. Providers are postgresql, mysql, mongodb, and redis. Accepted parameters are database, storage, version, and an optional backup object (enabled, schedule, retention, pitr). postgresql, mysql, and mongodb require database. redis may omit database and omits version. version for postgresql is 16, 17, or 18. mysql is 8.0 or 8.4. mongodb is 6, 7, or 8. Any other version returns 400 and creates no instance. Omitting version uses the server default. storage is 1Gi through 100Gi. When the client omits storage, the server uses 20Gi. The CLI sends 20Gi when --storage is left at its default. When the caller omits the backup object, the server applies the schedule for postgresql, mysql, and redis. application_id, when set, records the new service on that application's dflow.json before the service is ready. For postgresql, mysql, and mongodb, if that application already has platform database binding keys, the response is 409 conflict with a conflict message naming the linked database and app (DFLOW_DATABASE_) and no service row is inserted. For redis, if that application already has DFLOW_REDIS_ binding keys, the response is 409 conflict and no service row is inserted. A missing provider capability returns 412 and creates no operation. An unknown provider name returns 404.
trust_skip?booleanWhen true, apply immediately without staging.
application/json- body
provider*stringname*stringcapability*stringparameters?application_id?stringApplication whose stored dflow.json should name this service.
Service create staged.
application/json- response
status?stringmessage?stringchange_set_id?stringrevision?integerentry?curl -X POST 'https://k8s.dflow.sh/v1/environments/{env_id}/services' \ -H 'Content-Type: application/json' \ -d '{ "provider": "fake", "name": "demo", "capability": "provision", "parameters": {}}'{ "status": "string", "message": "string", "change_set_id": "string", "revision": 0, "entry": {}}Returns desired and observed JSON without secret values.
The service instance.
curl -X GET 'https://k8s.dflow.sh/v1/services/{svc_id}'By default stages service.delete; deploy queues service.deprovision. trust_skip=true requires header Confirm-Name equal to the service name, returns HTTP 202 and a pending service.deprovision operation. Data is deleted without a backup. When an application's stored dflow.json names this service, the call returns 412 and deletes nothing. Header Force true unlinks those applications first: it removes DFLOW_DATABASE_HOST, PORT, NAME, and USERNAME, the DFLOW_DATABASE_PASSWORD secret, other secrets that reference the service, and the dflow.json service entry, then queues a deploy when the application already has one.
trust_skip?booleanWhen true, apply immediately without staging.
Confirm-Name*stringForce?"true"Unlink applications that name this service, then deprovision.
"true"Accepted (trust_skip) or staged delete.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X DELETE 'https://k8s.dflow.sh/v1/services/{svc_id}' \ -H 'Confirm-Name: string'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Returns rows from service_backups for a postgresql, mysql, or redis service. MongoDB returns a precondition that backups are not available. Requires DFLOW_OBJECT_STORE_DRIVER=s3 on the API process. When backups are off, the call returns HTTP 412 database backups are not configured.
Backup rows for this service.
curl -X GET 'https://k8s.dflow.sh/v1/services/{svc_id}/backups'By default HTTP 201 stages backup.create into the environment draft. postgresql, mysql, and redis can be backed up. MongoDB returns a precondition that backups are not available. A second request while a manual backup is still running returns 412 a backup is already running. An eighth manual backup returns 412 manual backup limit reached. No provider backup runs until changes deploy. Query trust_skip=true runs the immediate path and returns HTTP 202 with backup metadata.
trust_skip?booleanBackup create was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X POST 'https://k8s.dflow.sh/v1/services/{svc_id}/backups'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}Creates a new service in the same environment from the source backups. postgresql, mysql, and redis can be restored. MongoDB returns a precondition that backups are not available. Requires header Confirm-Name equal to the source service name. By default HTTP 201 stages service.restore. Query trust_skip=true queues restore immediately and returns HTTP 202.
trust_skip?booleanConfirm-Name*stringRestore was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X POST 'https://k8s.dflow.sh/v1/services/{svc_id}/restores' \ -H 'Confirm-Name: string'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}After the service is ready, the first call returns host, port, database, username, and password and writes an audit event. A second call returns 412 credentials_already_read and does not return the password. The runtime Kubernetes Secret is unchanged.
One-time credential payload.
application/json- response
host*stringport*stringdatabase*stringusername*stringpassword*stringcurl -X POST 'https://k8s.dflow.sh/v1/services/{svc_id}/credentials'{ "host": "string", "port": "string", "database": "string", "username": "string", "password": "string"}By default stages service.bind into the environment draft. Query trust_skip=true applies immediately. Writes DFLOW_DATABASE_HOST, PORT, NAME, and USERNAME as env and DFLOW_DATABASE_PASSWORD as a secret, then queues application.deploy. Fails with 409 if any of those keys already exist.
trust_skip?booleanapplication/json- body
service_id*stringStaged bind or accepted deploy when trust_skip is true.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X POST 'https://k8s.dflow.sh/v1/applications/{app_id}/service-bindings' \ -H 'Content-Type: application/json' \ -d '{ "service_id": "string"}'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Returns the desired image, port, replica count, and optional cpu_millicores and memory_mi together with the last observed status. When live informers are enabled, live holds the in-memory cluster snapshot and observed may mirror it.
The application.
curl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}'Requires header Confirm-Name equal to the application name. Returns HTTP 202 and a pending application.delete operation. With no stored cluster credential the worker marks the application deleted without calling Kubernetes. The desired image row is kept. When the application is already deleting, send Force: true (or force=1) to re-queue delete.
Confirm-Name*stringForce?"true"Re-queue delete when status is already deleting.
"true"The delete operation was accepted.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X DELETE 'https://k8s.dflow.sh/v1/applications/{app_id}' \ -H 'Confirm-Name: string'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Replaces the stored document for this application with the request body. The body is one dflow.json file and must include an application with this application's name. Env and secrets in the file are applied and stored on the document. The response redacts secret-like env values. A later dashboard change to env or secrets updates this same file.
application/json- body
The application, with the stored document shown as names only.
curl -X PUT 'https://k8s.dflow.sh/v1/applications/{app_id}/document' \ -H 'Content-Type: application/json' \ -d '{}'Returns identity, image, port, route, volumes, and pods (name, phase, ready) for support and dashboard log pod select (PRD-070). Does not include env or secret keys, replicas, CPU/memory, or latest_operation. When no cluster is selected or pods cannot be listed, pods is [] and pods_unavailable explains why; the response is still HTTP 200 when Postgres-backed fields load.
The application report.
application/json- response
id*stringname*stringstatus*stringworkspace*project*environment*image?stringport?integerroute?volumes*array<>pods*array<>pods_unavailable?stringPresent when pods could not be listed; pods is then [].
curl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/report'{ "id": "string", "name": "string", "status": "string", "workspace": { "id": "string", "name": "string" }, "project": { "id": "string", "name": "string" }, "environment": { "id": "string", "name": "string" }, "image": "string", "port": 0, "route": { "url": "string" }, "volumes": [ { "name": "string", "mount_path": "string" } ], "pods": [ { "name": "string", "phase": "string", "ready": true } ], "pods_unavailable": "string"}image is required. port defaults to 8080. replicas defaults to 1 and cannot exceed 5. Optional cpu_millicores and memory_mi are positive integers. Omitted fields use the stored dflow.json when that field is set, otherwise the platform defaults. The image must match letters, digits, and . _ / : @ + -, up to 512 characters. By default this stages image.set, and scale.set or resources.set when replicas or resource limits are sent, into the environment draft. HTTP 201 returns status staged with one or more entries. No deployment row or application.deploy operation is created until changes deploy. Query trust_skip=true runs the immediate path: HTTP 202 and a pending application.deploy operation. It does not mean the workload is ready. The worker marks a trust-skipped operation succeeded only when the new ReplicaSet rollout is complete and those pods have stayed Ready, with no container restart, for DFLOW_DEPLOY_STABLE_FOR (default 12s). observedGeneration is current. updatedReplicas, readyReplicas, and availableReplicas equal the desired count. No pod from an older ReplicaSet remains. A crash, ImagePullBackOff, ErrImagePull, CreateContainerConfigError, or a restart in that window fails the operation. The message keeps a short prefix and adds a note, cut to 180 characters, with the container name, the waiting or terminated reason, the exit code, and a short log. Secret and env values are removed. This is the same shape as the Pending note on a deploy timeout. Until a cluster credential is stored, the worker fails the operation with cluster credential is not stored and creates no object. A repeated Idempotency-Key with the same image, port, replicas, cpu_millicores, and memory_mi returns that operation on the trust-skip path only. A different body returns 409. A missing key still creates the deployment on trust-skip. GET observed, once a worker has written it, contains conditions Progressing, Available, and Degraded.
trust_skip?booleanWhen true, apply the deploy immediately and return a pending application.deploy operation.
The deploy was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentries*array<>curl -X POST 'https://k8s.dflow.sh/v1/applications/{app_id}/deployments'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entries": [ { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" } ]}JSON accepts repo (https github.com URL) or source (base64 tar.gz upload, at most 100MB packed). Multipart form accepts a source file part with the same limit. repo and source cannot both be set. Omit repo to clone build.repo from the application's stored dflow.json when source is not sent. Local uploads skip .git, node_modules, and .env at any depth. They keep .env.example and other names. An explicit repo is the clone URL. A dflow.json in that repository still supplies the other settings. A template install clones build.repo, branch, and root from the submitted document and does not replace that document with a file from the repository. A public repository needs no token. A private repository uses the GitHub App installation token when connected, otherwise the per-application git token from PUT /v1/applications/{app_id}/source/git-token, otherwise HTTP 412. Header X-Dflow-Git-Token supplies a one-time clone token for trust_skip builds only; staged builds reject that header. The clone URL stays free of the token. By default this stages source.set into the environment draft. HTTP 201 returns status staged with one entry. That staged entry does not carry the archive bytes. No application.build operation is created until changes deploy. Query trust_skip=true runs the immediate path: the server clones, builds with Railpack, pushes to DFLOW_REGISTRY, and deploys that image. HTTP 202 is the build operation. An empty registry is HTTP 412. A failed build returns the build log on the operation. The message says whether the failure is in the repository or in the builder. dFlow does not open a GitHub pull request. An upload of 700KB or less is mounted on the Job. A larger upload is fetched from GET /v1/build-sources/{token} when DFLOW_API_PUBLIC_URL is set. That GET has no bearer token. The token is the credential.
trust_skip?booleanWhen true, queue application.build immediately instead of staging source.set.
The build was staged into the environment draft. The entry does not carry the archive bytes.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X POST 'https://k8s.dflow.sh/v1/applications/{app_id}/builds'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}No bearer token. The token in the path is the credential. It is created for an upload larger than 700KB and cleared when the build worker finishes. A missing or cleared token is HTTP 404. The body is the tar.gz. Cache-Control is no-store.
token*stringThe tar.gz archive.
response?fileapplication/gzipbinarycurl -X GET 'https://k8s.dflow.sh/v1/build-sources/string'"string"Each item has id, revision, image_digest, status, and current. current is true when that succeeded release is the desired image. An application in another workspace returns HTTP 404.
The release list. items is empty when the application has no release.
curl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/releases'Empty JSON body. Requires Idempotency-Key. Returns HTTP 202 and an operation of type application.restart. The worker sets pod-template annotation dflow.io/restart-operation to the operation id so Kubernetes replaces the pods. The Deployment image, env, secrets, resource requests, and replica count stay as they were. A viewer receives HTTP 403. An application with no deployment receives HTTP 412 with code precondition. The same actor and idempotency key returns the original operation.
application/json- body
A pending application.restart operation.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X POST 'https://k8s.dflow.sh/v1/applications/{app_id}/restart' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Body is {"release_id":"rel_..."}. The response is HTTP 202 and an application.deploy operation. The image is that release's digest. Rollback does not start a build. An unknown release, or a release for another application, returns HTTP 404. A release that is not succeeded returns HTTP 412. The release that is already the desired image returns HTTP 409 and error code conflict with a message that names the release id and image as already running.
A pending application.deploy operation.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X POST 'https://k8s.dflow.sh/v1/applications/{app_id}/rollbacks'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Read only. At most one volume, the one mounted on this application. There is no create on this path: create a volume with POST /v1/environments/{env_id}/volumes, then mount it with POST /v1/volumes/{volume_id}/mount. A POST here returns HTTP 405.
curl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/volumes'Active volumes, mounted or not. A volume that is not mounted has no application_id or mount_path.
One row per active volume.
application/json- response
volumes*array<>curl -X GET 'https://k8s.dflow.sh/v1/environments/{env_id}/volumes'{ "volumes": [ { "id": "string", "workspace_id": "string", "environment_id": "string", "application_id": "string", "name": "string", "size_gi": 1, "storage_class": "string", "mount_path": "string", "claim_name": "string", "status": "pending", "observed_phase": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}Body is name, size_gi (1 through 10), and storage_class, which must be on the cluster capability report. The volume belongs to the environment and is not mounted by any application. By default HTTP 201 stages volume.create into the environment draft. No volume row or volume.create operation is created until changes deploy. Query trust_skip=true runs the immediate path: requires Idempotency-Key, inserts the volume row, and returns HTTP 202 with a pending volume.create operation. The operation succeeds when the claim is Bound, or when it exists on a WaitForFirstConsumer class such as local-path. A second active volume with the same name in the environment returns HTTP 409. The body does not accept mount_path or application_id. Acceptance writes an audit event with action volume.create.
trust_skip?booleanWhen true, create the volume immediately instead of staging.
The volume create was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X POST 'https://k8s.dflow.sh/v1/environments/{env_id}/volumes'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}Returns the volume row, including claim_name. A deleted volume or one in another workspace returns HTTP 404.
The volume.
application/json- response
id*stringworkspace_id*stringenvironment_id*stringapplication_id?stringThe application that mounts the volume. Absent while the volume is unmounted.
name*stringsize_gi*integer1 <= value <= 10storage_class*stringmount_path?stringAbsolute directory in the container. Absent while the volume is unmounted.
claim_name*stringThe PersistentVolumeClaim name in the environment namespace.
status*string"pending""ready""deleted"observed_phase?stringLast claim phase the worker saw, for example Bound or Pending.
created_at*stringdate-timeupdated_at*stringdate-timecurl -X GET 'https://k8s.dflow.sh/v1/volumes/{volume_id}'{ "id": "string", "workspace_id": "string", "environment_id": "string", "application_id": "string", "name": "string", "size_gi": 1, "storage_class": "string", "mount_path": "string", "claim_name": "string", "status": "pending", "observed_phase": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Requires Idempotency-Key. Body is application_id and mount_path, an absolute directory. The application must be in the volume's environment and holds one volume. HTTP 202 starts a volume.mount operation. The volume row names the application and path at once. The worker rolls the application's Deployment with the claim mounted and succeeds when the claim is Bound. An application with no deployment yet gets the mount on its first deploy. Acceptance writes an audit event with action volume.mount.
A pending volume.mount operation. resource_ref is the volume id.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X POST 'https://k8s.dflow.sh/v1/volumes/{volume_id}/mount'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Requires Idempotency-Key. No body. HTTP 202 starts a volume.umount operation. The worker rolls the application's Deployment without the mount, then clears application_id and mount_path on the row. The claim stays Bound and keeps its data. A volume that is already unmounted returns HTTP 400 with a validation error and no operation is stored. Acceptance writes an audit event with action volume.umount.
A pending volume.umount operation. resource_ref is the volume id.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X POST 'https://k8s.dflow.sh/v1/volumes/{volume_id}/umount'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Body is size_gi, which must be larger than the stored size and at most 10. By default HTTP 201 stages volume.resize into the environment draft. No volume.expand operation is queued until changes deploy. Query trust_skip=true runs the immediate path: requires Idempotency-Key and returns HTTP 202 with a pending volume.expand operation. The worker raises the claim's requested storage and stores size_gi when the claim capacity shows it. Acceptance writes an audit event with action volume.expand.
volume_id*stringThe volume id, for example vol_01.
trust_skip?booleanWhen true, queue volume.expand immediately instead of staging volume.resize.
application/json- body
size_gi*integerThe new size in Gi. It must be larger than the current size_gi.
2 <= value <= 10The resize was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X POST 'https://k8s.dflow.sh/v1/volumes/string/expand' \ -H 'Content-Type: application/json' \ -d '{ "size_gi": 2}'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}Body confirm_name must equal the stored name; a mismatch is validation and no operation is stored. By default HTTP 201 stages volume.delete into the environment draft. No volume.delete operation is queued until changes deploy. Query trust_skip=true runs the immediate path: requires Idempotency-Key. Data is deleted. A mounted volume is unmounted first in the same operation. Acceptance writes an audit event with action volume.delete.
trust_skip?booleanWhen true, queue volume.delete immediately instead of staging.
The delete was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X POST 'https://k8s.dflow.sh/v1/volumes/{volume_id}/delete'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}One row per Job or CronJob owned by the application.
application/json- response
jobs*array<>curl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/jobs'{ "jobs": [ { "id": "string", "application_id": "string", "name": "string", "image": "string", "command": [ "string" ], "active_deadline_seconds": 0, "schedule": "string", "concurrency_policy": "string", "status": "pending", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}image is required. schedule of five cron fields creates a CronJob and stages job.schedule. Omitting schedule stages job.create. command is an optional argv array that replaces the image entrypoint. active_deadline_seconds is optional. Zero means 20 minutes. The value must be from 1 to 3600. privileged, host_path, host_network, host_pid, host_ipc, and security_context are rejected. The platform sets the security context. By default HTTP 201 stages the job into the environment draft. No job row or job.create operation is created until changes deploy. Query trust_skip=true runs the immediate path: requires Idempotency-Key, inserts the job row, and returns HTTP 202 with a pending job.create operation.
trust_skip?booleanWhen true, create the job immediately instead of staging job.create or job.schedule.
The job was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X POST 'https://k8s.dflow.sh/v1/applications/{app_id}/jobs'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}Body confirm_name must equal the stored name. By default HTTP 201 stages job.delete into the environment draft. No job.delete operation is queued until changes deploy. Query trust_skip=true runs the immediate path: requires Idempotency-Key and returns HTTP 202 with a pending job.delete operation.
trust_skip?booleanWhen true, queue job.delete immediately instead of staging.
The delete was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X POST 'https://k8s.dflow.sh/v1/jobs/{job_id}/delete'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}Each group is one shared dflow.json. An application that is not in a group keeps its own file.
The groups in this environment.
curl -X GET 'https://k8s.dflow.sh/v1/environments/{env_id}/groups'Body {"name","applications"} combines the stored dflow.json of those applications into one file. The same name replaces the member list and rebuilds the file. An application that leaves keeps its own slice. An application already in another group is a conflict. An empty applications list removes that group and writes each member its own file. This write does not deploy.
application/json- body
name*stringapplications*array<string>The shared dflow.json and the applications that use it.
curl -X POST 'https://k8s.dflow.sh/v1/environments/{env_id}/groups' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "applications": [ "string" ]}'Returns the recipes in templates/*/dflow.json. supabase is not listed. examples/ is not listed.
curl -X GET 'https://k8s.dflow.sh/v1/templates'Body {"name":"umami"} installs an official recipe. A dflow.json document, with applications and services, installs that document. By default HTTP 201 stages template.install into the environment draft. No template.install operation is queued until changes deploy. Query trust_skip=true requires Idempotency-Key and HTTP 202 starts the install immediately. The same template can be installed again in one environment. The application and database service keep the recipe names when those names are free. When either name is taken, both gain the same four-character suffix a route adds to a taken hostname. The operation succeeds only when the public URL returns HTTP 200. One-time secrets are read from GET /v1/template-installs/{install_id} once.
trust_skip?booleanWhen true, queue template.install immediately instead of staging.
The install was staged into the environment draft.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X POST 'https://k8s.dflow.sh/v1/environments/{env_id}/template-installs'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}curl -X GET 'https://k8s.dflow.sh/v1/template-installs/{install_id}'curl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/files'Body path and contents. path is absolute and is not /. Contents are not returned later. Requires a deployment. By default stages files.set. Query trust_skip=true stores immediately and queues application.deploy.
trust_skip?booleanStaged file entry when not trust-skipping.
application/json- response
status*"staged""staged"message*stringchange_set_id*stringrevision*integerentry*One row in an environment change-set draft or a staged API response.
curl -X PUT 'https://k8s.dflow.sh/v1/applications/{app_id}/files'{ "status": "staged", "message": "string", "change_set_id": "string", "revision": 0, "entry": { "id": "string", "change_set_id": "string", "target": { "type": "string", "id": "string", "name": "string" }, "op": "string", "key": "string", "before": null, "after": null, "summary": "string", "depends_on": [ "string" ], "source": "string", "author_label": "string", "client_label": "string", "agent": { "session_id": "string", "task_id": "string", "task_title": "string" }, "state": "string", "stale": true, "operation_id": "string", "last_error": "string" }}Token ids, optional names, prefixes, roles, expires_at, last_used_at, and expiry_backfilled. The bearer secret is absent. expiry_backfilled is true when the migration set a 90 day expiry on an existing row.
curl -X GET 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/tokens'Body role is owner, admin, developer, or viewer. expires_in is optional. Empty means 90 days. Units are m, h, and d. The shortest value is 1m and the longest is 365d. never is rejected. name is optional, at most 64 characters, and has no control characters. The response includes expires_at, the name when one was set, and the token secret once. An expired bearer later returns 401 unauthenticated with message token expired. Optional stage_only marks the token so it cannot call change deploy.
The token secret is included once. expires_at is set. last_used_at is null.
curl -X POST 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/tokens'The response is HTTP 200 because the check finishes inside the request. A kubeconfig that does not parse, or a cluster that does not answer, finishes as failed and stores no cluster row. GET of the returned cluster_id is 404. When DFLOW_KUBECONFIG_KEY is set, a successful check stores an AES-256-GCM blob and the operation status is succeeded. When that variable is empty, status failed with error_code precondition means the report was saved and the credential was not stored. The response has no kubeconfig and no ciphertext. The body requires region, a short name such as in or us. This cluster stays on that workspace. A body with shared true is rejected. A platform cluster is POST /v1/admin/clusters and has no workspace. A missing Idempotency-Key creates no row.
Idempotency-Key*stringThe operation already finished. This is not a stored credential.
curl -X POST 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/clusters' \ -H 'Idempotency-Key: string'The cluster row. credential_state is not_persisted or stored. The response has no kubeconfig and no ciphertext.
curl -X GET 'https://k8s.dflow.sh/v1/workspaces/{workspace_id}/clusters/{cluster_id}'Platform owner only. Each item has id, name, provider, and credential_state. workspace_id is present for a private cluster. A platform cluster has no workspace. The response has no kubeconfig.
Items ordered by id. An empty list is an empty items array.
curl -X GET 'https://k8s.dflow.sh/v1/admin/clusters'Platform owner only. The cluster has a region and no workspace. Every workspace can place an environment on it. The response is HTTP 200 because the check finishes inside the request. The response has no kubeconfig. A kubeconfig that does not parse, or a cluster that does not answer, stores no row. A missing Idempotency-Key creates no row.
Idempotency-Key*stringThe operation already finished.
curl -X POST 'https://k8s.dflow.sh/v1/admin/clusters' \ -H 'Idempotency-Key: string'Platform owner only. The body matches one item from the list route. The response has no kubeconfig. Cross-tenant callers receive 404.
cluster_id*stringThe cluster row without credentials.
curl -X GET 'https://k8s.dflow.sh/v1/admin/clusters/string'Platform owner only. Each item has id, type, status, and workspace_id. message is present when the operation failed. page_size defaults to 50 and cannot exceed 200. There is no next page.
The newest operations, newest first.
curl -X GET 'https://k8s.dflow.sh/v1/admin/operations'Platform owner only. recovery_point and recovery_time are the word assumption. They are not a commitment. objective_met is false when no successful run finished inside 24 hours. last_local_at is the newest successful dump time. last_remote_at is the newest off-machine copy time. Both are empty when there is no such time. The response has no database URL, no platform key, and no age identity.
The newest backup runs.
curl -X GET 'https://k8s.dflow.sh/v1/admin/backups'Requires Idempotency-Key. HTTP 202 means the dump was queued. It does not mean the dump finished. An empty DFLOW_BACKUP_DIR or a directory on the database volume returns 412 and writes no file.
Full Operation record accepted (id, operation_id, resource_id) with status pending.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X POST 'https://k8s.dflow.sh/v1/admin/backups'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Platform owner only. With no object store, or with no age recipient, status is ok. A remote copy error on the latest successful dump returns 503. The 200 body has last_backup_at, last_remote_at, leader_id, queue.general, queue.build, oldest_pending_age_seconds, registry_disk, and registry_disk_used_pct. Empty times are empty strings. leader_id is empty when nobody holds the maintenance lock. registry_disk is ok, failing, or skipped. skipped means the hosted cluster is unset, its credential is not stored, or the volume stats could not be read. registry_disk_used_pct is the nearest integer percent, or 0 when skipped. A percent above 80 is HTTP 503 with status failing and registry_disk failing. That 503 body is this health object. A backup or read failure stays the error object. The body has no age identity, no object-store key, and no token.
status ok, plus backup times, the leader id, and the pending queue.
application/json- response
status*stringlast_backup_at*stringlast_remote_at*stringleader_id*stringoldest_pending_age_seconds*integerregistry_disk*stringregistry_disk_used_pct*integerqueue*curl -X GET 'https://k8s.dflow.sh/v1/admin/health'{ "status": "ok", "last_backup_at": "", "last_remote_at": "", "leader_id": "", "oldest_pending_age_seconds": 0, "registry_disk": "skipped", "registry_disk_used_pct": 0, "queue": { "general": 0, "build": 0 }}Platform owner only. Reports whether DFLOW_MAINTENANCE_MODE-style release freeze is currently on for this API process. Startup reads DFLOW_MAINTENANCE_MODE; PUT flips it in memory without restart. Not workspace suspend. Not an MCP tool.
Current freeze flag.
application/json- response
enabled*booleancurl -X GET 'https://k8s.dflow.sh/v1/admin/maintenance'{ "enabled": false}Platform owner only. Sets the in-process release freeze without editing api.env or restarting. When enabled is true, mutating product /v1 routes return 503; GETs, probes, /v1/admin/*, and auth refresh/logout stay up. GET /v1/version.maintenance matches. A process restart reloads DFLOW_MAINTENANCE_MODE from the environment. dflow-server maintenance:on and maintenance:off call this route. Not an MCP tool.
application/json- body
enabled*booleanThe freeze flag after the change.
application/json- response
enabled*booleancurl -X PUT 'https://k8s.dflow.sh/v1/admin/maintenance' \ -H 'Content-Type: application/json' \ -d '{ "enabled": true}'{ "enabled": true}Platform owner only. The plaintext code is not included. used is how many accounts have been created with that code.
items of id, email, max_uses, used, expires_at, created_at, created_by, and revoked_at. No code.
curl -X GET 'https://k8s.dflow.sh/v1/admin/signup-invites'Platform owner only. The response code is the plaintext and is shown once. Later reads do not return it. The database stores the SHA-256 hash. email empty means any address can register with the code. max_uses defaults to 1 and must be 1 to 100. ttl_seconds defaults to 14 days and must be from 1 hour to 90 days. created_by is the token id, not the bearer secret.
id, code, email, max_uses, used, expires_at, and created_at. code is not stored and is not logged.
curl -X POST 'https://k8s.dflow.sh/v1/admin/signup-invites'Platform owner only. A second revoke returns the same row. The id starts with inv_.
The invite, including revoked_at. The plaintext code is not included.
curl -X POST 'https://k8s.dflow.sh/v1/admin/signup-invites/{invite_id}/revoke'The caller sends a bearer token and exactly one of operation_id or application_id. The response token starts with st_ and expires_in is 60. It is HMAC-signed with a key derived from DFLOW_DATA_KEY and it is not stored. An empty data key is HTTP 412 with precondition. GET /v1/operations/{operation_id}/events and GET /v1/operations/{operation_id}/logs accept ?stream_token= for that operation. GET /v1/applications/{app_id}/logs, /events, and /pod-events accept it for that application on JSON and on follow=true. Any other route still requires a bearer token. An expired token or a token used on a different resource is HTTP 401. The access log omits the query string. A logged URL redacts stream_token.
The token is shown once. Cache-Control is no-store.
application/json- response
token*stringexpires_in*integercurl -X POST 'https://k8s.dflow.sh/v1/stream-tokens'{ "token": "st_example", "expires_in": 60}HTTP 200 includes a failed operation. A failed deploy's error_message names the container when the cluster reported one. request_id is the API request that queued the operation, or empty when the row predates that column. The body has no idempotency key and no credential.
The operation. status failed is still HTTP 200.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref when both are present.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timecurl -X GET 'https://k8s.dflow.sh/v1/operations/{operation_id}'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "resource_id": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z"}The response is text/event-stream. Each row is id, event, and one data JSON object with seq, kind, status, phase, detail, and at. kind is status, phase, or log_hint. The event name is status, phase, or log. log is the event name for kind log_hint. Last-Event-ID, or the after query when that header is absent, is the last seq the client has applied. The stream sends later rows, a comment line every 15 seconds while it waits, and event end after a terminal status. Cache-Control is no-cache. X-Accel-Buffering is no. Another workspace's operation is 404. A browser EventSource can send stream_token from POST /v1/stream-tokens instead of a bearer header. The token must be scoped to this operation. An expired or wrong-scope token is 401. The query value is not written to the access log.
The event stream. It stays open until the operation is finished, then closes after event end.
response?stringtext/event-streamcurl -X GET 'https://k8s.dflow.sh/v1/operations/{operation_id}/events'"string"Without follow, returns JSON {chunks:[{seq,stream,body,at}]} oldest first (PRD-069). When DFLOW_BETTERSTACK_QUERY_TOKEN and DFLOW_BETTERSTACK_QUERY_SOURCE_ID are set, historical reads prefer Better Stack filtered by this operation id (the same id on deployments.operation_id / source_builds.operation_id). An empty sink falls back to Postgres operation_log_chunks. When those settings are unset, chunks only. Query tail defaults to 500 and must be from 1 to 5000. An empty log is chunks [] and message No logs yet. follow=true returns text/event-stream from Postgres chunks only (live wait / --wait). Last-Event-ID, or the after query when that header is absent, is the last seq the client has applied. Each later chunk is id, event log, and data with seq, stream, body, and at. A comment line is written every 15 seconds while the stream waits. After the operation is finished and the stored chunks are sent, the stream sends event end and closes. The body is redacted. Another workspace's operation is 404. A stream_token scoped to this operation may replace the bearer header. An expired or wrong-scope token is 401. Product durability is Better Stack retention plus the operation id pointer; chunk retention stays a live-wait cache.
tail?integerLine count for non-follow historical reads. Ignored when follow=true.
1 <= value <= 5000500follow?booleanafter?integerLast applied seq when Last-Event-ID is absent (follow only).
0 <= valueJSON chunks, or a text/event-stream when follow=true.
- response
chunks*array<>message?stringcurl -X GET 'https://k8s.dflow.sh/v1/operations/{operation_id}/logs'{ "chunks": [], "message": "No logs yet."}A pending operation becomes cancelled. A running operation stays running until the handler stops. A finished operation is unchanged.
The operation was pending or running.
curl -X POST 'https://k8s.dflow.sh/v1/operations/{operation_id}/cancel'An unknown token id is 404. A token that is already revoked is 409 with code conflict. The confirmation is the display prefix.
The token is revoked after the display prefix matches.
curl -X POST 'https://k8s.dflow.sh/v1/tokens/{token_id}/revoke'Reads durable application logs from Better Stack when DFLOW_BETTERSTACK_QUERY_TOKEN and DFLOW_BETTERSTACK_QUERY_SOURCE_ID are set on dflow-api (PRD-068). When those are unset, falls back to live kubectl pod logs (PRD-023). Query format defaults to txt (text/plain). format=json returns application/json {"lines":[…]}. Empty JSON is {"lines":[]}. Lines are oldest to newest. Query tail defaults to 500 and must be from 1 to 5000. Query pods (repeatable or comma-separated) filters to named pods; omitted returns every replica. Query container selects one container name when present on sink events. follow=true returns text/event-stream of new sink lines (polled). since is an optional RFC3339 time for follow. Levels are normalized (warning→warn; missing→info; unknown lowercase passthrough). A bearer token, platform token, URL password, or kubeconfig secret in the text is replaced with [redacted]. Missing both sink credentials and a selected cluster returns 412 cluster_not_selected. A stream_token scoped to this application may replace the bearer header. An expired or wrong-scope token is 401.
tail?integer1 <= value <= 5000500format?string"txt""txt""text""json"pods?stringPod name filter; repeat or comma-separate for multiple.
container?stringfollow?booleansince?stringdate-timetext/plain txt tail, JSON {"lines":[…]}, or text/event-stream when follow=true.
response?stringcurl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/logs'{ "lines": []}Returns events whose involved object is a pod labeled for this application. This is separate from the platform operation list. page_size defaults to 50 and must be from 1 to 200. An empty page includes message No pod events yet. No selected cluster returns 412. A stream_token scoped to this application may replace the bearer header. An expired or wrong-scope token is 401.
Kubernetes events for this application's pods.
application/json- response
events*array<>next_page_token?stringmessage?stringcurl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/pod-events'{ "events": [], "message": "No pod events yet."}Items are operation records. They are not Kubernetes Event objects. Newest first. page_size defaults to 50 and maxes at 100. page_token or cursor returns the next page. next_page_token and next_cursor are the same opaque cursor. An empty first page includes the message No events yet. Operation history stays available after the application is deleted so Activity and audits can replay deploy history. A stream_token scoped to this application may replace the bearer header. An expired or wrong-scope token is 401. The live server-sent stream is GET /v1/operations/{operation_id}/events.
app_id*stringpage_size?integerlimit?integerpage_token?stringcursor?stringhide_succeeded_repairs?booleanWhen true, hides succeeded application.repair rows (default true).
Operation history for the application.
application/json- response
items*array<>next_page_token?stringnext_cursor?stringmessage?stringcurl -X GET 'https://k8s.dflow.sh/v1/applications/string/events'{ "items": [], "message": "No events yet."}tls is tls_disabled, pending, or ready. custom_domains lists the extra hostnames. A stored platform hostname is returned even when the application's recipe says route.public is false. That flag skips creating a hostname. It does not hide one that is already stored. No platform row returns 404.
The stored platform host, its custom hostnames, and the last observation. public is false when the document has no route.public true. The hostname stays stored.
application/json- response
id?stringhost?stringtls?stringtls_disabled, pending, or ready.
address?stringobserved_at?stringpublic*booleanTrue only when the application document route.public is true. False when the document has no public true. A false value keeps the stored hostname and does not make it live.
custom_domains?array<>curl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/route'{ "id": "string", "host": "string", "tls": "string", "address": "string", "observed_at": "string", "public": true, "custom_domains": [ { "id": "string", "host": "string", "tls": "string", "address": "string", "observed_at": "string" } ]}By default this stages domain.add into the environment draft and returns HTTP 202 with status staged. No domain row or application.route operation is created until changes deploy. Query trust_skip=true applies immediately and returns HTTP 202 with a pending application.route operation. An omitted host uses the application, project, and environment names plus DFLOW_APPS_DOMAIN. That platform hostname is the only name under the platform suffix. A host outside that suffix is a custom hostname. Adding one creates the platform hostname first when it is missing. An application stores at most 10 custom hostnames. A name under the platform suffix, other than the stored platform hostname, returns 400. An empty ingress class or an empty apps domain returns 412. The response has no kubeconfig.
trust_skip?booleanWhen true, apply the route change immediately.
The route change was staged, or a route operation was accepted when trust_skip is true.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X PUT 'https://k8s.dflow.sh/v1/applications/{app_id}/route'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}By default this stages domain.remove. Query trust_skip=true removes immediately and returns a pending application.route operation. The platform hostname stays. An unknown host returns 404.
trust_skip?booleanThe route removal was staged, or a route operation was accepted when trust_skip is true.
application/json- response
id*stringtype*stringstatus*string"pending""running""succeeded""failed""cancelled"resource_ref?stringresource_id?stringSame value as resource_ref. Present on HTTP 202 acceptance bodies for CLI compatibility.
request_id?stringThe API request that queued this operation. Empty on a row created before the column existed.
error_code?stringerror_message?stringcreated_at?stringdate-timestarted_at?stringdate-timefinished_at?stringdate-timecancel_requested_at?stringdate-timeoperation_id?stringSame value as id. Present on HTTP 202 acceptance bodies for operator CLI compatibility.
curl -X DELETE 'https://k8s.dflow.sh/v1/applications/{app_id}/route/{host}'{ "id": "string", "type": "string", "status": "pending", "resource_ref": "string", "request_id": "string", "error_code": "string", "error_message": "string", "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "resource_id": "string", "operation_id": "string"}Returns revision and values. Secret values are never included. Secret-like key names and URL userinfo are masked unless query reveal=true.
reveal?booleanThe stored non-secret map.
curl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/env'Replaces the caller's non-secret variables. Keys the platform already stored are kept. That includes DFLOW_ link variables such as DFLOW_DATABASE_HOST, and PORT or KUBERNETES_SERVICE_HOST when one is already stored. Sending one of those keys with the same stored value is ignored. A new or different reserved name returns 400 and leaves the stored map unchanged. Env and secret writes always stage into the shared environment draft and return 200 with status staged unless the caller trust-skips. Query trust_skip=true runs the same trust-skip path as POST .../changes/entries: one private change set, role gates, audit, and application.deploy when needed.
trust_skip?booleanWhen true, trust-skip deploys env changes immediately.
The map was unchanged or staged into the environment draft, or trust-skip finished without a deploy operation.
curl -X PUT 'https://k8s.dflow.sh/v1/applications/{app_id}/env'Removes a caller-owned key in the environment draft unless the caller trust-skips with trust_skip=true.
trust_skip?booleanThe key was staged unset, removed with no change, or trust-skip finished without a deploy operation.
curl -X DELETE 'https://k8s.dflow.sh/v1/applications/{app_id}/env/{key}'Returns sorted key names only. Values and ciphertext are never returned.
The key name list.
curl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/secrets'Stages secret removal unless the caller trust-skips with trust_skip=true.
trust_skip?booleanThe removal was staged or trust-skip finished without a deploy operation.
curl -X DELETE 'https://k8s.dflow.sh/v1/applications/{app_id}/secrets/{key}'Stores AES-256-GCM ciphertext under DFLOW_DATA_KEY. Writes always stage unless the caller trust-skips with trust_skip=true. GET of secrets never returns the value. A body field named data_key is rejected.
trust_skip?booleanThe secret was staged or trust-skip finished without a deploy operation.
curl -X PUT 'https://k8s.dflow.sh/v1/applications/{app_id}/secrets/{key}'Returns whether a per-application git clone token is stored. The token value is never returned.
Token presence.
application/json- response
has_git_token*booleancurl -X GET 'https://k8s.dflow.sh/v1/applications/{app_id}/source/git-token'{ "has_git_token": true}Stages removal unless trust_skip=true. confirmation=yes is required.
confirmation*"yes""yes"trust_skip?booleanStaged or trust-skip applied.
curl -X DELETE 'https://k8s.dflow.sh/v1/applications/{app_id}/source/git-token?confirmation=yes'AES-256-GCM under DFLOW_DATA_KEY. Write-only; stages like other config unless trust_skip=true. Optional repo binds the token to one private repository before the application document has build.repo.
trust_skip?booleanapplication/json- body
token*stringrepo?stringHTTPS or owner/name URL; required for first private builds when build.repo is not set yet.
Staged or trust-skip applied.
curl -X PUT 'https://k8s.dflow.sh/v1/applications/{app_id}/source/git-token' \ -H 'Content-Type: application/json' \ -d '{ "token": "string"}'How is this guide?