Skip to content
Start here

Workflows

List all Workflows
workflows.list(WorkflowListParams**kwargs) -> SyncV4PagePaginationArray[WorkflowListResponse]
GET/accounts/{account_id}/workflows
Get Workflow details
workflows.get(strworkflow_name, WorkflowGetParams**kwargs) -> WorkflowGetResponse
GET/accounts/{account_id}/workflows/{workflow_name}
Create/modify Workflow
workflows.update(strworkflow_name, WorkflowUpdateParams**kwargs) -> WorkflowUpdateResponse
PUT/accounts/{account_id}/workflows/{workflow_name}
Deletes a Workflow
workflows.delete(strworkflow_name, WorkflowDeleteParams**kwargs) -> WorkflowDeleteResponse
DELETE/accounts/{account_id}/workflows/{workflow_name}
ModelsExpand Collapse
class WorkflowListResponse:
id: str
formatuuid
class_name: str
created_on: datetime
formatdate-time
instances: Instances
complete: Optional[float]
errored: Optional[float]
paused: Optional[float]
queued: Optional[float]
rolling_back: Optional[float]
running: Optional[float]
terminated: Optional[float]
waiting: Optional[float]
waiting_for_pause: Optional[float]
modified_on: datetime
formatdate-time
name: str
maxLength64
minLength1
script_name: str
triggered_on: Optional[datetime]
formatdate-time
schedules: Optional[List[Schedule]]
cron: str
next_instance: str
class WorkflowGetResponse:
id: str
formatuuid
class_name: str
created_on: datetime
formatdate-time
instances: Instances
complete: Optional[float]
errored: Optional[float]
paused: Optional[float]
queued: Optional[float]
rolling_back: Optional[float]
running: Optional[float]
terminated: Optional[float]
waiting: Optional[float]
waiting_for_pause: Optional[float]
modified_on: datetime
formatdate-time
name: str
maxLength64
minLength1
script_name: str
triggered_on: Optional[datetime]
formatdate-time
schedules: Optional[List[Schedule]]
cron: str
next_instance: str
class WorkflowUpdateResponse:
id: str
formatuuid
class_name: str
created_on: datetime
formatdate-time
is_deleted: float
modified_on: datetime
formatdate-time
name: str
maxLength64
minLength1
script_name: str
terminator_running: float
triggered_on: Optional[datetime]
formatdate-time
version_id: str
formatuuid
class WorkflowDeleteResponse:
status: Literal["ok"]
success: Optional[bool]

WorkflowsInstances

List of workflow instances
workflows.instances.list(strworkflow_name, InstanceListParams**kwargs) -> SyncV4PagePaginationArray[InstanceListResponse]
GET/accounts/{account_id}/workflows/{workflow_name}/instances
Get logs and status from instance
workflows.instances.get(strinstance_id, InstanceGetParams**kwargs) -> InstanceGetResponse
GET/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}
Create a new workflow instance
workflows.instances.create(strworkflow_name, InstanceCreateParams**kwargs) -> InstanceCreateResponse
POST/accounts/{account_id}/workflows/{workflow_name}/instances
Batch create new Workflow instances
workflows.instances.bulk(strworkflow_name, InstanceBulkParams**kwargs) -> SyncSinglePage[InstanceBulkResponse]
POST/accounts/{account_id}/workflows/{workflow_name}/instances/batch
Get full step output from instance
workflows.instances.step(strinstance_id, InstanceStepParams**kwargs) -> InstanceStepResponse
GET/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/step
ModelsExpand Collapse
class InstanceListResponse:
id: str
maxLength100
minLength1
created_on: datetime
formatdate-time
ended_on: Optional[datetime]
formatdate-time
modified_on: datetime
formatdate-time
started_on: Optional[datetime]
formatdate-time
status: Literal["queued", "running", "paused", 6 more]
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
"rollingBack"
version_id: str
formatuuid
workflow_id: str
formatuuid
trigger_source: Optional[Literal["unknown", "api", "binding", 2 more]]
One of the following:
"unknown"
"api"
"binding"
"event"
"cron"
class InstanceGetResponse:
end: Optional[datetime]
formatdate-time
error: Optional[Error]
message: str
name: str
output: Union[str, float]
One of the following:
str
float
params: object
queued: datetime
formatdate-time
rollback: Optional[Rollback]
error: Optional[RollbackError]
message: str
name: str
outcome: Literal["complete", "failed"]
One of the following:
"complete"
"failed"
start: Optional[datetime]
formatdate-time
status: Literal["queued", "running", "paused", 6 more]
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
"rollingBack"
step_count: int
steps: List[Step]
One of the following:
class StepUnionMember0:
attempts: List[StepUnionMember0Attempt]
end: Optional[datetime]
formatdate-time
error: Optional[StepUnionMember0AttemptError]
message: str
name: str
start: datetime
formatdate-time
success: Optional[bool]
config: StepUnionMember0Config
retries: StepUnionMember0ConfigRetries
delay: Union[str, float]

Specifies the delay duration.

