Skip to content

Incidents API Reference

This guide provides detailed information about the Incidents API endpoints.

Authentication

All incident endpoints require authentication using a Project API Token. Include your token in the Authorization header:

bash
Authorization: Bearer YOUR_PROJECT_API_TOKEN

For more information about authentication, see the Authentication Guide.

List Incidents

Retrieve a list of all incidents for your project.

http
GET /api/v1/incidents
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X GET "https://app.uptinio.com/api/v1/incidents?page=1&per_page=25&status=ongoing" \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Query Parameters

ParameterTypeDescriptionDefault
pageintegerPage number1
per_pageintegerItems per page (max: 100)25
statusstringFilter by status (ongoing, resolved)all

Note: Incidents are automatically ordered with ongoing incidents first, followed by resolved incidents. Within each status group, incidents are ordered by creation date (most recent first).

Response

json
{
  "data": [
    {
      "uuid": "INC123",
      "status": "ongoing",
      "error_message": "Connection timeout",
      "closed_at": null,
      "snoozed_at": null,
      "snooze_until": null,
      "monitorable_type": "NetworkMonitor",
      "monitorable_uuid": "NM123",
      "monitorable_name": "My Website",
      "request": "GET https://example.com",
      "request_headers": {
        "User-Agent": "Uptinio/1.0",
        "Accept": "*/*"
      },
      "response": "500 Internal Server Error",
      "response_headers": {
        "Content-Type": "text/html",
        "Content-Length": "123"
      },
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:05:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 25,
    "total_pages": 2,
    "total_count": 45
  }
}

Response Fields

FieldTypeDescription
dataarrayArray of incident objects
data[].uuidstringIncident UUID
data[].statusstringIncident status (ongoing, resolved)
data[].error_messagestringError message describing the incident
data[].closed_atstring|nullISO 8601 timestamp when incident was closed
data[].snoozed_atstring|nullISO 8601 timestamp when incident was snoozed
data[].snooze_untilstring|nullISO 8601 timestamp when snooze expires
data[].monitorable_typestringType of monitorable (NetworkMonitor, Server)
data[].monitorable_uuidstringUUID of the monitorable resource (NetworkMonitor or Server)
data[].monitorable_namestring|nullName of the network monitor or server hostname
data[].requeststring|nullRequest details (URL, method, etc.)
data[].request_headersobject|nullRequest headers as a JSON object
data[].responsestring|nullResponse body or status message
data[].response_headersobject|nullResponse headers as a JSON object
data[].ai_analysisstring|nullAI-generated analysis of the incident (if available)
data[].ai_analysis_generated_atstring|nullISO 8601 timestamp when AI analysis was generated
data[].ai_analysis_attempted_generation_atstring|nullISO 8601 timestamp when AI analysis generation was requested
data[].created_atstringISO 8601 timestamp of creation
data[].updated_atstringISO 8601 timestamp of last update
metaobjectPagination metadata
meta.current_pageintegerCurrent page number
meta.per_pageintegerNumber of items per page
meta.total_pagesintegerTotal number of pages
meta.total_countintegerTotal number of items

Get Incident

Retrieve details of a specific incident.

http
GET /api/v1/incidents/:uuid
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X GET https://app.uptinio.com/api/v1/incidents/INC123 \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Response

json
{
  "uuid": "INC123",
  "status": "ongoing",
  "error_message": "Connection timeout",
  "closed_at": null,
  "snoozed_at": null,
  "snooze_until": null,
  "monitorable_type": "NetworkMonitor",
  "monitorable_uuid": "NM123",
  "monitorable_name": "My Website",
  "ai_analysis": null,
  "ai_analysis_generated_at": null,
  "ai_analysis_attempted_generation_at": null,
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:05:00Z"
}

Get Incident Events

Retrieve a paginated list of events (logs) for a specific incident.

http
GET /api/v1/incidents/:uuid/events
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X GET "https://app.uptinio.com/api/v1/incidents/INC123/events?page=1&per_page=25" \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Query Parameters

ParameterTypeDescriptionDefault
pageintegerPage number1
per_pageintegerItems per page (max: 100)25

Note: Events are ordered by creation date in descending order (most recent first).

Response

json
{
  "data": [
    {
      "id": 1,
      "message": "Downtime confirmed by location us-east-1",
      "created_at": "2024-01-01T00:05:00Z",
      "updated_at": "2024-01-01T00:05:00Z"
    },
    {
      "id": 2,
      "message": "Downtime detected by location us-west-2",
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 25,
    "total_pages": 1,
    "total_count": 2
  }
}

Response Fields

FieldTypeDescription
dataarrayArray of incident event objects
data[].idintegerEvent ID
data[].messagestringEvent message describing what happened
data[].created_atstringISO 8601 timestamp of creation
data[].updated_atstringISO 8601 timestamp of last update
metaobjectPagination metadata
meta.current_pageintegerCurrent page number
meta.per_pageintegerNumber of items per page
meta.total_pagesintegerTotal number of pages
meta.total_countintegerTotal number of items

Resolve Incident

Mark an incident as resolved.

http
POST /api/v1/incidents/:uuid/resolve
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X POST https://app.uptinio.com/api/v1/incidents/INC123/resolve \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Response

json
{
  "uuid": "INC123",
  "status": "resolved",
  "error_message": "Connection timeout",
  "closed_at": "2024-01-01T00:10:00Z",
  "snoozed_at": null,
  "snooze_until": null,
  "monitorable_type": "NetworkMonitor",
  "monitorable_id": 1,
  "monitorable_name": "My Website",
  "request": "GET https://example.com",
  "request_headers": {
    "User-Agent": "Uptinio/1.0",
    "Accept": "*/*"
  },
  "response": "500 Internal Server Error",
  "response_headers": {
    "Content-Type": "text/html",
    "Content-Length": "123"
  },
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:10:00Z"
}

Snooze Incident

Temporarily snooze an incident for a specified duration.

http
POST /api/v1/incidents/:uuid/snooze
Authorization: Bearer YOUR_PROJECT_API_TOKEN
Content-Type: application/json

Example with curl:

bash
curl -X POST https://app.uptinio.com/api/v1/incidents/INC123/snooze \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "duration_minutes": 60
  }'

Request Body

ParameterTypeDescriptionDefault
duration_minutesintegerDuration to snooze in minutes60

Response

json
{
  "uuid": "INC123",
  "status": "ongoing",
  "error_message": "Connection timeout",
  "closed_at": null,
  "snoozed_at": "2024-01-01T00:10:00Z",
  "snooze_until": "2024-01-01T01:10:00Z",
  "monitorable_type": "NetworkMonitor",
  "monitorable_id": 1,
  "monitorable_name": "My Website",
  "request": "GET https://example.com",
  "request_headers": {
    "User-Agent": "Uptinio/1.0",
    "Accept": "*/*"
  },
  "response": "500 Internal Server Error",
  "response_headers": {
    "Content-Type": "text/html",
    "Content-Length": "123"
  },
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:10:00Z"
}

Unsnooze Incident

Remove the snooze from an incident.

http
POST /api/v1/incidents/:uuid/unsnooze
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X POST https://app.uptinio.com/api/v1/incidents/INC123/unsnooze \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Response

json
{
  "uuid": "INC123",
  "status": "ongoing",
  "error_message": "Connection timeout",
  "closed_at": null,
  "snoozed_at": null,
  "snooze_until": null,
  "monitorable_type": "NetworkMonitor",
  "monitorable_id": 1,
  "monitorable_name": "My Website",
  "request": "GET https://example.com",
  "request_headers": {
    "User-Agent": "Uptinio/1.0",
    "Accept": "*/*"
  },
  "response": "500 Internal Server Error",
  "response_headers": {
    "Content-Type": "text/html",
    "Content-Length": "123"
  },
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:15:00Z"
}

Generate AI Analysis

Generate an AI-powered analysis for an incident. The analysis will be generated asynchronously and will appear in the incident's ai_analysis field once complete.

http
POST /api/v1/incidents/:uuid/generate_analysis
Authorization: Bearer YOUR_PROJECT_API_TOKEN

Example with curl:

bash
curl -X POST https://app.uptinio.com/api/v1/incidents/INC123/generate_analysis \
  -H "Authorization: Bearer YOUR_PROJECT_API_TOKEN" \
  -H "Content-Type: application/json"

Response

Success (202 Accepted):

json
{
  "message": "AI analysis generation started. It will appear shortly.",
  "incident": {
    "uuid": "INC123",
    "status": "ongoing",
    "error_message": "Connection timeout",
    "ai_analysis": null,
    "ai_analysis_generated_at": null,
    "ai_analysis_attempted_generation_at": "2024-01-01T00:20:00Z",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:20:00Z"
  }
}

Error - Analysis Already Exists (422 Unprocessable Entity):

json
{
  "error": "Analysis has already been generated. Regeneration is not allowed.",
  "incident": {
    "uuid": "INC123",
    "ai_analysis": "The incident appears to be caused by...",
    "ai_analysis_generated_at": "2024-01-01T00:15:00Z"
  }
}

Error - Limit Reached (403 Forbidden):

json
{
  "error": "You have reached your monthly AI analysis limit (10/10). Please upgrade your plan to generate more analyses.",
  "limit": 10,
  "used": 10
}

Notes

  • Analysis generation is asynchronous. The ai_analysis_attempted_generation_at timestamp indicates when generation was requested.
  • Once complete, the ai_analysis field will contain the analysis text and ai_analysis_generated_at will be set.
  • You can check the incident's ai_analysis field via the Get Incident endpoint to see when analysis is ready.
  • Analysis cannot be regenerated once it has been successfully generated.
  • Monthly analysis limits apply based on your plan.

Error Codes

CodeDescription
incident_not_foundThe specified incident does not exist
invalid_requestThe request parameters are invalid
unauthorizedInvalid or missing authentication token

Next Steps