Introduction

The Oh Dear! API lets you configure everything about our application through a simple, structured Application Programming Interface (API).

Everything you see in the sites overview, can be controlled with the API. And as a bonus, all changes you make with the API will be visible in realtime on our site.

Let's help get you started.

  1. Learn about authentication and generate your first API key
  2. Configure your sites and their checks with the API.
  3. Watch those monitoring alerts fly!

Optionally, we provide a PHP SDK package to help get you started.

API endpoints

All Oh Dear! API endpoints are located at https://ohdearapp.com/api. From there on, you will find a logical structure that adheres to the REST standards.

Here's a quick summary of the API methods.

  • GET: all GET requests are for data retrieval only (site listing, account info, ...) and will never modify any data.
  • POST: a POST method will add new sites or checks to Oh Dear!
  • DELETE: the DELETE method, well you guessed it, is used to delete certain sites or checks from your account.
  • PUT: this method is used to update information on existing sites, checks or your account.

In general, GET requests can be performed as many times as you'd like, all other methods actually transform data in your account and will cause changes to take effect.

Response data

We love JSON and hope you do too. All responses from the Oh Dear! API will be formatted as JSON. Here's an example payload of the /api/sites endpoint, that lists all sites.

{
  "data": [
    {
      "id": 1,
      "url": "https://yoursite.tld",
      ...
    },
    {
      "id": 2,
      "url": "https://yourothersite.tld",
      ...
    }
  ]
}

Each endpoint will return specific data for that request. More info on that in the sites and checks pages.