betteruptime.js
Unofficial API wrapper for BetterStack's Uptime API.
Built with TypeScript, strongly typed* and JSDoc'd. Documentation
* = This project is still work-in-progress, and some APIs are not fully typed yet. See more in the API Support section.
Installation
Install the package (betteruptime
) with your favourite package manager:
bun install betteruptime.js
npm install betteruptime.js
API Support
Currently most APIs are not typed, please consult the API documentation for the time being.
Partly or fully untyped APIs are marked with a *
.
Monitors API
On-call & Incidents API
Status pages API
Other API
Integrations API (low priority)
Getting started
const uptime = new BetterUptime("your-api-key");
const monitor = await api.monitors.create({
monitor_type: "status",
url: "https://google.com",
});
console.log(monitor);
await monitor.pause();
monitor.attributes.regions = ["eu"];
await monitor.save();
const monitors = await api.monitors.getAll();
console.log(monitors);