Skip to content

client.flows

View as Markdown

client.flows — the flows operations.

On AsyncKindgi every method is the same, awaited.

list(
*,
limit: int | None = None,
cursor: str | None = None,
name: str | None = None,
scope_kind: Literal['tenant', 'org', 'project'] | None = None,
scope_id: str | UUID | None = None,
inherit: bool | None = None,
include_retired: bool | None = None,
timeout: float | None = None,
) -> FlowCollectionPage
Signature

List flows. GET /v1/flows

Cursor-paginated list of the latest version per flow id. Optional ?name= filters by prefix on flow id. A retired flow (every version unregistered) is listed only with ?includeRetired=true, as its highest version with unregisteredAt, so it can be found and a version reinstated.

publish(
body: PublishFlowBody | Mapping[str, Any] | None = None,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
**fields: Any,
) -> PublishFlowResult
Signature

Publish a flow definition. POST /v1/flows

Body is a full flow JSON. Server validates via @kindgi/flow.loadFlow before persisting. Node handler code is not uploaded through this route.

get(
flow_id: str | UUID,
/,
*,
project_id: str | UUID | None = None,
timeout: float | None = None,
) -> Flow
Signature

Fetch the latest version of a flow. GET /v1/flows/{flowId}

An item more than one project serves (an environment order carries it to later environments) answers its newest active version that can run in a project the caller reads, and 404 when there is none. projectId narrows that to one project. An item with one project answers its latest active version.

list_versions(
flow_id: str | UUID,
/,
*,
limit: int | None = None,
cursor: str | None = None,
include_tombstoned: bool | None = None,
timeout: float | None = None,
) -> FlowCollectionPage
Signature

List versions of a flow. GET /v1/flows/{flowId}/versions

Cursor-paginated. Sort order is binding-defined (for example semver asc). Defaults to active versions only. Pass ?includeTombstoned=true to include unregistered versions too, each with unregisteredAt: a retired flow (every version unregistered) answers too, with its versions to reinstate.

get_version(
flow_id: str | UUID,
version: str,
/,
*,
timeout: float | None = None,
) -> Flow
Signature

Fetch a specific flow version. GET /v1/flows/{flowId}/versions/{version}

unregister(
flow_id: str | UUID,
version: str,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
) -> UnregisterFlowResult
Signature

Unregister a specific flow version. POST /v1/flows/{flowId}/versions/{version}/unregister

reinstate_version(
flow_id: str | UUID,
version: str,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
) -> ReinstateFlowVersionResult
Signature

Reinstate a specific tombstoned flow version. POST /v1/flows/{flowId}/versions/{version}/reinstate

Un-tombstones a previously-unregistered version: clears the tombstone on that version and recomputes the latest active version. Restores the manifest bytes verbatim (semver hygiene). Idempotent — reinstating an active version returns wasTombstoned: false. Reactivates a fully-retired flow identity when applicable. Publish is always allowed regardless of retirement state — this verb restores previously-published bytes; a fresh publish is the way to bring a flow back with new bytes.