Introducing NodePing’s Monitoring API

This is Part 1 in a series of posts we’ll have in the coming weeks detailing various aspects of NodePing’s new API. The API allows customers to manage most aspects of their site and server monitoring through an HTTP accessible RESTful interface. It provides list, read, write, and delete functionality for subaccounts, contacts, contact groups, and checks, as well as allowing you to retrieve checks and notifications. Access to the API is included in our service at no extra cost.

The API supports HTTP methods for most calls:

  • GET for listing or retrieving specific records,
  • PUT to update a record based on its ID,
  • POST to create new records (IDs are assigned automatically), and
  • DELETE to delete records.

All responses are JSON.

The API’s authentication is token based. You can find your token in the Account Settings area of your account, or if you’re logged in to the service it is also displayed on the Documentation page.

Documentation is available at https://nodeping.com/API_Documentation. Reference docs showing all supported calls are at https://nodeping.com/API_Reference.

Here’s an example of updating a monitoring check:
curl -X PUT -d'json={"threshold":4, "target":"http://www.example.com/index.html", "enable":"true", "notifications":[{"SKTUSP":"Days"}]}' 'https://api.nodeping.com/api/1/checks/201205050153W2Q4C-1FOC0YYM'

The response to that call would look something like this:

{
  "_id": "201205050153W2Q4C-1FOC0YYM",
  "_rev": "4-5069940f2a95fc6ae5564e329da755bd",
  "customer_id": "201205050153W2Q4C",
  "label": "Site 2",
  "interval": 1,
  "notifications": [ { "SKTUSP": "Days" } ],
  "type": "HTTP",
  "status": "modified",
  "modified": 1337744587374,
  "enable": "active",
  "public": false,
  "parameters": {
    "target": "http://www.example.com/index.html",
    "threshold": 4,
    "sens": "2"
  }
}

Since the API is brand new, we would really like to hear from people who start using it in real situations. Please let us know what works well, and what we could do to make interacting with the API easier.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: