Skip to content

client.flows.pinned

View as Markdown

client.flows.pinned — the flows.pinned operations.

On AsyncKindgi every method is the same, awaited.

resolve(
flow_id: str | UUID,
/,
*,
project_id: str | UUID | None = None,
org_id: str | UUID | None = None,
timeout: float | None = None,
) -> PinnedVersionResolution
Signature

The version in use for a project. GET /v1/flows/{flowId}/pinned

Resolves the version in use for a project (or an org, or the whole workspace): the most specific pin covering it (the project, its org, then the workspace) whose version is still active, else the newest version the project reaches, as a run that names no version takes it. A pin whose version doesn't reach the project is passed over, as a run passes it over. via says which; pinnedScope names the pin that matched.

list(flow_id: str | UUID, /, *, timeout: float | None = None) -> PinnedVersionList
Signature

List a flow's pinned versions. GET /v1/flows/{flowId}/pinned-versions

Every scope with a version pinned, and the change that set it.

pin(
flow_id: str | UUID,
body: PinVersionBody | Mapping[str, Any] | None = None,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
**fields: Any,
) -> PinnedVersionChange
Signature

Pin a version for a scope. POST /v1/flows/{flowId}/pinned/pin

Pins version for scope (the workspace, an org or a project), or moves the scope's pin to it. A run that names no flow version takes the version pinned for its project (the project's own pin, then its org's, then the workspace's), else the newest version the project reaches. A run that names its version isn't affected, and a run already started keeps its version. The version must be registered and active. Pinning the version the scope already pins changes nothing and answers the change that set it. Every change is recorded, with who asked and why. Needs pin on the flow.

unpin(
flow_id: str | UUID,
body: UnpinVersionBody | Mapping[str, Any] | None = None,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
**fields: Any,
) -> PinnedVersionChange
Signature

Remove a scope's pin. POST /v1/flows/{flowId}/pinned/unpin

Removes the scope's own pin: the scope then follows the next scope up (its org's pin, then the workspace's), or, with none above, takes what it would if it had never been pinned. Recorded like a pin. Needs pin on the flow.

history(
flow_id: str | UUID,
/,
*,
limit: int | None = None,
cursor: str | None = None,
timeout: float | None = None,
) -> PinnedVersionChangePage
Signature

List a flow's pin changes. GET /v1/flows/{flowId}/pin-history

Every pin and unpin of the item, newest first: what each scope pinned before and after, who asked and why.