Skip to content

Incidents endpoints

5 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 /incidents/project/{projectId}

List incidents for a project, newest first, by status and opened-after

ParameterInTypeRequired
statusquerystringNo
sincequerystring (date-time)No
projectIdpathstring (uuid)Yes
Response 200 (application/json)
{
  incidents: {
    id: string;
    orgId: string | null;
    projectId: string | null;
    status: string;
    type?: string | null;
    message?: string | null;
    createdAt: string | string (date-time);
    updatedAt?: string | string (date-time);
    source: "rule" | "manual";
    acknowledgedBy: {
      id: string;
      name: string | null;
    } | null;
    acknowledgedAt: string | null;
    resolvedBy: {
      id: string;
      name: string | null;
    } | null;
    resolvedAt: string | null;
    history: "recorded" | "unknown";
  }[];
}

Errors: 400, 401, 403, with the error body.

POST /incidents/

Create an incident for a project

Request body (application/json, required)
{
  projectId: string (uuid);
  title: string;
  severity: "low" | "medium" | "high" | "critical";
  category: string;
  description?: string;
  envId?: string (uuid);
}
Response 201 (application/json)
{
  ok: true;
  incident: {
    id: string;
    orgId: string | null;
    projectId: string | null;
    status: string;
    type?: string | null;
    message?: string | null;
    createdAt: string | string (date-time);
    updatedAt?: string | string (date-time);
  };
}

Errors: 400, 401, 403, 404, with the error body.

POST /incidents/{incidentId}/ack

Acknowledge an incident

ParameterInTypeRequired
incidentIdpathstring (uuid)Yes
Response 200 (application/json)
{
  ok: true;
}

Errors: 400, 404, with the error body.

POST /incidents/{incidentId}/resolve

Resolve an incident

ParameterInTypeRequired
incidentIdpathstring (uuid)Yes
Response 200 (application/json)
{
  ok: true;
}

Errors: 400, 404, with the error body.

POST /incidents/bulk

Bulk acknowledge or resolve incidents

Request body (application/json, required)
{
  ids: (string (uuid))[];
  action: "acknowledge" | "resolve";
}
Response 200 (application/json)
{
  ok: true;
  updated: number;
}

Errors: 400, 404, with the error body.