Skip to content
Start here

Instances

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.

InstancesStatus

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

InstancesEvents

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}