Skip to content
Start here

Instances

List of workflow instances
client.workflows.instances.list(stringworkflowName, InstanceListParams { account_id, cursor, date_end, 5 more } params, RequestOptionsoptions?): V4PagePaginationArray<InstanceListResponse { id, created_on, ended_on, 5 more } >
GET/accounts/{account_id}/workflows/{workflow_name}/instances
Get logs and status from instance
client.workflows.instances.get(stringworkflowName, stringinstanceId, InstanceGetParams { account_id, order, simple } params, RequestOptionsoptions?): InstanceGetResponse { end, error, output, 9 more }
GET/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}
Create a new workflow instance
client.workflows.instances.create(stringworkflowName, InstanceCreateParams { account_id, instance_id, instance_retention, params } params, RequestOptionsoptions?): InstanceCreateResponse { id, status, version_id, workflow_id }
POST/accounts/{account_id}/workflows/{workflow_name}/instances
Batch create new Workflow instances
client.workflows.instances.bulk(stringworkflowName, InstanceBulkParams { account_id, body } params, RequestOptionsoptions?): SinglePage<InstanceBulkResponse { id, status, version_id, workflow_id } >
POST/accounts/{account_id}/workflows/{workflow_name}/instances/batch
ModelsExpand Collapse
InstanceListResponse { id, created_on, ended_on, 5 more }
id: string
maxLength100
minLength1
created_on: string
formatdate-time
ended_on: string | null
formatdate-time
modified_on: string
formatdate-time
started_on: string | null
formatdate-time
status: "queued" | "running" | "paused" | 5 more
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
version_id: string
formatuuid
workflow_id: string
formatuuid
InstanceGetResponse { end, error, output, 9 more }
end: string | null
formatdate-time
error: Error | null
message: string
name: string
output: string | number
One of the following:
string
number
params: unknown
queued: string
formatdate-time
start: string | null
formatdate-time
status: "queued" | "running" | "paused" | 5 more
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
step_count: number
steps: Array<UnionMember0 { attempts, config, end, 5 more } | UnionMember1 { end, error, finished, 3 more } | UnionMember2 { trigger, type } | UnionMember3 { end, error, finished, 4 more } >
One of the following:
UnionMember0 { attempts, config, end, 5 more }
attempts: Array<Attempt>
end: string | null
formatdate-time
error: Error | null
message: string
name: string
start: string
formatdate-time
success: boolean | null
config: Config { retries, timeout }
retries: Retries { delay, limit, backoff }
delay: string | number

Specifies the delay duration.

One of the following:
string
number
limit: number
backoff?: "constant" | "linear" | "exponential"
One of the following:
"constant"
"linear"
"exponential"
timeout: string | number

Specifies the timeout duration.

One of the following:
string
number
end: string | null
formatdate-time
name: string
output: string | null
start: string
formatdate-time
success: boolean | null
type: "step"
UnionMember1 { end, error, finished, 3 more }
end: string
formatdate-time
error: Error | null
message: string
name: string
finished: boolean
name: string
start: string
formatdate-time
type: "sleep"
UnionMember2 { trigger, type }
trigger: Trigger { source }
source: string
type: "termination"
UnionMember3 { end, error, finished, 4 more }
end: string
formatdate-time
error: Error | null
message: string
name: string
finished: boolean
name: string
start: string
formatdate-time
type: "waitForEvent"
output?: string
success: boolean | null
trigger: Trigger { source }
source: "unknown" | "api" | "binding" | 2 more
One of the following:
"unknown"
"api"
"binding"
"event"
"cron"
versionId: string
formatuuid
InstanceCreateResponse { id, status, version_id, workflow_id }
id: string
maxLength100
minLength1
status: "queued" | "running" | "paused" | 5 more
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
version_id: string
formatuuid
workflow_id: string
formatuuid
InstanceBulkResponse { id, status, version_id, workflow_id }
id: string
maxLength100
minLength1
status: "queued" | "running" | "paused" | 5 more
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
version_id: string
formatuuid
workflow_id: string
formatuuid

InstancesStatus

Change status of instance
client.workflows.instances.status.edit(stringworkflowName, stringinstanceId, StatusEditParams { account_id, status } params, RequestOptionsoptions?): StatusEditResponse { status, timestamp }
PATCH/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/status
ModelsExpand Collapse
StatusEditResponse { status, timestamp }
status: "queued" | "running" | "paused" | 5 more
One of the following:
"queued"
"running"
"paused"
"errored"
"terminated"
"complete"
"waitingForPause"
"waiting"
timestamp: string

Accepts ISO 8601 with no timezone offsets and in UTC.

formatdate-time

InstancesEvents

Send event to instance
client.workflows.instances.events.create(stringworkflowName, stringinstanceId, stringeventType, EventCreateParams { account_id, body } params, RequestOptionsoptions?): EventCreateResponse
POST/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}/events/{event_type}
ModelsExpand Collapse
EventCreateResponse = unknown