Retrieving Threads
// By ID
const thread = await threadify.getThread('thread-uuid');
// By external reference
const threads = await threadify.getThreadsByRef({
refKey: 'stripe_payment_id',
refValue: 'pi_1234567890'
});
// By ID
thread, err := conn.GetThread(ctx, "thread-uuid")
if err != nil {
log.Fatal(err)
}
// By external reference
threads, err := conn.GetThreadsByRef(ctx, &threadify.RefQuery{
RefKey: "stripe_payment_id",
RefValue: "pi_1234567890",
})
if err != nil {
log.Fatal(err)
}
from threadify.models import RefQuery
# By ID
thread = await conn.get_thread("thread-uuid")
# By external reference
threads = await conn.get_threads_by_ref(
RefQuery(ref_key="stripe_payment_id", ref_value="pi_1234567890")
)
Query Options
| Option | Type | Description |
|---|---|---|
refKey | string | Reference key |
refValue | string | Reference value |
status | string | active, completed, cancelled |
startedAfter | string | ISO timestamp filter |
startedBefore | string | ISO timestamp filter |
limit | number | Max results |
Thread Properties
| Property | Type | Description |
|---|---|---|
id | string | Thread ID |
status | string | active, completed, cancelled |
contractName | string | Contract name |
startedAt | string | ISO timestamp |
completedAt | string | ISO timestamp |
ownerId | string | Creator user/service |
Next Steps
Querying Steps
Get step data and execution history
Validation Results
Query contract violations