v2026.1 Open Portal ↗
On this page

Incidents API

Endpoints Overview

MethodPathDescription
GET/prod/api/incidentsList incidents with filters
GET/prod/api/incidents/:idGet single incident
POST/prod/api/incidentsCreate new incident
PATCH/prod/api/incidents/:idUpdate incident fields
DELETE/prod/api/incidents/:idDelete incident (admin only)
GET/prod/api/incidents/:id/notesList work notes
POST/prod/api/incidents/:id/notesAdd work note
POST/prod/api/incidents/bulkBulk create/update

List Incidents

GET /prod/api/incidents

curl -H "Authorization: Bearer $TOKEN"   "https://your-instance.stackflow-tech.com/prod/api/incidents?state=new&priority=P1&limit=25"

Query Parameters:

ParameterTypeDescriptionExample
statestringFilter by statenew, in_progress, resolved, closed
prioritystringFilter by priorityP1, P2, P3, P4
assignment_groupstringFilter by group namePlatform Engineering
assigned_tostringFilter by assignee emailjane@example.com
categorystringFilter by categorydatabase, network
created_afterISO 8601Created after timestamp2026-05-01T00:00:00Z
created_beforeISO 8601Created before timestamp2026-05-31T23:59:59Z
pageintegerPage number1
limitintegerRecords per page (max 200)50
sortstringSort fieldcreated_at, priority, updated_at
orderstringSort directionasc, desc
qstringFull-text searchdatabase+timeout

Get Incident

GET /prod/api/incidents/:id

curl -H "Authorization: Bearer $TOKEN"   https://your-instance.stackflow-tech.com/prod/api/incidents/INC0001234
{
  "id": "INC0001234",
  "number": "INC0001234",
  "short_description": "Database timeout in prod",
  "description": "Seeing intermittent timeouts on the main Aurora cluster...",
  "priority": "P2",
  "state": "in_progress",
  "category": "database",
  "subcategory": "aurora",
  "impact": "medium",
  "urgency": "medium",
  "assignment_group": "Platform Engineering",
  "assigned_to": "jane.doe@example.com",
  "opened_by": "john.smith@example.com",
  "ci_id": "CI0000789",
  "parent_problem_id": null,
  "change_id": null,
  "sla_breach_at": "2026-05-19T18:30:00Z",
  "resolved_at": null,
  "closed_at": null,
  "created_at": "2026-05-19T14:30:00Z",
  "updated_at": "2026-05-19T14:45:00Z",
  "work_notes_count": 3,
  "ai_suggested_resolution": "Check Aurora connection pool settings..."
}

Create Incident

POST /prod/api/incidents

curl -X POST   https://your-instance.stackflow-tech.com/prod/api/incidents   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "short_description": "Redis cache miss rate above 90%",
    "description": "ElastiCache Redis cluster showing 95% cache miss rate since 15:00 UTC. All microservices impacted.",
    "priority": "P1",
    "category": "cache",
    "subcategory": "elasticache",
    "impact": "high",
    "urgency": "high",
    "assignment_group": "Platform Engineering",
    "ci_id": "CI0000456",
    "notify_stakeholders": true
  }'

Update Incident

PATCH /prod/api/incidents/:id

curl -X PATCH   https://your-instance.stackflow-tech.com/prod/api/incidents/INC0001234   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "state": "in_progress",
    "assigned_to": "jane.doe@example.com",
    "work_note": "Investigating Aurora slow query log — identified missing index on incidents_created_at"
  }'

State transitions follow this machine:

new → in_progress → resolved → closed
new → cancelled
in_progress → on_hold → in_progress
resolved → reopened → in_progress

Delete Incident

DELETE /prod/api/incidents/:id

# Requires super_admin or itsm_manager role
curl -X DELETE   -H "Authorization: Bearer $TOKEN"   https://your-instance.stackflow-tech.com/prod/api/incidents/INC0001234
Soft Delete: DELETE marks the incident as deleted=true in Aurora and removes it from all list views, but the record is retained for audit purposes. Hard deletion requires a database administrator operation and is irreversible.

Work Notes Sub-Resource

# List work notes
GET /prod/api/incidents/:id/notes

curl -H "Authorization: Bearer $TOKEN"   https://your-instance.stackflow-tech.com/prod/api/incidents/INC0001234/notes

# Add a work note
POST /prod/api/incidents/:id/notes

curl -X POST   https://your-instance.stackflow-tech.com/prod/api/incidents/INC0001234/notes   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "body": "Restarted Aurora connection pool. Error rate dropped to 0. Monitoring for 30 min.",
    "visibility": "team",
    "attachments": []
  }'
{
  "id": "note_abc123",
  "incident_id": "INC0001234",
  "body": "Restarted Aurora connection pool...",
  "visibility": "team",
  "author": "jane.doe@example.com",
  "created_at": "2026-05-19T15:10:00Z"
}

Bulk Operations

POST /prod/api/incidents/bulk

curl -X POST   https://your-instance.stackflow-tech.com/prod/api/incidents/bulk   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "operation": "update",
    "ids": ["INC0001230", "INC0001231", "INC0001232"],
    "fields": {
      "assignment_group": "Platform Engineering",
      "state": "in_progress"
    }
  }'

Field Reference

FieldTypeWritableDescription
idstringNoSystem-generated incident ID (INCxxxxxxx)
short_descriptionstringYesOne-line summary, max 255 chars (required)
descriptionstringYesFull description, supports Markdown
priorityenumYesP1, P2, P3, P4 (default: P3)
stateenumYesnew, in_progress, on_hold, resolved, closed, cancelled
categorystringYesIncident category
subcategorystringYesSubcategory within category
impactenumYeshigh, medium, low
urgencyenumYeshigh, medium, low
assignment_groupstringYesAssignment group name
assigned_tostringYesAssignee email address
ci_idstringYesRelated CI ID from CMDB
sla_breach_atISO 8601NoComputed SLA breach timestamp
created_atISO 8601NoRecord creation timestamp (UTC)
updated_atISO 8601NoLast update timestamp (UTC)