One of the following:
str
float
limit: float
backoff: Optional[Literal["constant", "linear", "exponential"]]
One of the following:
"constant"
"linear"
"exponential"
timeout: Union[str, float]

Specifies the timeout duration.

One of the following:
str
float
sensitive: Optional[Literal["output"]]

When set to ‘output’, step output is redacted from log and step output responses.

end: Optional[datetime]
formatdate-time
name: str
output: Optional[str]
start: datetime
formatdate-time
success: Optional[bool]
type: Literal["step", "rollback"]
One of the following:
"step"
"rollback"
class StepUnionMember1:
end: datetime
formatdate-time
error: Optional[StepUnionMember1Error]
message: str
name: str
finished: bool
name: str
start: datetime
formatdate-time
type: Literal["sleep"]
class StepUnionMember2:
trigger: StepUnionMember2Trigger
source: str
type: Literal["termination"]
class StepUnionMember3:
end: datetime
formatdate-time
error: Optional[StepUnionMember3Error]
message: str
name: str
finished: bool
name: str
start: datetime
formatdate-time
type: Literal["waitForEvent"]
output: Optional[str]
success: Optional[bool]
trigger: Trigger
source: Literal["unknown", "api", "binding", 2 more]
One of the following:
"unknown"
"api"
"binding"
"event"
"cron"
version_id: str
formatuuid
schedule: Optional[Schedule]
cron: str
scheduled_time: float
class InstanceCreateResponse:
id: str
maxLength100
minLength1
status: Literal["queued", "running", "paused", 6 more]
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
"rollingBack"
version_id: str
formatuuid
workflow_id: str
formatuuid
trigger_source: Optional[Literal["unknown", "api", "binding", 2 more]]
One of the following:
"unknown"
"api"
"binding"
"event"
"cron"
class InstanceBulkResponse:
id: str
maxLength100
minLength1
status: Literal["queued", "running", "paused", 6 more]
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
"rollingBack"
version_id: str
formatuuid
workflow_id: str
formatuuid
trigger_source: Optional[Literal["unknown", "api", "binding", 2 more]]
One of the following:
"unknown"
"api"
"binding"
"event"
"cron"
class InstanceStepResponse:
error: Optional[Error]

Error details when status=‘errored’; null otherwise.

message: str
name: str
status: Literal["queued", "running", "paused", 6 more]
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
"rollingBack"
output: Optional[object]

Full step output or waitForEvent payload without truncation. Sensitive outputs are returned as ‘[REDACTED]’. Populated when status=‘complete’. May be a ReadableStream when the step returned one from step.do; stream outputs are served as application/octet-stream rather than JSON.

WorkflowsInstancesStatus

Change status of instance
workflows.instances.status.edit(strinstance_id, StatusEditParams**kwargs) -> StatusEditResponse
PATCH/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/status
ModelsExpand Collapse
class StatusEditResponse:
status: Literal["queued", "running", "paused", 6 more]
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
"rollingBack"
timestamp: datetime

Accepts ISO 8601 with no timezone offsets and in UTC.

formatdate-time

WorkflowsInstancesEvents

Send event to instance
workflows.instances.events.create(strevent_type, EventCreateParams**kwargs) -> object
POST/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/events/{event_type}

WorkflowsVersions

List deployed Workflow versions
workflows.versions.list(strworkflow_name, VersionListParams**kwargs) -> SyncV4PagePaginationArray[VersionListResponse]
GET/accounts/{account_id}/workflows/{workflow_name}/versions
Get Workflow version details
workflows.versions.get(strversion_id, VersionGetParams**kwargs) -> VersionGetResponse
GET/accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}
Get Workflow version graph
workflows.versions.graph(strversion_id, VersionGraphParams**kwargs) -> VersionGraphResponse
GET/accounts/{account_id}/workflows/{workflow_name}/versions/{version_id}/graph
ModelsExpand Collapse
class VersionListResponse:
id: str
formatuuid
class_name: str
created_on: datetime
formatdate-time
has_dag: bool
language: Literal["javascript", "python"]

The programming language of the workflow implementation

One of the following:
"javascript"
"python"
modified_on: datetime
formatdate-time
workflow_id: str
formatuuid
limits: Optional[Limits]
steps: Optional[int]
minimum1
class VersionGetResponse:
id: str
formatuuid
class_name: str
created_on: datetime
formatdate-time
has_dag: bool
language: Literal["javascript", "python"]

The programming language of the workflow implementation

One of the following:
"javascript"
"python"
modified_on: datetime
formatdate-time
workflow_id: str
formatuuid
limits: Optional[Limits]
steps: Optional[int]
minimum1
class VersionGraphResponse:
id: str
formatuuid
class_name: str
created_on: datetime
formatdate-time
graph: Optional[Graph]

Versioned workflow graph payload.

version: float
workflow: GraphWorkflow

A parsed workflow entrypoint with its step graph.

class_name: str
functions: Dict[str, GraphWorkflowFunctions]
name: str
nodes: List[object]

Child nodes (recursive).

