uptime-robot-v3
    Preparing search index...

    Client for the Incidents API.

    https://uptimerobot.com/api/v3 Official API Documentation

    1.0.0

    Index

    Incidents

    • Fetches a chronological log of all activities and status changes related to an incident, including when it started, escalated, was acknowledged, and resolved.

      Parameters

      • id: idField

        Incident ID (number or string)

      Returns Promise<IncidentActivityLog>

      Promise that resolves to the IncidentActivityLog object

      When incident ID is not found

      When API request fails

      // Get incident activity log
      const activityLog = await service.incidents.activityLog(12345);
      activityLog.activities.forEach(activity => {
      console.log(`${activity.timestamp}: ${activity.action}`);
      });

      1.0.0

    • Adds a comment to an existing incident for documentation or communication purposes. Comments help track incident resolution progress and team communication.

      Parameters

      Returns Promise<boolean>

      Promise that resolves to true when comment is created successfully

      When incident ID is not found

      When payload validation fails

      When API request fails

      // Add a comment to an incident
      const success = await service.incidents.createComment(12345, {
      content: 'Investigating the root cause of this outage',
      });

      1.0.0

    • Removes a specific comment from an incident. This action cannot be undone. Only the comment author or account administrators can delete comments.

      Parameters

      • id: idField

        Incident ID (number or string)

      • commentId: idField

        Comment ID (number or string)

      Returns Promise<boolean>

      Promise that resolves to true when deletion is successful

      When incident or comment ID is not found

      When user lacks permission to delete the comment

      When API request fails

      // Delete a comment
      const success = await service.incidents.deleteComment(12345, 67890);
      if (success) {
      console.log('Comment deleted successfully');
      }

      1.0.0

    • Fetches complete information about an individual incident by ID, including start/end times, duration, affected monitor, status changes, and resolution details.

      Parameters

      • id: idField

        Incident ID (number or string)

      Returns Promise<Incident>

      Promise that resolves to the Incident object

      When incident ID is not found

      When API request fails

      // Get incident details
      const incident = await service.incidents.get(12345);
      console.log(`Incident lasted ${incident.duration} seconds`);
      console.log(`Status: ${incident.status}`);

      1.0.0

    • 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.

      Parameters

      • Optionalfilter: {
            cursor?: number;
            monitor_id?: number;
            monitor_name?: string;
            started_after?: string;
            started_before?: string;
        }

        Query string parameters passed to the API

        • Optionalcursor?: number

          Pagination cursor for next page

        • Optionalmonitor_id?: number

          Filter by specific monitor ID

        • Optionalmonitor_name?: string

          Search incidents by monitor name (partial match)

        • Optionalstarted_after?: string

          Filter incidents that started after this date (ISO 8601 format)

        • Optionalstarted_before?: string

          Filter incidents that started before this date (ISO 8601 format)

      • OptionalreturnFullResponse: false

      Returns Promise<Incident[]>

      Returns Incident[] by default, or URFullResponse<Incident> if returnFullResponse is true.

      When cursor is negative

      When monitor_id is negative

      When date format is invalid

      When started_after is greater than started_before

      // 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

      1.0.0

    • 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.

      Parameters

      • filter: {
            cursor?: number;
            monitor_id?: number;
            monitor_name?: string;
            started_after?: string;
            started_before?: string;
        }

        Query string parameters passed to the API

        • Optionalcursor?: number

          Pagination cursor for next page

        • Optionalmonitor_id?: number

          Filter by specific monitor ID

        • Optionalmonitor_name?: string

          Search incidents by monitor name (partial match)

        • Optionalstarted_after?: string

          Filter incidents that started after this date (ISO 8601 format)

        • Optionalstarted_before?: string

          Filter incidents that started before this date (ISO 8601 format)

      • returnFullResponse: true

      Returns Promise<URFullResponse<Incident>>

      Returns Incident[] by default, or URFullResponse<Incident> if returnFullResponse is true.

      When cursor is negative

      When monitor_id is negative

      When date format is invalid

      When started_after is greater than started_before

      // 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

      1.0.0

    • Fetches all comments posted on an incident, useful for tracking incident communication and updates. Results are paginated and can be limited.

      Parameters

      • id: string

        Incident ID (string)

      • Optionalfilter: { cursor?: number; limit?: number }

        Optional pagination and limit parameters

        • Optionalcursor?: number

          Pagination cursor for next page

        • Optionallimit?: number

          Maximum number of comments to return (minimum 1)

      • OptionalreturnFullResponse: false

      Returns Promise<IncidentComment[]>

      Returns IncidentComment[] by default, or URFullResponse<IncidentComment> if returnFullResponse is true.

      When cursor is negative

      When limit is less than 1

      // 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);

      1.0.0

    • Fetches all comments posted on an incident, useful for tracking incident communication and updates. Results are paginated and can be limited.

      Parameters

      • id: string

        Incident ID (string)

      • filter: { cursor?: number; limit?: number }

        Optional pagination and limit parameters

        • Optionalcursor?: number

          Pagination cursor for next page

        • Optionallimit?: number

          Maximum number of comments to return (minimum 1)

      • returnFullResponse: true

      Returns Promise<URFullResponse<IncidentComment>>

      Returns IncidentComment[] by default, or URFullResponse<IncidentComment> if returnFullResponse is true.

      When cursor is negative

      When limit is less than 1

      // 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);

      1.0.0

    • Fetches information about all alerts (email, SMS, webhook, etc.) that were sent during an incident, including delivery status and timestamps.

      Parameters

      • id: idField

        Incident ID (number or string)

      Returns Promise<IncidentAlerts>

      Promise that resolves to the IncidentAlerts object

      When incident ID is not found

      When API request fails

      // 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}`);
      });

      1.0.0

    • Modifies the content of an existing incident comment. Only the comment author or account administrators can update comments. Changes are logged with timestamps.

      Parameters

      • id: idField

        Incident ID (number or string)

      • commentId: idField

        Comment ID (number or string)

      • payload: IncidentCommentPayload

        Updated comment data (partial IncidentCommentPayload object)

      Returns Promise<IncidentComment>

      Promise that resolves to the updated IncidentComment object

      When incident or comment ID is not found

      When payload validation fails

      When user lacks permission to update the comment

      // Update a comment message
      const updatedComment = await service.incidents.updateComment(12345, 67890, {
      content: 'Updated: Root cause identified as database connection timeout',
      });

      1.0.0

    Other