Getting Steps
// All steps
const steps = await thread.steps();
// Specific step
const orderSteps = await thread.steps('order_placed');
// With filters
const failedSteps = await thread.steps('payment_processed', {
status: 'failed',
limit: 50
});
// All steps
steps, err := thread.Steps(ctx, "", "", "")
if err != nil {
log.Fatal(err)
}
// Specific step
orderSteps, err := thread.Steps(ctx, "order_placed", "", "")
if err != nil {
log.Fatal(err)
}
// With filters
failedSteps, err := thread.Steps(ctx, "payment_processed", "", "failed")
if err != nil {
log.Fatal(err)
}
# All steps
steps = await archived_thread.steps()
# Specific step
order_steps = await archived_thread.steps(step_name="order_placed")
# With filters
failed_steps = await archived_thread.steps(
step_name="payment_processed",
status="failed"
)
Filter Options
| Option | Type | Description |
|---|---|---|
status | string | success or failed |
startedAfter | string | ISO timestamp filter |
startedBefore | string | ISO timestamp filter |
limit | number | Max results |
Step Properties
| Property | Type | Description |
|---|---|---|
stepId | string | Step ID |
stepName | string | Step name |
status | string | success or failed |
idempotencyKey | string | Idempotency key |
context | object | Business context |
createdAt | string | ISO timestamp |
retryCount | number | Retry attempts |
Step History
const history = await step.history();
history, err := step.History(ctx)
if err != nil {
log.Fatal(err)
}
from threadify.models import HistoryQueryOptions
history = await step.history(HistoryQueryOptions(limit=100))
History Properties
| Property | Type | Description |
|---|---|---|
attempt | number | Attempt number |
status | string | success or failed |
timestamp | string | ISO timestamp |
context | object | Context at attempt |
error | string | Error message |
duration | number | Execution time (ms) |
Next Steps
Validation Results
Query contract violations
Sub-steps
Track granular operations