Defined in: sdk-js/src/v4/resources/executions.ts:47
client.executions.* — read-only access to past workflow runs and
a live SSE stream for in-flight ones. Workflow executions are
created by the operator when a trigger fires (or by workflows.trigger
for manual runs); this resource never creates them, only reads.
new ExecutionsResource(transport: Transport): ExecutionsResource;
Defined in: sdk-js/src/v4/resources/executions.ts:48
| Parameter | Type |
|---|---|
transport | Transport |
ExecutionsResource
list(params: ListExecutionsParams): Promise<{
data: readonly object[];
pageInfo: {
hasNextPage: boolean;
hasPreviousPage: boolean;
startCursor?: string;
endCursor?: string;
};
}>;
Defined in: sdk-js/src/v4/resources/executions.ts:51
GET /executions
| Parameter | Type |
|---|---|
params | ListExecutionsParams |
Promise<{
data: readonly object[];
pageInfo: {
hasNextPage: boolean;
hasPreviousPage: boolean;
startCursor?: string;
endCursor?: string;
};
}>
listForWorkflow(workflowId: string, params?: object): Promise<{
data: readonly object[];
pageInfo: {
hasNextPage: boolean;
hasPreviousPage: boolean;
startCursor?: string;
endCursor?: string;
};
}>;
Defined in: sdk-js/src/v4/resources/executions.ts:59
GET /workflows//executions — convenience nested form.
| Parameter | Type |
|---|---|
workflowId | string |
params? | { before?: string; after?: string; limit?: number; } |
params.before? | string |
params.after? | string |
params.limit? | number |
Promise<{
data: readonly object[];
pageInfo: {
hasNextPage: boolean;
hasPreviousPage: boolean;
startCursor?: string;
endCursor?: string;
};
}>
retrieve(id: string, params: RetrieveExecutionParams): Promise<{
id: string;
workflowId: string;
chainId?: number;
index?: number;
startAt: number;
endAt?: number;
status: "error" | "failed" | "pending" | "success";
error?: string;
steps?: readonly object[];
executionFee?: {
amount: string;
unit: "USD" | "WEI" | "PERCENTAGE";
};
cogs?: readonly object[];
valueFee?: {
fee: {
amount: string;
unit: "USD" | "WEI" | "PERCENTAGE";
};
tier: "unspecified" | "tier1" | "tier2" | "tier3";
valueBase?: string;
classificationMethod?: "ruleBased" | "llm";
confidence?: number;
reason?: string;
};
}>;
Defined in: sdk-js/src/v4/resources/executions.ts:70
GET /executions/?workflowId=...
| Parameter | Type |
|---|---|
id | string |
params | RetrieveExecutionParams |
Promise<{
id: string;
workflowId: string;
chainId?: number;
index?: number;
startAt: number;
endAt?: number;
status: "error" | "failed" | "pending" | "success";
error?: string;
steps?: readonly object[];
executionFee?: {
amount: string;
unit: "USD" | "WEI" | "PERCENTAGE";
};
cogs?: readonly object[];
valueFee?: {
fee: {
amount: string;
unit: "USD" | "WEI" | "PERCENTAGE";
};
tier: "unspecified" | "tier1" | "tier2" | "tier3";
valueBase?: string;
classificationMethod?: "ruleBased" | "llm";
confidence?: number;
reason?: string;
};
}>
getStatus(id: string, params: RetrieveExecutionParams): Promise<{
id: string;
workflowId?: string;
status: "error" | "failed" | "pending" | "success";
startAt?: number;
endAt?: number;
error?: string;
}>;
Defined in: sdk-js/src/v4/resources/executions.ts:78
GET /executions/:getStatus?workflowId=...
| Parameter | Type |
|---|---|
id | string |
params | RetrieveExecutionParams |
Promise<{
id: string;
workflowId?: string;
status: "error" | "failed" | "pending" | "success";
startAt?: number;
endAt?: number;
error?: string;
}>
count(params?: CountExecutionsParams): Promise<{
total: number;
}>;
Defined in: sdk-js/src/v4/resources/executions.ts:86
GET /executions:count
| Parameter | Type |
|---|---|
params? | CountExecutionsParams |
Promise<{
total: number;
}>
stats(params?: ExecutionStatsParams): Promise<{
total: number;
succeeded: number;
failed: number;
pending?: number;
avgExecutionTime?: number;
}>;
Defined in: sdk-js/src/v4/resources/executions.ts:94
GET /executions:stats
| Parameter | Type |
|---|---|
params? | ExecutionStatsParams |
Promise<{
total: number;
succeeded: number;
failed: number;
pending?: number;
avgExecutionTime?: number;
}>
stream(id: string, params: StreamExecutionParams): AsyncGenerator<{
id: string;
workflowId?: string;
status: "error" | "failed" | "pending" | "success";
startAt?: number;
endAt?: number;
error?: string;
}, void, undefined>;
Defined in: sdk-js/src/v4/resources/executions.ts:108
GET /executions/:stream — yields one ExecutionStatusSummary
per status change. The stream closes on terminal status, when
signal aborts, or when the connection drops. Implementation
uses fetch streaming + a minimal SSE parser so it works in Node
20+ and browsers without an external EventSource polyfill.
| Parameter | Type |
|---|---|
id | string |
params | StreamExecutionParams |
AsyncGenerator<{
id: string;
workflowId?: string;
status: "error" | "failed" | "pending" | "success";
startAt?: number;
endAt?: number;
error?: string;
}, void, undefined>
waitForTerminal(id: string, params: StreamExecutionParams): Promise<{
id: string;
workflowId?: string;
status: "error" | "failed" | "pending" | "success";
startAt?: number;
endAt?: number;
error?: string;
}>;
Defined in: sdk-js/src/v4/resources/executions.ts:156
Poll-and-wait helper — yields the final ExecutionStatusSummary
once the execution reaches a terminal status. Use stream()
when you want every intermediate status update.
| Parameter | Type |
|---|---|
id | string |
params | StreamExecutionParams |
Promise<{
id: string;
workflowId?: string;
status: "error" | "failed" | "pending" | "success";
startAt?: number;
endAt?: number;
error?: string;
}>