Alerts

Create an alert

Create a threshold alert in a project the authenticated user can write to.

Requires MEMBER role or higher in the project's workspace (the write service decides). Strict create — alerts have no unique name, so every call inserts and created is always true on success.

Args: request (Request): Incoming request (rate-limit plumbing). response (Response): Outgoing response (rate-limit plumbing). auth (AccountStampedAuth): Account-scope user auth (session token or CLI access JWT); its resolved user_id becomes the actor. payload (CreateAlertRequest): The alert rule to create. _live (None): Write-path liveness gate (blocks a revoked JWT session).

Returns: CreateAlertResponse: The created alert with its full rule.

post/api/v1/public/alerts

Request

  • Base URL
    https://app.traceroot.ai
  • URL
    https://app.traceroot.ai/api/v1/public/alerts
  • Auth
    HTTP bearer

Request body

aggregation'sum' | 'avg' | 'count' | 'max' | 'min' | 'p50' | 'p75' | 'p90' | 'p95' | 'p99' | 'uniq' required
measurestring required

A measure of the view, e.g. latency, cost, count

namestring required
no_data_mode'HOLD' | 'ZERO' | 'NOTIFY' nullable

What a window that measured nothing means; column default when omitted

project_idstring required
thresholdnumber required
threshold_operator'>' | '>=' | '<' | '<=' | '=' | '!=' required
view'SPANS' required
window'1m' | '5m' | '10m' | '30m' | '1h' | '2h' required

Response

Successful Response

createdboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.