uptime-robot-v3
    Preparing search index...

    Client for the Monitors API.

    Bulk operations on a monitor group are on Monitors.bulk.

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

    1.0.0

    Index

    Monitors

    • Creates a new monitoring endpoint in your UptimeRobot account. The monitor will begin checking immediately after creation. Supports HTTP, KEYWORD, PING, PORT, HEARTBEAT, DNS, and API monitor types.

      Parameters

      • payload: MonitorPayload

        Monitor configuration object (see MonitorPayload interface for all options)

      Returns Promise<Monitor>

      Promise that resolves to the created Monitor object with assigned ID

      When required fields are missing or validation fails

      When conditional requirements are not met (e.g., PORT monitor without port number)

      When API request fails or returns an error response

      // Create a basic HTTP monitor
      const httpMonitor = await service.monitors.create({
      friendlyName: 'My Website',
      url: 'https://example.com',
      type: 'HTTP',
      interval: 300,
      httpMethodType: 'HEAD'
      });

      https://uptimerobot.com/api/v3/#post-/monitors Official API Documentation

      1.0.0

    • Removes a monitor completely from your UptimeRobot account. This action cannot be undone. All historical data and statistics for the monitor will be lost.

      Parameters

      • id: idField

        Monitor ID (number or string)

      Returns Promise<boolean>

      Promise that resolves to true when deletion is successful

      When monitor ID is not found

      When API request fails

      // Delete a monitor
      const success = await service.monitors.delete(12345);
      if (success) {
      console.log('Monitor deleted successfully');
      }

      1.0.0

    • Fetches complete configuration and current status information for an individual monitor by ID. Returns all monitor properties including type, URL, intervals, and current status.

      Parameters

      • id: idField

        Monitor ID (number or string)

      Returns Promise<Monitor>

      Promise that resolves to the Monitor object

      When monitor ID is not found

      When API request fails

      // Get monitor details
      const monitor = await service.monitors.get(12345);
      console.log(`Monitor "${monitor.friendlyName}" is ${monitor.status}`);

      1.0.0

    • Fetches comprehensive uptime statistics for your account within a specified time frame. Supports predefined periods (DAY, WEEK, MONTH, etc.) or custom date ranges. Includes overall uptime percentage and optional detailed logs.

      Parameters

      • timeFrame: string = 'DAY'

        Time period for statistics ('DAY', 'WEEK', 'MONTH', 'DAYS_30', 'YEAR', 'ALL', 'CUSTOM')

      • Optionalfilter: { end?: number; logLimit?: number; start?: number }

        Optional parameters for customizing the response

        • Optionalend?: number

          End timestamp for CUSTOM timeFrame (Unix timestamp)

        • OptionallogLimit?: number

          Maximum number of log entries to return

        • Optionalstart?: number

          Start timestamp for CUSTOM timeFrame (Unix timestamp)

      Returns Promise<AggUptimeStats>

      Promise that resolves to aggregated uptime statistics

      When timeFrame is not a valid option

      When using CUSTOM timeFrame without start/end timestamps

      When start timestamp is greater than end timestamp

      When logLimit is negative

      // Get daily statistics
      const dailyStats = await service.monitors.getAggregatedUptimeStatistics('DAY');

      // Get custom range with limited logs
      const customStats = await service.monitors.getAggregatedUptimeStatistics('CUSTOM', {
      start: 1698400000,
      end: 1698486400,
      logLimit: 100
      });

      1.0.0

    • Retrieves all monitors from the account by automatically handling cursor-based pagination.

      This method repeatedly calls the API until all pages are retrieved. Useful for synchronization tasks where the complete state is required.

      Parameters

      • limit: number = 50

        Page size for each API request when paginating (max 200). Defaults to 50.

      Returns Promise<Monitor[]>

      All monitors across every page.

      const allMonitors = await service.monitors.getFullList();
      console.log(`Fetched ${allMonitors.length} monitors`);
    • Fetches detailed response time metrics for an individual monitor within an optional date range. Returns average, minimum, and maximum response times, with optional time series data for graphing.

      Parameters

      • id: idField

        Monitor ID (number or string)

      • Optionalfilter: {
            from?: string;
            includeTimeSeries?: boolean;
            region?: ResponseTimeRegionFilter;
            to?: string;
        }

        Optional parameters for customizing the response

        • Optionalfrom?: string

          Start date in ISO 8601 format (e.g., '2023-10-27T10:00:00Z')

        • OptionalincludeTimeSeries?: boolean

          Whether to include detailed time series data

        • Optionalregion?: ResponseTimeRegionFilter

          Optional region code (na, eu, as, oc) or all per API; omit for default aggregation

        • Optionalto?: string

          End date in ISO 8601 format (e.g., '2023-10-28T10:00:00Z')

      Returns Promise<MonitorResponseStats>

      Promise that resolves to monitor response time statistics

      When 'from' or 'to' date format is invalid, range is invalid, span exceeds 90 days, or region is not allowed

      // Get basic response time stats
      const stats = await service.monitors.getResponseTimeStatistics(12345);

      // Get detailed stats with time series for charting
      const detailedStats = await service.monitors.getResponseTimeStatistics(12345, {
      from: '2023-10-01T00:00:00Z',
      to: '2023-10-31T23:59:59Z',
      includeTimeSeries: true
      });

      1.0.0

    • Fetches response time metrics for a monitor by region (NA, EU, AS, OC) plus an all aggregate, for an optional date range. Defaults to the last 24 hours; maximum range is 90 days. Optionally includes time series per region block.

      Parameters

      • id: idField

        Monitor ID (number or string)

      • Optionalfilter: { from?: string; includeTimeSeries?: boolean; to?: string }

        Optional from / to (ISO 8601) and includeTimeSeries

      Returns Promise<MonitorResponseStatsByRegion>

    • Fetches detailed uptime statistics for an individual monitor within an optional date range. Returns uptime percentage, total checks, and downtime incidents for the specified period.

      Parameters

      • id: idField

        Monitor ID (number or string)

      • Optionalfilter: { from?: string; to?: string }

        Optional date range parameters

        • Optionalfrom?: string

          Start date in ISO 8601 format (e.g., '2023-10-27T10:00:00Z')

        • Optionalto?: string

          End date in ISO 8601 format (e.g., '2023-10-28T10:00:00Z')

      Returns Promise<MonitorUptimeStats>

      Promise that resolves to monitor uptime statistics

      When 'from' or 'to' date format is invalid

      When 'from' date is after 'to' date

      // Get all-time uptime for monitor
      const stats = await service.monitors.getUptimeStatistics(12345);

      // Get uptime for specific date range
      const rangeStats = await service.monitors.getUptimeStatistics(12345, {
      from: '2023-10-01T00:00:00Z',
      to: '2023-10-31T23:59:59Z'
      });

      1.0.0

    • Retrieves a list of monitors from your UptimeRobot account. You can optionally filter by status, group, or search by name/URL. Results are paginated using cursor-based pagination.

      Parameters

      • Optionalfilter: {
            cursor?: number;
            groupId?: number;
            limit?: number;
            name?: string;
            status?: string;
            tags?: string;
            url?: string;
        }

        Query string parameters passed to the API

        • Optionalcursor?: number

          Pagination cursor for next page

        • OptionalgroupId?: number

          Filter by monitor group ID

        • Optionallimit?: number

          Number of monitors to return (1-50, default: 50)

        • Optionalname?: string

          Search monitors by friendly name (partial match)

        • Optionalstatus?: string

          Filter by status ('UP', 'DOWN', 'PAUSED', etc.)

        • Optionaltags?: string

          Filter by tag names (comma-separated)

        • Optionalurl?: string

          Search monitors by URL (partial match)

      • OptionalreturnFullResponse: false

        If true, returns the full API response object (including pagination metadata). If false or omitted, returns just the array of Monitors.

      Returns Promise<Monitor[]>

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

      When limit is less than 1 or cursor is negative

      // Get first 10 monitors
      const monitors = await service.monitors.list({ limit: 10 });

      // Filter by status
      const downMonitors = await service.monitors.list({ status: 'DOWN' });

      // Search by name
      const apiMonitors = await service.monitors.list({ name: 'API' });

      // Paginate through results
      const page1 = await service.monitors.list({ limit: 10 });
      const page2 = await service.monitors.list({ limit: 10, cursor: 123456789 });

      // Get full response for pagination
      const response = await service.monitors.list({ limit: 50 }, true);
      const nextUrl = new URL(response.nextLink);
      const nextCursorVal = nextUrl.searchParams.get('cursor');
      console.log(nextCursorVal);

      https://uptimerobot.com/api/v3/#get-/monitors Official API Documentation

      1.0.0

    • Retrieves a list of monitors from your UptimeRobot account. You can optionally filter by status, group, or search by name/URL. Results are paginated using cursor-based pagination.

      Parameters

      • filter: {
            cursor?: number;
            groupId?: number;
            limit?: number;
            name?: string;
            status?: string;
            tags?: string;
            url?: string;
        }

        Query string parameters passed to the API

        • Optionalcursor?: number

          Pagination cursor for next page

        • OptionalgroupId?: number

          Filter by monitor group ID

        • Optionallimit?: number

          Number of monitors to return (1-50, default: 50)

        • Optionalname?: string

          Search monitors by friendly name (partial match)

        • Optionalstatus?: string

          Filter by status ('UP', 'DOWN', 'PAUSED', etc.)

        • Optionaltags?: string

          Filter by tag names (comma-separated)

        • Optionalurl?: string

          Search monitors by URL (partial match)

      • returnFullResponse: true

        If true, returns the full API response object (including pagination metadata). If false or omitted, returns just the array of Monitors.

      Returns Promise<URFullResponse<Monitor>>

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

      When limit is less than 1 or cursor is negative

      // Get first 10 monitors
      const monitors = await service.monitors.list({ limit: 10 });

      // Filter by status
      const downMonitors = await service.monitors.list({ status: 'DOWN' });

      // Search by name
      const apiMonitors = await service.monitors.list({ name: 'API' });

      // Paginate through results
      const page1 = await service.monitors.list({ limit: 10 });
      const page2 = await service.monitors.list({ limit: 10, cursor: 123456789 });

      // Get full response for pagination
      const response = await service.monitors.list({ limit: 50 }, true);
      const nextUrl = new URL(response.nextLink);
      const nextCursorVal = nextUrl.searchParams.get('cursor');
      console.log(nextCursorVal);

      https://uptimerobot.com/api/v3/#get-/monitors Official API Documentation

      1.0.0

    • Temporarily stops monitoring checks for the specified monitor without deleting it. The monitor can be resumed later using Monitors.start. Useful for maintenance windows or temporary service shutdowns.

      Parameters

      • id: idField

        Monitor ID (number or string)

      Returns Promise<Monitor>

      Promise that resolves to the updated Monitor object with paused status

      When monitor ID is not found

      When monitor is already paused

      When API request fails

      // Pause a monitor during maintenance
      const pausedMonitor = await service.monitors.pause(12345);
      console.log(`Monitor status: ${pausedMonitor.status}`);

      1.0.0

    • Clears all historical data, statistics, and logs for the specified monitor while keeping the monitor configuration intact. The monitor continues running but starts fresh with no historical data.

      Parameters

      • id: idField

        Monitor ID (number or string)

      Returns Promise<boolean>

      Promise that resolves to true when reset is successful

      When monitor ID is not found

      When API request fails

      // Reset monitor statistics
      const success = await service.monitors.reset(12345);
      if (success) {
      console.log('Monitor statistics reset successfully');
      }

      1.0.0

    • Starts monitoring checks for a previously paused monitor. The monitor will immediately begin checking according to its configured interval and settings.

      Parameters

      • id: idField

        Monitor ID (number or string)

      Returns Promise<Monitor>

      Promise that resolves to the updated Monitor object with active status

      When monitor ID is not found

      When monitor is already running

      When API request fails

      // Resume a paused monitor
      const activeMonitor = await service.monitors.start(12345);
      console.log(`Monitor status: ${activeMonitor.status}`);

      1.0.0

    • Modifies the settings of an existing monitor. Only provided fields will be updated; omitted fields retain their current values. The monitor continues running with the new configuration immediately.

      Parameters

      • id: idField

        Monitor ID (number or string)

      • payload: MonitorPayload

        Monitor configuration updates (partial MonitorPayload object)

      Returns Promise<Monitor>

      Promise that resolves to the updated Monitor object

      When monitor ID is not found

      When payload validation fails

      When conditional requirements are not met

      // Update monitor interval and friendly name
      const updatedMonitor = await service.monitors.update(12345, {
      friendlyName: 'Updated Website Name',
      interval: 600
      });

      1.0.0

    Other