Query Threads
Query Parameters
| Parameter | Type | Description |
|---|---|---|
actor | String | Filter by actor (user or service) |
contractName | String | Filter by contract name |
contractVersion | Int | Filter by contract version |
status | String | Filter by thread status |
startedAfter | String | ISO timestamp - threads started after |
startedBefore | String | ISO timestamp - threads started before |
completedAfter | String | ISO timestamp - threads completed after |
completedBefore | String | ISO timestamp - threads completed before |
limit | Int | Max results (default: 50, max: 100) |
offset | Int | Pagination offset |
Thread Fields
| Field | Type | Description |
|---|---|---|
id | ID! | Unique thread identifier |
contractId | String | Contract ID (if contract-based) |
contractName | String | Contract name |
contractVersion | Int | Contract version |
ownerId | String! | Thread owner ID |
companyId | String! | Company ID |
status | String! | Thread status |
createdBy | String | Creator ID |
lastHash | String | Last hash in chain |
refs | JSON | External references |
startedAt | String | Start timestamp |
completedAt | String | Completion timestamp |
error | String | Error message (if failed) |
Available Queries
| Query | Description |
|---|---|
thread(id) | Get single thread by ID |
threads(...) | Search with filters and pagination |
threadsByContract(...) | Contract-specific search |
threadsByRef(...) | Find by external reference |
threadChain(rootId) | Get thread relationships |