Appearance
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_TOKENFor 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_TOKENExample 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
| Parameter | Type | Description | Default |
|---|---|---|---|
| page | integer | Page number | 1 |
| per_page | integer | Items per page (max: 100) | 25 |
| status | string | Filter 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
| Field | Type | Description |
|---|---|---|
| data | array | Array of incident objects |
| data[].uuid | string | Incident UUID |
| data[].status | string | Incident status (ongoing, resolved) |
| data[].error_message | string | Error message describing the incident |
| data[].closed_at | string|null | ISO 8601 timestamp when incident was closed |
| data[].snoozed_at | string|null | ISO 8601 timestamp when incident was snoozed |
| data[].snooze_until | string|null | ISO 8601 timestamp when snooze expires |
| data[].monitorable_type | string | Type of monitorable (NetworkMonitor, Server) |
| data[].monitorable_uuid | string | UUID of the monitorable resource (NetworkMonitor or Server) |
| data[].monitorable_name | string|null | Name of the network monitor or server hostname |
| data[].request | string|null | Request details (URL, method, etc.) |
| data[].request_headers | object|null | Request headers as a JSON object |
| data[].response | string|null | Response body or status message |
| data[].response_headers | object|null | Response headers as a JSON object |
| data[].ai_analysis | string|null | AI-generated analysis of the incident (if available) |
| data[].ai_analysis_generated_at | string|null | ISO 8601 timestamp when AI analysis was generated |
| data[].ai_analysis_attempted_generation_at | string|null | ISO 8601 timestamp when AI analysis generation was requested |
| data[].created_at | string | ISO 8601 timestamp of creation |
| data[].updated_at | string | ISO 8601 timestamp of last update |
| meta | object | Pagination metadata |
| meta.current_page | integer | Current page number |
| meta.per_page | integer | Number of items per page |
| meta.total_pages | integer | Total number of pages |
| meta.total_count | integer | Total number of items |
Get Incident
Retrieve details of a specific incident.
http
GET /api/v1/incidents/:uuid
Authorization: Bearer YOUR_PROJECT_API_TOKENExample 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_TOKENExample 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
| Parameter | Type | Description | Default |
|---|---|---|---|
| page | integer | Page number | 1 |
| per_page | integer | Items 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
| Field | Type | Description |
|---|---|---|
| data | array | Array of incident event objects |
| data[].id | integer | Event ID |
| data[].message | string | Event message describing what happened |
| data[].created_at | string | ISO 8601 timestamp of creation |
| data[].updated_at | string | ISO 8601 timestamp of last update |
| meta | object | Pagination metadata |
| meta.current_page | integer | Current page number |
| meta.per_page | integer | Number of items per page |
| meta.total_pages | integer | Total number of pages |
| meta.total_count | integer | Total number of items |
Resolve Incident
Mark an incident as resolved.
http
POST /api/v1/incidents/:uuid/resolve
Authorization: Bearer YOUR_PROJECT_API_TOKENExample 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/jsonExample 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
| Parameter | Type | Description | Default |
|---|---|---|---|
| duration_minutes | integer | Duration to snooze in minutes | 60 |
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_TOKENExample 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_TOKENExample 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_attimestamp indicates when generation was requested. - Once complete, the
ai_analysisfield will contain the analysis text andai_analysis_generated_atwill be set. - You can check the incident's
ai_analysisfield 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
| Code | Description |
|---|---|
| incident_not_found | The specified incident does not exist |
| invalid_request | The request parameters are invalid |
| unauthorized | Invalid or missing authentication token |