gateway/web/webapp.py). All
routes live on a single port (default 8000). To drive the agent in-process
from your own code instead, see the Python API. In production, always call the
API over HTTPS — deploy behind a TLS-terminating load balancer (the backend is
Terraform-managed, separately from this repo).
In production, terminate TLS at a load balancer or reverse proxy in front of
the application.
Authentication
Health
Alert intake
Enqueue an alert for background handling. Returns202:
text. Optional fields: alert_name, severity, source,
received_at. Request bodies larger than 1 MiB return 413.
Synchronous investigation
Runs the investigation in the request and returns the report. The connection remains open for the duration of the pipeline. Prefer the asynchronous API when calling through a load balancer.raw_alert. Optional top-level fields: alert_name,
severity.
Response fields: report, problem_md, root_cause, is_noise,
validity_score, and optionally tool_calls.
Asynchronous investigations (Clerk)
Enqueue an investigation, then poll for status. The background worker runs only whenOPENSRE_INVESTIGATION_WORKER=1. Records are stored in Postgres when
DATABASE_URL is set; otherwise they are kept in process memory. Reports are
written to local disk first and uploaded to S3 when OPENSRE_ARTIFACTS_BUCKET
is configured.
workspace_id is optional. Pass a Slack team ID when the investigation
originates from Slack.
404. A token without
an organization returns 403. Canceling a non-queued investigation returns
409.