Skip to main content

Incidents API

List Incidents

GET /api/v1/incidents
Query Parameters:
  • status - Filter by status (investigating, identified, monitoring, resolved)
  • monitor_id - Filter by monitor
  • since - Start time (ISO 8601)
  • until - End time (ISO 8601)
Response:
{
  "incidents": [
    {
      "id": "inc_abc123",
      "monitor_id": "mon_xyz789",
      "monitor_name": "Production API",
      "status": "resolved",
      "started_at": "2024-01-15T10:30:00Z",
      "resolved_at": "2024-01-15T10:51:00Z",
      "duration_minutes": 21,
      "affected_regions": ["nyc", "london"]
    }
  ]
}

Get Incident

GET /api/v1/incidents/:id
Response:
{
  "id": "inc_abc123",
  "monitor_id": "mon_xyz789",
  "monitor_name": "Production API",
  "status": "resolved",
  "started_at": "2024-01-15T10:30:00Z",
  "resolved_at": "2024-01-15T10:51:00Z",
  "duration_minutes": 21,
  "affected_regions": ["nyc", "london"],
  "updates": [
    {
      "id": "upd_001",
      "status": "investigating",
      "message": "We are investigating reports of API unavailability.",
      "created_at": "2024-01-15T10:32:00Z"
    },
    {
      "id": "upd_002",
      "status": "identified",
      "message": "Root cause identified: database connection pool exhausted.",
      "created_at": "2024-01-15T10:40:00Z"
    },
    {
      "id": "upd_003",
      "status": "resolved",
      "message": "Connection pool scaled. Service restored.",
      "created_at": "2024-01-15T10:51:00Z"
    }
  ],
  "timeline": [
    {
      "type": "check_failed",
      "region": "nyc",
      "message": "Timeout after 10s",
      "timestamp": "2024-01-15T10:30:00Z"
    },
    {
      "type": "check_failed",
      "region": "london",
      "message": "HTTP 503",
      "timestamp": "2024-01-15T10:30:05Z"
    },
    {
      "type": "incident_created",
      "message": "Incident opened",
      "timestamp": "2024-01-15T10:30:10Z"
    }
  ]
}

Create Incident Update

POST /api/v1/incidents/:id/updates
Request:
{
  "status": "identified",
  "message": "Root cause identified: database connection pool exhausted."
}

Resolve Incident

POST /api/v1/incidents/:id/resolve
Request:
{
  "message": "Connection pool scaled. Service restored."
}

Reopen Incident

POST /api/v1/incidents/:id/reopen
Request:
{
  "message": "Issue has recurred. Investigating again."
}