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
| Parameter | In | Type | Required |
|---|---|---|---|
status | query | string | No |
since | query | string (date-time) | No |
projectId | path | string (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
| Parameter | In | Type | Required |
|---|---|---|---|
incidentId | path | string (uuid) | Yes |
Response 200 (application/json)
{
ok: true;
}Errors: 400, 404, with the error body.
POST /incidents/{incidentId}/resolve
Resolve an incident
| Parameter | In | Type | Required |
|---|---|---|---|
incidentId | path | string (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.