uptime-robot-v3
v1.0.1
Published
TypeScript / Node.js client for the Uptime Robot REST API v3.
Maintainers
Readme
uptime-robot-v3
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()).
Install
npm install uptime-robot-v3Dependencies: HTTP via axios, multipart via form-data, and image-size for validating PSP logo/icon files on disk.
Quick start
import { UptimeRobotService } from 'uptime-robot-v3';
const service = new UptimeRobotService({ apiKey: process.env.UPTIMEROBOT_API_KEY! });
const monitors = await service.monitors.list();Types
Public API types are exported from the package root:
import type { Monitor, Config, MonitorPayload } from 'uptime-robot-v3';Optional diagnostic logging
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);
},
});Tools and utilities
service.tools—UptimeRobotTools(e.g.buildUtcCalendarDayRangesfor uptime stats date ranges).RequestTracker— module-level counter incremented once per HTTP call fromRequestClient(JSON and multipart). It is not thread-isolated; callRequestTracker.reset()in tests or between jobs if you rely on the count.executeInBatches— batch async work with optional progress logging and retries (see JSDoc).
Node-only: PSP images
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.
Documentation
- Package API reference (TypeDoc on GitHub Pages): https://sethbr11.github.io/uptime-robot-v3/
- Uptime Robot REST API v3 (official): https://uptimerobot.com/api/v3
