Incidents API
Manage incidents programmatically, create them (which queues them for automatic triage), list and filter them, update status and ownership, add comments, and work with follow-up actions.
Base path: /api/v1/incidents · Permission resource: incident (actions read, write, delete). All requests require authentication.
Endpoints
| Method | Path | Purpose | Permission |
|---|---|---|---|
| POST | /incidents/ | Create an incident (queues it for triage) | incident:write |
| GET | /incidents/ | List incidents (filter + paginate) | incident:read |
| GET | /incidents/clusters | Incidents grouped into clusters | incident:read |
| GET | /incidents/summary | Per-tenant summary (multi-tenant aware) | incident:read |
| GET | /incidents/{incident_id} | Get one incident (with follow-up actions) | incident:read |
| PATCH | /incidents/{incident_id} | Update fields | incident:write |
| DELETE | /incidents/{incident_id} | Soft-delete | incident:delete |
| POST | /incidents/{incident_id}/assign | Assign to users | incident:write |
| POST | /incidents/{incident_id}/comments | Add a comment | incident:write |
| GET | /incidents/{incident_id}/comments | List comments | incident:read |
| GET | /incidents/{incident_id}/events | Activity log | incident:read |
| GET | /incidents/{incident_id}/artifacts | Attached artifacts | incident:read |
| GET | /incidents/triage/queue/status | Triage queue stats | incident:read |
| GET | /incidents/triage/queue | List triage queue entries | incident:read |
| POST | /incidents/{incident_id}/followup-actions/{action_id}/retry | Retry one follow-up | incident:write |
| POST | /incidents/{incident_id}/followup-actions/retry | Retry all failed follow-ups | incident:write |
| GET | /incidents/followup-actions/failed | List failed follow-ups | incident:read |
Create an incident
POST /api/v1/incidents/: the incident is created and automatically queued for triage.
Request body:
| Field | Type | Notes |
|---|---|---|
title | string | required, 1-500 chars |
description | string | required |
severity | string | e.g. critical, high, medium, low, informational |
priority | string | e.g. P1-P4 |
source_tool | string | the tool that produced the alert |
source_alert_name | string | the alert's name |
source_alert_id | string | the alert's ID in the source |
source_alert_type | string | the alert type |
source_metadata | object | any extra source data |
assigned_to_id | string | optional owner |
curl -s -X POST "http://localhost:8000/api/v1/incidents/" \
-H "Authorization: Bearer $CLOUDPEEK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Suspicious IAM key usage",
"description": "Access key used from a new geography.",
"severity": "high",
"priority": "P2",
"source_tool": "aws_guardduty",
"source_alert_name": "UnauthorizedAccess:IAMUser/ConsoleLogin",
"source_alert_id": "abc-123",
"source_alert_type": "guardduty_finding",
"source_metadata": { "region": "us-east-1" }
}'
# → 201 Created
List incidents
GET /api/v1/incidents/ supports filtering, sorting and pagination via query parameters:
| Param | Type | Notes |
|---|---|---|
status | string[] | filter by status |
severity | string[] | filter by severity |
priority | string[] | filter by priority |
assigned_to_id | string | filter by owner |
source_tool | string[] | filter by source tool |
source_alert_type | string[] | filter by alert type |
search | string | text search |
offset | int | default 0 |
limit | int | 1-200, default 50 |
sort_by | string | created_at, updated_at, priority, severity, status |
sort_order | string | asc or desc (default desc) |
curl -s "http://localhost:8000/api/v1/incidents/?priority=P1&sort_by=created_at&sort_order=desc&limit=25" \
-H "Authorization: Bearer $CLOUDPEEK_TOKEN"
# → { "incidents": [ … ], "total": 37, "offset": 0, "limit": 25 }
The incident object
A returned incident includes (among others):
id, title, description, status, severity, priority, source_tool, source_alert_name, source_alert_id, source_alert_type, alert_count, assigned_to, assignees, triage_result, triage_summary, recommendations, followup_actions, created_at, updated_at, triage_started_at, triage_completed_at, outcome_approval_status, outcome_rejection_reason.
The triage_* fields are populated by automatic triage, and followup_actions reflects the investigation plan.
Update an incident
PATCH /api/v1/incidents/{incident_id}: all fields optional: title, description, severity, priority, status, assigned_to_id, outcome_approval_status, outcome_rejection_reason. Recording a rejected triage outcome requires a rejection reason.
Assign and comment
POST /incidents/{incident_id}/assign: body{ "assignee_ids": ["user-1", "user-2"] }.POST /incidents/{incident_id}/comments: body{ "comment": "…", "is_internal": false }.
Follow-up actions
Retry follow-up actions that failed, individually or in bulk, and list failures across the tenant. See Follow-up Actions for what these are.
Related
- Incident Management: the UI for all of the above.
- Automatic Triage: what happens after you create an incident.