Follow

The Pingdom API

The API has its own documentation page as well.

In this article are we going to get a list of your checks through the API, this is done with a GET request to the URL https://api.pingdom.com/api/3.1/.

cURL is a tool used to make HTTP requests from a command line interface. It is good if you understand the basics of your command line interface before we begin and it is also a plus to know how cURL works.

The way you authenticate yourself, your script or your program is via an extra HTTP header named authorization, the type used is called bearer token, this is part of the OAuth 2.0 standard, when making requests to the API. You can not use your email address and password to authenticate to this version of the API, you can read about the older one further down in this document.

The token can be generated from inside My Pingdom under Integrations > The Pingdom API in the menu on the left. You can view this token as a special password for your application or script, we recommend that you issue a new token for each application that you write, and name them accordingly, for security reasons.

This is an example of a URL for the API from which you can get a list of your checks: https://api.pingdom.com/api/3.1/checks

You can use this URL and your token with cURL like this:

$ curl -H "authorization: bearer <TOKEN>" https://api.pingdom.com/api/3.1/checks

Where you replace <TOKEN> with your generated token.

The response could look like this:

{
"checks": [
{
"acktimeout": 0,
"alert_policy": 13931,
"alert_policy_name": "Critical",
"autoresolve": 0,
"created": 331316400,
"hostname": "pingdom.com",
"id": 1,
"lasterrortime": 489082800,
"lastresponsetime": 384,
"lasttesttime": 946684620,
"name": "Pingdom frontpage",
"resolution": 1,
"status": "up",
"type": "http",
"use_legacy_notifications": false
},
],
"counts": {
"filtered": 1,
"limited": 1,
"total": 1,
}
}

These are instructions for API version 2.1

Certain services such as statuspage.io require you to create an APP-Key in the 2.1 API, you can access the page in my Pingdom via this link https://my.pingdom.com/account/appkeys for the time being.

The API has its own documentation page as well here.

In this article are we going to get a list of your checks through the API, this is done with a GET request to the host api.pingdom.com.

cURL is a tool used to make HTTP requests from a command line interface. It is good if you understand the basics of your command line interface before we begin and it is also a plus to know how cURL works.

We need to generate a App-Key to identify your application. This is done from under Integrations > The Pingdom API in My Pingdom. The key looks something like this: zoent8w9cbt810dagobah23vcxb87zrt5541.

To authenticate yourself to our servers you use the same username and password as you use to log in to My Pingdom.

This is what the URL looks like that we are getting the check list from: https://api.pingdom.com/api/2.1/checks

This is whet the request looks like:

$ curl -u <username>:<password> -H "app-key: <app-key>" https://api.pingdom.com/api/2.0/checks

Where you replace <username> with your username, <password> with your password and <app-key> with your app key.

If you wish to manipulate an account where you are invited to you add a "account-email: <email>" header, where the email is the email of the account you wish to manipulate.

The response should look like this:

{
"checks": [
{
"acktimeout": 0,
"alert_policy": 13931,
"alert_policy_name": "Critical",
"autoresolve": 0,
"created": 331316400,
"hostname": "pingdom.com",
"id": 1,
"lasterrortime": 489082800,
"lastresponsetime": 384,
"lasttesttime": 946684620,
"name": "Pingdom frontpage",
"resolution": 1,
"status": "up",
"type": "http",
"use_legacy_notifications": false
},
],
"counts": {
"filtered": 1,
"limited": 1,
"total": 1,
}
}
Was this article helpful?
3 out of 24 found this helpful
Powered by Zendesk