Fetches a chronological log of all activities and status changes related to an incident, including when it started, escalated, was acknowledged, and resolved.
Incident ID (number or string)
Promise that resolves to the IncidentActivityLog object
// Get incident activity log
const activityLog = await service.incidents.activityLog(12345);
activityLog.activities.forEach(activity => {
console.log(`${activity.timestamp}: ${activity.action}`);
});
https://uptimerobot.com/api/v3/#get-/incidents/-id-/activity-log Official API Documentation
Adds a comment to an existing incident for documentation or communication purposes. Comments help track incident resolution progress and team communication.
Incident ID (number or string)
Comment data (see IncidentCommentPayload interface)
Promise that resolves to true when comment is created successfully
// Add a comment to an incident
const success = await service.incidents.createComment(12345, {
content: 'Investigating the root cause of this outage',
});
https://uptimerobot.com/api/v3/#post-/incidents/-id-/comments Official API Documentation
Removes a specific comment from an incident. This action cannot be undone. Only the comment author or account administrators can delete comments.
Promise that resolves to true when deletion is successful
// Delete a comment
const success = await service.incidents.deleteComment(12345, 67890);
if (success) {
console.log('Comment deleted successfully');
}
https://uptimerobot.com/api/v3/#delete-/incidents/-id-/comments/-commentId- Official API Documentation
Fetches complete information about an individual incident by ID, including start/end times, duration, affected monitor, status changes, and resolution details.
Incident ID (number or string)
Promise that resolves to the Incident object
// Get incident details
const incident = await service.incidents.get(12345);
console.log(`Incident lasted ${incident.duration} seconds`);
console.log(`Status: ${incident.status}`);
https://uptimerobot.com/api/v3/#get-/incidents/-id- Official API Documentation
Retrieves a list of incidents (downtime events) from your UptimeRobot account. You can filter by monitor, date range, or search by monitor name. Results are paginated using cursor-based pagination.
Optionalfilter: {Query string parameters passed to the API
Optionalcursor?: numberPagination cursor for next page
Optionalmonitor_id?: numberFilter by specific monitor ID
Optionalmonitor_name?: stringSearch incidents by monitor name (partial match)
Optionalstarted_after?: stringFilter incidents that started after this date (ISO 8601 format)
Optionalstarted_before?: stringFilter incidents that started before this date (ISO 8601 format)
OptionalreturnFullResponse: falseReturns Incident[] by default, or URFullResponse<Incident> if returnFullResponse is true.
// Get all incidents
const incidents = await service.incidents.list();
// Filter by monitor and date range
const recentIncidents = await service.incidents.list({
monitor_id: 12345,
started_after: '2023-10-01T00:00:00Z',
started_before: '2023-10-31T23:59:59Z'
});
// Paginate through results
const page1 = await service.incidents.list();
const page2 = await service.incidents.list({ cursor: 123456789 });
// Get full response for pagination
const response = await service.incidents.list({ monitor_name: 'cool-monitor' }, true);
const nextUrl = new URL(response.nextLink);
const nextCursorVal = nextUrl.searchParams.get('cursor');
console.log(nextCursorVal);
https://uptimerobot.com/api/v3/#get-/incidents Official API Documentation
Retrieves a list of incidents (downtime events) from your UptimeRobot account. You can filter by monitor, date range, or search by monitor name. Results are paginated using cursor-based pagination.
Query string parameters passed to the API
Optionalcursor?: numberPagination cursor for next page
Optionalmonitor_id?: numberFilter by specific monitor ID
Optionalmonitor_name?: stringSearch incidents by monitor name (partial match)
Optionalstarted_after?: stringFilter incidents that started after this date (ISO 8601 format)
Optionalstarted_before?: stringFilter incidents that started before this date (ISO 8601 format)
Returns Incident[] by default, or URFullResponse<Incident> if returnFullResponse is true.
// Get all incidents
const incidents = await service.incidents.list();
// Filter by monitor and date range
const recentIncidents = await service.incidents.list({
monitor_id: 12345,
started_after: '2023-10-01T00:00:00Z',
started_before: '2023-10-31T23:59:59Z'
});
// Paginate through results
const page1 = await service.incidents.list();
const page2 = await service.incidents.list({ cursor: 123456789 });
// Get full response for pagination
const response = await service.incidents.list({ monitor_name: 'cool-monitor' }, true);
const nextUrl = new URL(response.nextLink);
const nextCursorVal = nextUrl.searchParams.get('cursor');
console.log(nextCursorVal);
https://uptimerobot.com/api/v3/#get-/incidents Official API Documentation
Fetches all comments posted on an incident, useful for tracking incident communication and updates. Results are paginated and can be limited.
Incident ID (string)
Optionalfilter: { cursor?: number; limit?: number }Optional pagination and limit parameters
Optionalcursor?: numberPagination cursor for next page
Optionallimit?: numberMaximum number of comments to return (minimum 1)
OptionalreturnFullResponse: falseReturns IncidentComment[] by default, or URFullResponse<IncidentComment> if returnFullResponse is true.
// Get all comments for an incident
const comments = await service.incidents.listComments('incident_123');
// Get limited number of comments
const recentComments = await service.incidents.listComments('incident_123', {
limit: 10
});
// Paginate through results
const page1 = await service.incidents.listComments('incident_123');
const page2 = await service.incidents.listComments('incident_123', { cursor: 123456789 });
// Get full response for pagination
const response = await service.incidents.listComments('incident_123', { limit: 50 }, true);
const nextUrl = new URL(response.nextLink);
const nextCursorVal = nextUrl.searchParams.get('cursor');
console.log(nextCursorVal);
https://uptimerobot.com/api/v3/#get-/incidents/-id-/comments Official API Documentation
Fetches all comments posted on an incident, useful for tracking incident communication and updates. Results are paginated and can be limited.
Incident ID (string)
Optional pagination and limit parameters
Optionalcursor?: numberPagination cursor for next page
Optionallimit?: numberMaximum number of comments to return (minimum 1)
Returns IncidentComment[] by default, or URFullResponse<IncidentComment> if returnFullResponse is true.
// Get all comments for an incident
const comments = await service.incidents.listComments('incident_123');
// Get limited number of comments
const recentComments = await service.incidents.listComments('incident_123', {
limit: 10
});
// Paginate through results
const page1 = await service.incidents.listComments('incident_123');
const page2 = await service.incidents.listComments('incident_123', { cursor: 123456789 });
// Get full response for pagination
const response = await service.incidents.listComments('incident_123', { limit: 50 }, true);
const nextUrl = new URL(response.nextLink);
const nextCursorVal = nextUrl.searchParams.get('cursor');
console.log(nextCursorVal);
https://uptimerobot.com/api/v3/#get-/incidents/-id-/comments Official API Documentation
Fetches information about all alerts (email, SMS, webhook, etc.) that were sent during an incident, including delivery status and timestamps.
Incident ID (number or string)
Promise that resolves to the IncidentAlerts object
// Get incident alert history
const alerts = await service.incidents.sentAlerts(12345);
console.log(`${alerts.totalSent} alerts sent during incident`);
alerts.sentAlerts.forEach(alert => {
console.log(`${alert.type}: ${alert.status} at ${alert.sentAt}`);
});
https://uptimerobot.com/api/v3/#get-/incidents/-id-/alerts Official API Documentation
Modifies the content of an existing incident comment. Only the comment author or account administrators can update comments. Changes are logged with timestamps.
Incident ID (number or string)
Comment ID (number or string)
Updated comment data (partial IncidentCommentPayload object)
Promise that resolves to the updated IncidentComment object
// Update a comment message
const updatedComment = await service.incidents.updateComment(12345, 67890, {
content: 'Updated: Root cause identified as database connection timeout',
});
https://uptimerobot.com/api/v3/#patch-/incidents/-id-/comments/-commentId- Official API Documentation
Creates a new Incidents client.
The request client to use.
Client for the Incidents API.
See
https://uptimerobot.com/api/v3 Official API Documentation
Since
1.0.0