Ruby SDKFeature Clients

Workflows Client

Workflows client for managing workflow definitions within Hatchet.

Note that workflows are the declaration, not the individual runs. If you're looking for runs, use the Runs client instead.

workflow = hatchet.workflows.get("workflow-id")
workflows = hatchet.workflows.list(workflow_name: "my-workflow", limit: 10)

It is available on the main client as hatchet.workflows.

Methods:

NameDescription
getGet a workflow by its ID.
listList all workflows in the tenant matching optional filters.
get_versionGet a workflow version by the workflow ID and an optional version.
deletePermanently delete a workflow.

Functions

get

Get a workflow by its ID.

workflow = hatchet.workflows.get("workflow-123")

Parameters:

NameTypeDescriptionDefault
workflow_idStringThe ID of the workflow to retrieve.required

Returns:

TypeDescription
ObjectThe workflow details.

Raises:

TypeDescription
HatchetSdkRest::ApiErrorIf the API request fails.

list

List all workflows in the tenant matching optional filters.

workflows = hatchet.workflows.list(workflow_name: "my-workflow", limit: 10, offset: 0)

Parameters:

NameTypeDescriptionDefault
workflow_nameString | nilThe name of the workflow to filter by (namespace will be applied)nil
limitInteger | nilThe maximum number of items to return.nil
offsetInteger | nilThe offset to start the list from.nil

Returns:

TypeDescription
ObjectA list of workflows.

Raises:

TypeDescription
HatchetSdkRest::ApiErrorIf the API request fails.

get_version

Get a workflow version by the workflow ID and an optional version.

version = hatchet.workflows.get_version("workflow-123", version: "v2")

Parameters:

NameTypeDescriptionDefault
workflow_idStringThe ID of the workflow to retrieve the version for.required
versionString | nilThe version to retrieve. If nil, the latest version is returned.nil

Returns:

TypeDescription
ObjectThe workflow version.

Raises:

TypeDescription
HatchetSdkRest::ApiErrorIf the API request fails.

delete

Permanently delete a workflow.

DANGEROUS: This will delete a workflow and all of its data.

hatchet.workflows.delete("workflow-123")

Parameters:

NameTypeDescriptionDefault
workflow_idStringThe ID of the workflow to delete.required

Raises:

TypeDescription
HatchetSdkRest::ApiErrorIf the API request fails.

Last updated on August 24, 2026

On this page