Skip to content

Alert rules endpoints

4 endpoints at https://api.vaif.studio, generated from the API's OpenAPI document. The REST API page covers authentication, and All endpoints lists every group.

GET /alert-rules/project/{projectId}

ParameterInTypeRequired
projectIdpathstringYes
Response 200 (application/json)
{
  rules: {
    source: null | "api" | "functions" | "realtime";
    category: string;
    createdAt: string (date-time);
    enabled: boolean;
    envId: null | string;
    id: string;
    name: string;
    orgId: string;
    projectId: null | string;
    severity: string;
    threshold: any;
  }[];
}

POST /alert-rules/project/{projectId}

ParameterInTypeRequired
projectIdpathstringYes
Request body (application/json)
{
  name: string;
  source?: "api" | "functions" | "realtime";
  category?: "api" | "errors" | "functions" | "latency" | "realtime";
  severity: "critical" | "high" | "low" | "medium";
  enabled?: boolean;
  envId?: null | string;
  threshold: {
    windowMinutes?: number;
    errorRate?: number;
    p95Ms?: number;
    disconnects?: number;
  };
}
Response 200

No body.

Response 201 (application/json)
{
  rule: {
    source: null | "api" | "functions" | "realtime";
    category: string;
    createdAt: string (date-time);
    enabled: boolean;
    envId: null | string;
    id: string;
    name: string;
    orgId: string;
    projectId: null | string;
    severity: string;
    threshold: any;
  };
}

PUT /alert-rules/{ruleId}

ParameterInTypeRequired
ruleIdpathstringYes
Request body (application/json)
{
  source?: "api" | "functions" | "realtime";
  category?: "api" | "errors" | "functions" | "latency" | "realtime";
  envId?: null | string;
  severity?: "critical" | "high" | "low" | "medium";
  enabled?: boolean;
  name?: string;
  threshold?: {
    windowMinutes?: number;
    errorRate?: number;
    p95Ms?: number;
    disconnects?: number;
  };
}
Response 200 (application/json)
{
  rule: {
    source: null | "api" | "functions" | "realtime";
    category: string;
    createdAt: string (date-time);
    enabled: boolean;
    envId: null | string;
    id: string;
    name: string;
    orgId: string;
    projectId: null | string;
    severity: string;
    threshold: any;
  };
}

DELETE /alert-rules/{ruleId}

ParameterInTypeRequired
ruleIdpathstringYes
Response 200 (application/json)
{
  ok: boolean;
}