Get a discovery run
Required permissions: events:read.
THE POLL. Call this until settledAt is non-null, then read the events that stand for the run's scope. settledAt and status: completed arrive together and mean the run is over in full: searched, and every event it produced written. From that moment the candidate and event counts are frozen and GET /v1/events?discoveryRunId= returns the complete scope: everything this run wrote, at any event date, plus the account × signal × lookback matches, including events an earlier run wrote. The counters remain about this execution and are not the size of that page — though a settled run paged to the end yields at least eventsNew, which one page need not. The same read before settlement returns what the run has written so far. There is no timer to wait out.
Two things NOT to poll on. completedAt marks only the first half, the search: it can be set while status is still running, because the events from that search are still being written. And do not watch eventsNew stop changing — a pause between two writes looks exactly like the end of a run and is not one. Read error even when status is completed.
How long to wait. progress says how many accounts are finished and, once there is enough data, etaSeconds and estimatedSettleAt estimate when the run settles. While the run is unsettled the response carries a Retry-After header (and progress.retryAfterSeconds): read the run again after that many seconds rather than on a fixed short timer.
Request
- Base URL: https://api.trayo.ai
- URL: https://api.trayo.ai/v1/discoveries/{runId}
- Auth: HTTP bearer
Path parameters
Response
The run's current state. Recomputed on every call while the run is live; served from the run's own frozen receipt once settledAt is set.
Changes
No recorded changes to this operation across all 1 revision of this API.