Recipes for automating Oh Dear

Published on July 7, 2025 by Sean White

Today we are releasing oh-dear-api-examples a brand-new open-source repository on GitHub. It curates bite-size scripts, helpers and ideas for helping you bulk-manage your Oh Dear account via the API.

https://github.com/ohdearapp/oh-dear-api-examples

How it works

Installation in under a minute just following the README.md or:

git clone https://github.com/ohdearapp/oh-dear-api-examples.git
cd oh-dear-api-examples
cp .env.example .env
npm install

Just clone → npm install → start interacting with your account. This repository is a cookbook not a full SDK. It was created in JavaScript as it's easy to use, reference and port to another language. Copy a function, tweak it, add it to your workflows as needed :)

You will find a few different files

  • ./examples.js: composable functions (create_site_from_existing, sync_status_pages_with_tagged_sites, generateReportSnapshot, …) you can import or run directly
  • report.js: exposes a generateReportSnapshot function that returns a full site report for the month (up to the current day) - useful when recreating Oh Dear's monthly PDF reports
  • cache/: responses are persisted locally so repeated runs are fast and you can inspect the raw JSON response when debugging
  • ohdear.js: a thin wrapper around fetch to interact with the API
  • .env: add you Oh Dear API key here (OH_DEAR_API_KEY=…)

Let us know if you have any other use-cases, problems or automation suggestions. This could either be a product/service update or an addition to this repo. Just let us know!

Did you know?

We have an official Php SDK Oh Dear CLI - https://ohdear.app/docs/integrations/our-cli-tool And more 3rd party integrations: https://ohdear.app/docs/integrations/3rd-party-integrations-of-oh-dear

Need more?

Leave an issue in the repo or contact support for suggestions or more information. We look forward to helping you navigate real world use cases when using Oh Dear API to manage you team and client monitoring.

Start using Oh Dear today!

  • Access to all features
  • Cancel anytime
  • No credit card required
  • First 30 days free

More updates

Want to get started? We offer a no-strings-attached 30 day trial. No credit card required.

Start monitoring

You're all set in
less than a minute!