Skip to main content

Core Model

Trio exposes two interaction styles:
  • Synchronous check: one request, one immediate result
  • Asynchronous jobs: create a job, then receive progress/results by polling, webhook, or SSE

Endpoints by Monitoring Mode

EndpointPurposeTypical output
POST /check-onceOne immediate yes/no checkJSON response
POST /live-monitorDetect when a condition becomes trueJob lifecycle + trigger result
POST /live-digestGenerate summaries over time windowsJob lifecycle + summary results

Delivery Patterns

1. Synchronous JSON

Use POST /check-once when you need a direct answer in one call.

2. Polling

Create a monitor or digest job, then poll GET /jobs/{job_id} until terminal status.

3. Webhooks

Include webhook_url in the request body to receive push callbacks.

4. SSE

Send Accept: text/event-stream for live event streaming during request handling.

Delivery Selection Rules

POST /live-monitor

  1. webhook_url present -> webhook mode
  2. Accept: text/event-stream and no webhook_url -> SSE mode
  3. otherwise -> polling mode

POST /live-digest

  1. Accept: text/event-stream and no webhook_url -> SSE mode
  2. webhook_url present -> webhook mode
  3. otherwise -> polling mode

Picking the Right Pattern

  • Prefer check-once for validation and quick decision points.
  • Prefer polling for simple backend jobs.
  • Prefer webhooks for workflow automation.
  • Prefer SSE for live progress in apps.

Next Steps