type: Literal["function_def"]
nodes: List[GraphWorkflowNode]
One of the following:
class GraphWorkflowNodeUnionMember0:
duration: Union[float, str]

Duration as milliseconds (number) or human-readable string.

One of the following:
float
str
name: str
type: Literal["step_sleep"]
resolves: Optional[float]
starts: Optional[float]
class GraphWorkflowNodeUnionMember1:
config: GraphWorkflowNodeUnionMember1Config

Configuration for a step (retries and timeout).

retries: GraphWorkflowNodeUnionMember1ConfigRetries

Retry policy for a step.

backoff: Literal["constant", "linear", "exponential"]

Backoff strategy for step retries.

One of the following:
"constant"
"linear"
"exponential"
delay: Union[float, str]

Duration as milliseconds (number) or human-readable string.

One of the following:
float
str
limit: float
timeout: Union[float, str]

Duration as milliseconds (number) or human-readable string.

One of the following:
float
str
name: str
nodes: List[object]

Child nodes (recursive).

type: Literal["step_do"]
resolves: Optional[float]
starts: Optional[float]
class GraphWorkflowNodeUnionMember2:
name: str
options: Optional[GraphWorkflowNodeUnionMember2Options]

Options for a waitForEvent step.

event_type: str
timeout: Union[float, str]

Duration as milliseconds (number) or human-readable string.

One of the following:
float
str
type: Literal["step_wait_for_event"]
payload: Optional[GraphWorkflowNodeUnionMember2Payload]

Shape descriptor for JSON payloads.

One of the following:
class GraphWorkflowNodeUnionMember2PayloadType:
type: Literal["unknown"]
class GraphWorkflowNodeUnionMember2PayloadUnionMember1:
fields: Dict[str, object]

Nested JsonShape fields (recursive structure).

type: Literal["object"]
resolves: Optional[float]
starts: Optional[float]
class GraphWorkflowNodeUnionMember3:
name: str
timestamp: str
type: Literal["step_sleep_until"]
resolves: Optional[float]
starts: Optional[float]
class GraphWorkflowNodeUnionMember4:
nodes: List[object]

Child nodes (recursive).

type: Literal["loop"]
class GraphWorkflowNodeUnionMember5:
kind: Literal["all", "any", "all_settled", "race"]

Parallel execution strategy.

One of the following:
"all"
"any"
"all_settled"
"race"
nodes: List[object]

Child nodes (recursive).

type: Literal["parallel"]
class GraphWorkflowNodeUnionMember6:
catch_block: Optional[GraphWorkflowNodeUnionMember6CatchBlock]
nodes: List[object]

Child nodes (recursive).

type: Literal["block"]
finally_block: Optional[GraphWorkflowNodeUnionMember6FinallyBlock]
nodes: List[object]

Child nodes (recursive).

type: Literal["block"]
try_block: Optional[GraphWorkflowNodeUnionMember6TryBlock]
nodes: List[object]

Child nodes (recursive).

type: Literal["block"]
type: Literal["try"]
class GraphWorkflowNodeUnionMember7:
nodes: List[object]

Child nodes (recursive).

type: Literal["block"]
class GraphWorkflowNodeUnionMember8:
branches: List[GraphWorkflowNodeUnionMember8Branch]
condition: Optional[str]
nodes: List[object]

Child nodes (recursive).

type: Literal["if"]
class GraphWorkflowNodeUnionMember9:
branches: List[GraphWorkflowNodeUnionMember9Branch]
condition: Optional[str]
nodes: List[object]

Child nodes (recursive).

discriminant: str
type: Literal["switch"]
class GraphWorkflowNodeUnionMember10:
class_name: str
functions: Dict[str, GraphWorkflowNodeUnionMember10Functions]
name: str
nodes: List[object]

Child nodes (recursive).

type: Literal["function_def"]
nodes: List[object]

Child nodes (recursive).

type: Literal["start"]
payload: Optional[GraphWorkflowNodeUnionMember10Payload]

Shape descriptor for JSON payloads.

One of the following:
class GraphWorkflowNodeUnionMember10PayloadType:
type: Literal["unknown"]
class GraphWorkflowNodeUnionMember10PayloadUnionMember1:
fields: Dict[str, object]

Nested JsonShape fields (recursive structure).

type: Literal["object"]
class GraphWorkflowNodeUnionMember11:
name: str
type: Literal["function_call"]
resolves: Optional[float]
starts: Optional[float]
class GraphWorkflowNodeUnionMember12:
name: str
nodes: List[object]

Child nodes (recursive).

type: Literal["function_def"]
class GraphWorkflowNodeUnionMember13:
kind: Literal["break", "return"]

Break or return from a loop.

One of the following:
"break"
"return"
type: Literal["break"]
payload: Optional[GraphWorkflowPayload]

Shape descriptor for JSON payloads.

One of the following:
class GraphWorkflowPayloadType:
type: Literal["unknown"]
class GraphWorkflowPayloadUnionMember1:
fields: Dict[str, object]

Nested JsonShape fields (recursive structure).

type: Literal["object"]
modified_on: datetime
formatdate-time
workflow_id: str
formatuuid