Skip to main content

GET /api/incidents/

Retrieves comprehensive details about a specific incident, including suggestions, thoughts, citations, correlated alerts, and chat sessions.

Authentication

Requires user authentication via cookies or headers. The user_id is extracted from the request.

Path Parameters

incident_id
string
required
UUID of the incident to retrieve

Response

Returns an object containing the complete incident details.
incident
object
required

Example Request

cURL
curl -X GET "https://api.aurora.example.com/api/incidents/123e4567-e89b-12d3-a456-426614174000" \
  -H "Cookie: session_token=YOUR_SESSION_TOKEN"

Example Response

{
  "incident": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "sourceType": "grafana",
    "sourceAlertId": "12345",
    "status": "investigating",
    "severity": "critical",
    "alert": {
      "title": "High CPU usage on web-server-01",
      "service": "web-server",
      "source": "grafana",
      "sourceUrl": "https://grafana.com/alerting/12345",
      "triggeredAt": "2024-03-03T10:30:00Z",
      "rawPayload": "{\"alertname\": \"HighCPU\", ...}",
      "metadata": {
        "threshold": "80%",
        "currentValue": "95%"
      }
    },
    "auroraStatus": "complete",
    "summary": "CPU spike caused by memory leak in payment-service v2.3.1",
    "chatSessionId": "abc123-session-id",
    "activeTab": "thoughts",
    "correlatedAlertCount": 2,
    "affectedServices": ["web-server", "payment-service"],
    "suggestions": [
      {
        "id": "1",
        "title": "Check recent deployments",
        "description": "Review recent changes to identify potential causes",
        "type": "diagnostic",
        "risk": "safe",
        "command": "kubectl rollout history deployment/web-server",
        "createdAt": "2024-03-03T10:31:00Z"
      }
    ],
    "streamingThoughts": [
      {
        "id": "1",
        "timestamp": "2024-03-03T10:30:15Z",
        "content": "Analyzing CPU metrics...",
        "type": "analysis",
        "createdAt": "2024-03-03T10:30:15Z"
      }
    ],
    "citations": [
      {
        "id": "1",
        "key": "1",
        "toolName": "kubectl",
        "command": "kubectl top pod",
        "output": "NAME                    CPU(cores)   MEMORY(bytes)\nweb-server-01           950m         2048Mi",
        "executedAt": "2024-03-03T10:30:20Z",
        "createdAt": "2024-03-03T10:30:20Z"
      }
    ],
    "correlatedAlerts": [
      {
        "id": "alert-uuid-1",
        "sourceType": "datadog",
        "alertTitle": "High memory usage on web-server-01",
        "alertService": "web-server",
        "alertSeverity": "warning",
        "correlationStrategy": "service",
        "correlationScore": 0.85,
        "correlationDetails": {
          "matchedField": "service"
        },
        "receivedAt": "2024-03-03T10:31:00Z"
      }
    ],
    "chatSessions": [
      {
        "id": "session-uuid-1",
        "title": "RCA: High CPU usage",
        "messages": [],
        "status": "completed",
        "createdAt": "2024-03-03T10:30:00Z",
        "updatedAt": "2024-03-03T10:45:00Z"
      }
    ],
    "startedAt": "2024-03-03T10:30:00Z",
    "analyzedAt": "2024-03-03T10:45:00Z",
    "createdAt": "2024-03-03T10:30:05Z",
    "updatedAt": "2024-03-03T10:45:00Z"
  }
}

Response Codes

200
Success
Successfully retrieved incident details
400
Bad Request
  • Missing user_id (authentication failed)
  • Invalid incident ID format (not a valid UUID)
404
Not Found
Incident not found or does not belong to the authenticated user
500
Internal Server Error
Failed to retrieve incident

Notes

  • The rawPayload field contains the complete original alert payload from the monitoring platform
  • Citations are filtered to only include numeric keys and ordered by citation key
  • Chat sessions are filtered to only include active sessions
  • Requires Row Level Security (RLS) context to be set with the user’s ID
  • All timestamps are in ISO 8601 format with UTC timezone

Build docs developers (and LLMs) love