uptime-robot-v3
    Preparing search index...

    uptime-robot-v3

    uptime-robot-v3

    npm CI license node TypeScript

    Community-maintained TypeScript client for the Uptime Robot REST API v3. The API surface follows the official docs; this package is not affiliated with, endorsed by, or supported by UptimeRobot.

    Resource methods live on UptimeRobotService (monitors, public status pages, maintenance windows, and more). The repo runs tests and a production build on every push via GitHub Actions.

    Runtime: Node.js 18+ (ESM only: import / import()).

    npm install uptime-robot-v3
    

    Dependencies: HTTP via axios, multipart via form-data, and image-size for validating PSP logo/icon files on disk.

    import { UptimeRobotService } from 'uptime-robot-v3';

    const service = new UptimeRobotService({ apiKey: process.env.UPTIMEROBOT_API_KEY! });

    const monitors = await service.monitors.list();

    Public API types are exported from the package root:

    import type { Monitor, Config, MonitorPayload } from 'uptime-robot-v3';
    

    By default the client does not write to console. Pass a logger on Config to record API failures or retry-related messages from helpers like executeInBatches:

    const service = new UptimeRobotService({
    apiKey: '...',
    logger: (message, level) => {
    if (level === 'error') console.error(message);
    else console.warn(message);
    },
    });
    • service.toolsUptimeRobotTools (e.g. buildUtcCalendarDayRanges for uptime stats date ranges).
    • RequestTracker — module-level counter incremented once per HTTP call from RequestClient (JSON and multipart). It is not thread-isolated; call RequestTracker.reset() in tests or between jobs if you rely on the count.
    • executeInBatches — batch async work with optional progress logging and retries (see JSDoc).

    Methods that accept PSP logo / icon paths read the file with Node fs and validate size and dimensions. That path is intended for Node scripts, not browsers.

    ISC