Skip to main content

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
});

Filter Options

OptionTypeDescription
statusstringsuccess or failed
startedAfterstringISO timestamp filter
startedBeforestringISO timestamp filter
limitnumberMax results

Step Properties

PropertyTypeDescription
stepIdstringStep ID
stepNamestringStep name
statusstringsuccess or failed
idempotencyKeystringIdempotency key
contextobjectBusiness context
createdAtstringISO timestamp
retryCountnumberRetry attempts

Step History

const history = await step.history();

History Properties

PropertyTypeDescription
attemptnumberAttempt number
statusstringsuccess or failed
timestampstringISO timestamp
contextobjectContext at attempt
errorstringError message
durationnumberExecution time (ms)

Next Steps