JavaScript SDK

JavaScript SDK

Needs updating

A JavaScript SDK to easily interact with the Oh Dear API from your Node.js or browser applications.

The JavaScript SDK provides a convenient way to interact with the Oh Dear API from Node.js applications. Built and maintained by the community, it offers full access to Oh Dear's monitoring capabilities.

Installation #

npm install ohdear-js-sdk

Features #

The SDK supports all major Oh Dear API operations:

Usage #

import OhDear from 'ohdear-js-sdk'

const ohdear = new OhDear('your-api-token')

// Get all sites
const sites = await ohdear.sites()

// Get uptime data
const uptime = await ohdear.uptime(siteId, startDate, endDate, 'day')

// Check SSL certificate health
const cert = await ohdear.certificateHealth(siteId)

For more details, see the GitHub repository.