Pingdom Public API (3.1)

Download OpenAPI specification:Download

Welcome to the Pingdom API!

The Pingdom API is a way for you to automate your interaction with the Pingdom system. With the API, you can create your own scripts or applications with most of the functionality you can find inside the Pingdom control panel.

The Pingdom API is RESTful and HTTP-based. Basically, this means that the communication is made through normal HTTP requests.

Authentication

Authentication is needed in order to use the Pingdom API, and for this a Pingdom API Token is required. You generate your Pingdom API Token inside My Pingdom. The Pingdom API Token has a property called “Access level” to define its permissions. All operations that create or modify something (e.g. checks) need the Read/Write permission. If you only need to read data using the API token, we recommend to set the access level to “Read access”.

The authentication method for using tokens is HTTP Bearer Authentication (encrypted over HTTPS). This means that you will provide your token every time you make a request. No sessions are used.

Request

GET /checks HTTP/1.1
Host: api.pingdom.com
Authorization: Bearer ofOhK18Ca6w4S_XmInGv0QPkqly-rbRBBoHsp_2FEH5QnIbH0VZhRPO3tlvrjMIKQ36VapX

Response

HTTP/1.1 200 OK
Content-Length: 13
Content-Type: application/json
{"checks":[]}

Basic Auth

For compatibility reasons, the Pingdom API allows to use HTTP Basic Authentication with tokens. In cases where this is necessary, input the API token as the username and leave the password field empty.

An example request of how that would look like with the following API token: ofOhK18Ca6w4S_XmInGv0QPkqly-rbRBBoHsp_2FEH5QnIbH0VZhRPO3tlvrjMIKQ36VapX

GET /checks HTTP/1.1
Host: api.pingdom.com
Authorization: Basic b2ZPaEsxOENhNnc0U19YbUluR3YwUVBrcWx5LXJiUkJCb0hzcF8yRkVINVFuSWJIMFZaaFJQTzN0bHZyak1JS1EzNlZhcFg6

Server Address

The base server address is: https://api.pingdom.com

Please note that HTTPS is required. You will not be able to connect through unencrypted HTTP.

Providing Parameters

GET requests should provide their parameters as a query string, part of the URL.

POST, PUT and DELETE requests should provide their parameters as a JSON. This should be part of the request body. Remember to add the proper content type header to the request: Content-Type: application/json.

We still support providing parameters as a query string for POST, PUT and DELETE requests, but we recommend using JSON going forward. If you are using query strings, they should be part of the body, URL or a combination. The encoding of the query string should be standard URL-encoding, as provided by various programming libraries.

When using requests library for Python, use json parameter instead of data. Due to the inner mechanisms of requests.post() etc. some endpoints may return responses not conforming to the documentation when dealing with data body.

HTTP/1.1 Status Code Definitions

The HTTP status code returned by a successful API request is defined in the documentation for that method. Usually, this will be 200 OK.

If something goes wrong, other codes may be returned. The API uses standard HTTP/1.1 status codes defined by RFC 2616.

JSON Responses

All responses are sent JSON-encoded. The specific responses (successful ones) are described in the documentation section for each method.

However, if something goes wrong, our standard JSON error message (together with an appropriate status code) follows this format:

{
    "error": {
        "statuscode": 403,
        "statusdesc": "Forbidden",
        "errormessage":" Something went wrong! This string describes what happened."
    }
}

See http://en.wikipedia.org/wiki/Json for more information on JSON.

Please note that all attributes of a method response are not always present. A client application should never assume that a certain attribute is present in a response.

Limits

The Pingdom API has usage limits to avoid individual rampant applications degrading the overall user experience. There are two layers of limits, the first cover a shorter period of time and the second a longer period. This enables you to "burst" requests for shorter periods. There are two HTTP headers in every response describing your limits status.

The response headers are:

  • Req-Limit-Short
  • Req-Limit-Long

An example of the values of these headers:

  • Req-Limit-Short: Remaining: 394 Time until reset: 3589
  • Req-Limit-Long: Remaining: 71994 Time until reset: 2591989

In this case, we can see that the user has 394 requests left until the short limit is reached. In 3589 seconds, the short limit will be reset. In similar fashion, the long limit has 71994 requests left, and will be reset in 2591989 seconds.

If limits are exceeded, an HTTP 429 error code with the message "Request limit exceeded, try again later" is sent back.

gzip

Responses can be gzip-encoded on demand. This is nice if your bandwidth is limited, or if big results are causing performance issues.

To enable gzip, simply add the following header to your request:

Accept-Encoding: gzip

Best Practices

Use caching

If you are building a web page using the Pingdom API, we recommend that you do all API request on the server side, and if possible cache them. If you get any substantial traffic, you do not want to call the API each time you get a page hit, since this may cause you to hit the request limit faster than expected. In general, whenever you can cache data, do so.

Send your user credentials in a preemptive manner

Some HTTP clients omit the authentication header, and make a second request with the header when they get a 401 Unauthorized response. Please make sure you send the credentials directly, to avoid unnecessary requests.

Use common sense

Should be simple enough. For example, don't check for the status of a check every other second. The highest check resolution is one minute. Checking more often than that won't give you much of an advantage.

The Internet is unreliable

Networks in general are unreliable, and particularly one as large and complex as the Internet. Your application should not assume it will get an answer. There may be timeouts.

PHP Code Example

"This is too much to read. I just want to get started right now! Give me a simple example!"

Here is a short example of how you can use the API with PHP. You need the cURL extension for PHP.

The example prints the current status of all your checks. This sample obviously focuses on Pingdom API code and does not worry about any potential problems connecting to the API, but your code should.

Code:

<?php
    // Init cURL
    $curl = curl_init();
    // Set target URL
    curl_setopt($curl, CURLOPT_URL, "https://api.pingdom.com/api/3.1/checks");
    // Set the desired HTTP method (GET is default, see the documentation for each request)
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
    // Add header with Bearer Authorization
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("Authorization: Bearer 907c762e069589c2cd2a229cdae7b8778caa9f07"));
    // Ask cURL to return the result as a string
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    // Execute the request and decode the json result into an associative array
    $response = json_decode(curl_exec($curl), true);
    // Check for errors returned by the API
    if (isset($response['error'])) {
        print "Error: " . $response['error']['errormessage'] . "\n";
        exit;
    }
    // Fetch the list of checks from the response
    $checksList = $response['checks'];
    // Print the names and statuses of all checks in the list
    foreach ($checksList as $check) {
        print $check['name'] . " is " . $check['status'] . "\n";
    }
?>

Example output:

Ubuntu Packages is up
Google is up
Pingdom is up
My server 1 is down
My server 2 is up

If you are running PHP on Windows, you need to be sure that you have installed the CA certificates for HTTPS/SSL to work correctly. Please see the cURL manual for more information. As a quick (but unsafe) workaround, you can add the following cURL option to ignore certificate validation.

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);

TMS Steps Vocabulary

There are two types of transaction checks:

  • script: the legacy TMS check created with predefined commands in the Pingdom UI or via the public API
  • recording: the TMS check created by recording performed actions in WPM recorder. More information about how to use it can be found in the WPM recorder documentation

Script transaction checks

Commands

Actions to be performed for the script TMS check

Step Name "fn" Required "args" Remarks
Go to URL go_to url There has to be exactly one go_to step
Click click element label, name or CSS selector
Fill in field fill input, value input: label, name or CSS selector, value: text
Check checkbox check checkbox label, name or CSS selector
Uncheck checkbox uncheck checkbox label, name or CSS selector
Sleep for sleep seconds number (e.g. 0.1)
Select radio button select_radio radio name of the radio button
Select dropdown select select, option select: label, name or CSS selector, option: content, value or CSS selector
Basic auth login with basic_auth username, password username and password as text
Submit form submit form name or CSS selector
Wait for element wait_for_element element label, name or CSS selector
Wait for element to contain wait_for_contains element, value element: label, name or CSS selector, value: text

Validations

Verify the state of the page

Step Name "fn" Required "args" Remarks
URL should be url url url to be verified
Element should exist exists element label, name or CSS selector
Element shouldn't exist not_exists element label, name or CSS selector
Element should contain contains element, value element: label, name or CSS selector, value: text
Element shouldn't containt not_contains element, value element: label, name or CSS selector, value: text
Text field should contain field_contains input, value input: label, name or CSS selector, value: text
Text field shouldn't contain field_not_contains input, value input: label, name or CSS selector, value: text
Checkbox should be checked is_checked checkbox label, name or CSS selector
Checkbox shouldn't be checked is_not_checked checkbox label, name or CSS selector
Radio button should be selected radio_selected radio name of the radio button
Dropdown with name should be selected dropdown_selected select, option select: label, name or CSS selector, option: content, value or CSS selector
Dropdown with name shouldn't be selected dropdown_not_selected select, option select: label, name or CSS selector, option: content, value or CSS selector

Example steps

  "steps": [
  {
    "fn": "go_to",
    "args": {
      "url": "pingdom.com"
    }
  },
  {
    "fn": "click",
    "args": {
      "element": "START FREE TRIAL"
    }
  },
  {
    "fn": "url",
    "args": {
      "url": "https://www.pingdom.com/sign-up/"
    }
  }
  ]

Recording transaction checks

Each of check steps contains:

  • fn: function name of the step
  • args: function arguments
  • guid: automatically generated identifier
  • contains_navigate: recorder sets it on true if the step would trigger a page navigation

Commands

Actions to be performed for the recording TMS check

Step Name "fn" Required "args" Remarks
Go to URL wpm_go_to url Goes to the given url location
Click wpm_click element, offsetX, offsetY element: label, name or CSS selector,
offsetX/Y: exact position of a click in the element
Click in a exact location wpm_click_xy element, x, y, scrollX, scrollY element: label, name or CSS selector,
x/y: coordinates for the click (in viewport),
scrollX/Y: scrollbar position
Fill wpm_fill input, value input: target element,
value: text to fill the target
Move mouse to element wpm_move_mouse_to_element element, offsetX, offsetY element: target element,
offsetX/Y: exact position of the mouse in the element
Select dropdown wpm_select_dropdown select, option select: target element (drop-down),
option: text of the option to select
Wait wpm_wait seconds seconds: numbers of seconds to wait
Close tab wpm_close_tab - Closes the latest tab on the tab stack

Validations

Verify the state of the page

Step Name "fn" Required "args" Remarks
Contains text wpm_contains_timeout element, value, waitTime, useRegularExpression element: label, name or CSS selector,
value: text to search for,
waitTime: time to wait for the value to appear,
useRegularExpression: use the value as a RegEx
Does not contains text wpm_not_contains_timeout element, value, waitTime, useRegularExpression element: label, name or CSS selector,
value: text to search for,
waitTime: time to wait for the value to appear,
useRegularExpression: use the value as a RegEx

Metadata

Recording checks contain metadata which is automatically generated by the WPM recorder. Modify with caution!

Actions

Returns a list of actions alerts.

Returns a list of actions (alerts) that have been generated for your account.

query Parameters
checkids
string (actions_checkids)

Comma-separated list of check identifiers. Limit results to actions generated from these checks. Default: all checks.

from
integer (actions_from)

Only include actions generated later than this timestamp. Format is UNIX time.

limit
integer (actions_limit)
Default: 100

Limits the number of returned results to the specified quantity.

offset
integer (actions_offset)
Default: 0

Offset for listing.

status
string (actions_status)

Comma-separated list of statuses. Limit results to actions with these statuses. Default: all statuses.

to
integer (actions_to)

Only include actions generated prior to this timestamp. Format is UNIX time.

userids
string (actions_userids)

Comma-separated list of user identifiers. Limit results to actions sent to these users. Default: all users.

via
string (actions_via)

Comma-separated list of via mediums. Limit results to actions with these mediums. Default: all mediums.

Responses

Response samples

Content type
application/json
{
  • "actions":
    {
    }
}

Analysis

Returns a list of the latest root cause analysis

Returns a list of the latest root cause analysis results for a specified check.

path Parameters
checkid
required
integer (analysis_checkid)
query Parameters
from
integer (analysis_from)
Default: 0

Return only results with timestamp of first test greater or equal to this value. Format is UNIX timestamp.

limit
integer (analysis_limit)
Default: 100

Limits the number of returned results to the specified quantity.

offset
integer (analysis_offset)
Default: 0

Offset for listing. (Requires limit.)

to
integer (analysis_to)

Return only results with timestamp of first test less or equal to this value. Format is UNIX timestamp. Default: current timestamp

Responses

Response samples

Content type
application/json
{
  • "analysis":
    [
    ]
}

Returns the raw result for a specified analysis.

Returns the raw result for a specified error analysis. This data is primarily intended for internal use, but you might be interested in it as well. However, there is no real documentation for this data at the moment. In the future, we may add a new API method that provides a more user-friendly format.

path Parameters
analysisid
required
integer (analysis_analysisid)
checkid
required
integer (analysis_checkid)

Responses

Checks

Returns a list overview of all checks.

Returns a list overview of all checks.

query Parameters
include_severity
boolean
Default: false

Include severity level for each check.

include_tags
boolean
Default: false

Include tag list for each check. Tags can be marked as "a" or "u", for auto tagged or user tagged.

limit
integer
Default: 25000
Example: limit=3

Limits the number of returned probes to the specified quantity. (Max value is 25000)

offset
integer
Default: 0

Offset for listing. (Requires limit.)

showencryption
boolean
Default: false

If set, show encryption setting for each check

tags
string
Example: tags=nginx,apache,ssh

Tag list separated by commas. As an example "nginx,apache" would filter out all responses except those tagged nginx or apache

Responses

Response samples

Content type
application/json
{
  • "checks":
    [
    ],
  • "counts":
    {
    }
}

Creates a new check.

Creates a new check with settings specified by provided parameters.

Request Body schema:
One of
host
required
string

Target host

name
required
string

Check name

type
required
string
Enum: "http" "httpcustom" "tcp" "ping" "dns" "udp" "smtp" "pop3" "imap"

Type of check

auth
string

Username and password, colon separated.

custom_message
string

Custom message that will be added to email and webhook alerts.

encryption
boolean

Connection encryption

integrationids
Array of integers

Integration identifiers. For example integrationids:[1,2,3].

ipv6
boolean
Default: false

Use ipv6 instead of ipv4, if an IP address is provided as host this will be overrided by the IP address version

notifyagainevery
integer
Default: 0

Notify again every n result. 0 means that no extra notifications will be sent.

notifywhenbackup
boolean
Default: true

Notify when back up again

paused
boolean
Default: false
port
integer

Target port

postdata
string

Data that should be posted to the web page, for example submission data for a sign-up or login form. The data needs to be formatted in the same way as a web browser would send it to the web server

probe_filters
Array of strings

Filters used for probe selections. Overwrites previous filters for check. To remove all filters from a check, use an empty value. Comma separated key:value pairs. Currently only region is supported. Possible values are 'EU', 'NA', 'APAC' and 'LATAM'. For example, "region: NA".

requestheaders
Array of strings

Custom HTTP header. The entry value should contain a one-element string array. The element should contain headerName and headerValue colon-separated. To add more than one header send other parameters named requestheaders{number}.

resolution
integer
Default: 5
Enum: 1 5 15 30 60

How often should the check be tested? (minutes)

responsetime_threshold
integer
Default: 30000

Triggers a down alert if the response time exceeds threshold specified in ms (Not available for Starter and Free plans.)

sendnotificationwhendown
integer
Default: 2

Send notification when down X times

shouldcontain
string

Target site should contain this string. Note! This parameter cannot be used together with the parameter “shouldnotcontain”, use only one of them in your request.

shouldnotcontain
string

Target site should NOT contain this string. Note! This parameter cannot be used together with the parameter “shouldcontain”, use only one of them in your request.

ssl_down_days_before
integer
Default: 0

Treat the target site as down if a certificate expires within the given number of days. This parameter will be ignored if verify_certificate is set to false. It will appear provided verify_certificate is true and ssl_down_days_before value is greater than or equals 1.

tags
Array of strings

List of tags for check. The maximum length of a tag is 64 characters.

teamids
string

Teams to alert. Comma separated Integers.

url
string

Path to target on server

userids
string

User identifiers. For example userids=154325,465231,765871

verify_certificate
boolean
Default: true

Treat target site as down if an invalid/unverifiable certificate is found.

Responses

Request samples

Content type
{
  • "name": "check_google",
  • "host": "www.google.com",
  • "type": "http"
}

Response samples

Content type
application/json
{
  • "check":
    {
    }
}

Pause or change resolution for multiple checks.

Pause or change resolution for multiple checks in one bulk call.

Request Body schema:
checkids
string

Comma-separated list of identifiers for checks to be modified. Invalid check identifiers will be ignored. Default: all checks

paused
boolean

Use value: true to pause the check(s) and value: false to unpause it(them).

resolution
integer
Enum: 1 5 15 30 60

Responses

Request samples

Content type
{
  • "paused": true,
  • "resolution": 1
}

Response samples

Content type
application/json
{
  • "message": "Modification of 4 checks was successful!"
}

Deletes a list of checks.

Deletes a list of checks. THIS METHOD IS IRREVERSIBLE! You will lose all collected data. Be careful!

query Parameters
delcheckids
required
Array of integers
Example: delcheckids=1,2,3

Comma-separated list of identifiers for checks to be deleted.

Request Body schema: application/json
string

Responses

Request samples

Content type
application/json
{
  • "delcheckids": "1,2,3"
}

Response samples

Content type
application/json
{
  • "message": "Deletion of checks was successful!"
}

Returns a detailed description of a check.

Returns a detailed description of a specified check.

path Parameters
checkid
required
integer

Identifier of check to be retrieved

query Parameters
include_teams
boolean
Default: false

Include team connections for check.

Responses

Response samples

Content type
application/json
Example
{
  • "check":
    {
    }
}

Modify settings for a check.

Modify settings for a check. The provided settings will overwrite previous values. Settings not provided will stay the same as before the update. To clear an existing value, provide an empty value. Please note that you cannot change the type of a check once it has been created.

path Parameters
checkid
required
integer

Identifier of check to be updated

Request Body schema:
One of
addtags
Array of strings

Check tags to add in addition to current check tags

auth
string

Username and password, colon separated.

checkids
string

Identifiers of checks to modify in bulk. For example checkids=1234,5678

custom_message
string

Custom message that will be added to email and webhook alerts.

encryption
boolean

Connection encryption

host
string

Target host

integrationids
Array of integers

Integration identifiers. For example integrationids:[1,2,3].

ipv6
boolean

Use ipv6 instead of ipv4, if an IP address is provided as host this will be overrided by the IP address version

name
string

Check name

notifyagainevery
integer
Default: 0

Notify again every n result. 0 means that no extra notifications will be sent.

notifywhenbackup
boolean
Default: true

Notify when back up again

paused
boolean
Default: false
port
integer

Target port

postdata
string

Data that should be posted to the web page, for example submission data for a sign-up or login form. The data needs to be formatted in the same way as a web browser would send it to the web server

probe_filters
Array of strings

Filters used for probe selections. Overwrites previous filters for check. To remove all filters from a check, use an empty value. Comma separated key:value pairs. Currently only region is supported. Possible values are 'EU', 'NA', 'APAC' and 'LATAM'. For example, "region: NA".

requestheaders
Array of strings

Custom HTTP header. The entry value should contain a one-element string array. The element should contain headerName and headerValue colon-separated. To add more than one header send other parameters named requestheaders{number}.

resolution
integer
Default: 5
Enum: 1 5 15 30 60

How often should the check be tested? (minutes)

responsetime_threshold
integer
Default: 30000

Triggers a down alert if the response time exceeds threshold specified in ms (Not available for Starter and Free plans.)

sendnotificationwhendown
integer
Default: 2

Send notification when down X times

shouldcontain
string

Target site should contain this string. Note! This parameter cannot be used together with the parameter “shouldnotcontain”, use only one of them in your request.

shouldnotcontain
string

Target site should NOT contain this string. Note! This parameter cannot be used together with the parameter “shouldcontain”, use only one of them in your request.

ssl_down_days_before
integer
Default: 0

Treat the target site as down if a certificate expires within the given number of days. This parameter will be ignored if verify_certificate is set to false. It will appear provided verify_certificate is true and ssl_down_days_before value is greater than or equals 1.

tags
Array of strings

List of tags for check. The maximum length of a tag is 64 characters.

teamids
string

Teams to alert. Comma separated Integers.

url
string

Path to target on server

userids
string

User identifiers. For example userids=154325,465231,765871

verify_certificate
boolean
Default: true

Treat target site as down if an invalid/unverifiable certificate is found.

Responses

Request samples

Content type
{
  • "name": "google_check",
  • "host": "www.google.com",
  • "paused": false
}

Response samples

Content type
application/json
{
  • "message": "Modification of check was successful!"
}

Deletes a check.

Deletes a check. THIS METHOD IS IRREVERSIBLE! You will lose all collected data. Be careful!

path Parameters
checkid
required
integer

Identifier of check to be deleted

Responses

Response samples

Content type
application/json
{
  • "message": "Deletion of check was successful!"
}

Credits

Returns information about remaining credits

Returns information about remaining checks, SMS credits and SMS auto-refill status.

Responses

Response samples

Content type
application/json
{
  • "credits":
    {
    }
}

Maintenance

Returns a list of user's maintenance windows.

Returns a list of user's maintenance windows.

query Parameters
limit
integer (maintenance_limit)

Count of items to list.

offset
integer (maintenance_offset)

Offset of the list.

order
string (maintenance_order)
Default: "asc"
Enum: "asc" "desc"

Order a-z for asc z-a for desc. Works only if orderby is specified.

orderby
string (maintenance_orderby)
Enum: "description" "from" "to" "effectiveto"

Order by the specific property of the maintenance window.

Responses

Response samples

Content type
application/json
{
  • "maintenance":
    [
    ]
}

Create new maintenance window.

Create new maintenance window.

Request Body schema:

Description

description
required
string

Description

from
required
integer

Initial maintenance window start. Format UNIX time. (Only future allowed. Use 1 for the current timestamp.)

to
required
integer

Initial maintenance window end. Format UNIX time. (Only future allowed. Use 1 for the current timestamp.)

effectiveto
integer

Recurrence end. Format UNIX time. Default: equal to to. (Only future allowed. Use 1 for the current timestamp.)

recurrencetype
string
Default: "none"
Enum: "none" "day" "week" "month"

Type of recurrence.

repeatevery
integer
Default: 0

Repeat every n-th day/week/month

tmsids
Array of integers

Identifiers of transaction checks to assign to the maintenance window - Comma separated Integers

uptimeids
Array of integers

Identifiers of uptime checks to assign to the maintenance window - Comma separated Integers

Responses

Request samples

Content type
{
  • "description": "Some description of the maintenance window",
  • "from": 1569580215,
  • "to": 1569583815
}

Response samples

Content type
application/json
{
  • "maintenance":
    {
    }
}

Delete multiple maintenance windows.

Delete multiple maintenance windows. Note that only future maintenance windows can be deleted.

query Parameters
maintenanceids
required
Array of integers
Example: maintenanceids=1,2,3,4,5

Comma-separated list of identifiers of maintenance windows to be deleted.

Responses

Response samples

Content type
application/json
{
  • "message": "5 maintenance windows successfully deleted."
}

Returns the maintenance window specified by its id

Returns the maintenance window specified by its id.

path Parameters
id
required
integer (maintenance_id)
Example: 3

id of maintenance window

Responses

Response samples

Content type
application/json
{
  • "maintenance":
    {
    }
}

Modify the maintenance window.

Modify the maintenance window.

path Parameters
id
required
integer (maintenance_id)
Example: 3

id of maintenance window

Request Body schema:

Description

description
string

Description

effectiveto
integer

Recurrence end. Format UNIX time. Default: equal to to. (Only future allowed. Use 1 for the current timestamp.)

from
integer

Initial maintenance window start. Format UNIX time. (Only future allowed. Use 1 for the current timestamp.)

recurrencetype
string
Enum: "none" "day" "week" "month"

Type of recurrence

repeatevery
integer
Default: 0

Repeat every n-th day/week/month

tmsids
Array of integers

Identifiers of transaction checks to assign to the maintenance window - Comma separated Integers

to
integer

Initial maintenance window end. Format UNIX time. (Only future allowed. Use 1 for the current timestamp.)

uptimeids
Array of integers

Identifiers of uptime checks to assign to the maintenance window - Comma separated Integers

Responses

Request samples

Content type
{
  • "description": "Modified maintenance window",
  • "from": 1569580215,
  • "to": 1569583815
}

Response samples

Content type
application/json
{
  • "message": "Maintenance window successfully modified!"
}

Delete the maintenance window.

Delete the maintenance window. Note that only future maintenance window can be deleted.

path Parameters
id
required
integer (maintenance_id)
Example: 3

id of maintenance window

Responses

Response samples

Content type
application/json
{
  • "message": "Maintenance window successfully deleted!"
}

Maintenance occurrences

Gets a maintenance occurrence details

Gets a maintenance occurrence details specified by its identifier.

path Parameters
id
required
integer (maintenance.occurrences_id)

Responses

Response samples

Content type
application/json
{
  • "occurrence":
    {
    }
}

Modifies a maintenance occurrence

Modifies a maintenance occurrence specified by its identifier.

path Parameters
id
required
integer (maintenance.occurrences_id)
Request Body schema:
from
integer

Beginning of the maintenance occurrence. Format UNIX time. (Only future allowed. Use 1 for the current timestamp.)

to
integer

End of the maintenance occurrence. Format UNIX time. (Only future allowed. Use 1 for the current timestamp.)

Responses

Request samples

Content type
{
  • "from": 1569580215,
  • "to": 1569583815
}

Response samples

Content type
application/json
{
  • "message": "Occurrence successfully modified!"
}

Deletes the maintenance occurrence

Deletes the maintenance occurrence specified by its identifier. Note that only future occurrences can be deleted.

path Parameters
id
required
integer (maintenance.occurrences_id)

Responses

Response samples

Content type
application/json
{
  • "message": "Occurrence successfully deleted!"
}

Returns a list of maintenance occurrences.

Returns a list of maintenance occurrences.

query Parameters
from
integer (maintenance.occurrences_from)

Effective from (unix timestamp). (List occurrences which are effective from the specified unix timestamp. If not specified, current timestamp is used.)

maintenanceid
integer (maintenance.occurrences_maintenanceid)

Maintenance window identifier. (List only occurrences of a specific maintenance window.)

to
integer (maintenance.occurrences_to)

Effective to (unix timestamp). (List occurrences which are effective to the specified unix timestamp.)

Responses

Response samples

Content type
application/json
{
  • "occurrences":
    [
    ]
}

Deletes multiple maintenance occurrences

Deletes multiple maintenance occurrences specified by their identifiers. Note that only future occurrences can be deleted.

query Parameters
required
object (maintenance.occurrences_delete)
Example: occurenceids=1&occurenceids=2&occurenceids=3&occurenceids=4&occurenceids=5

Responses

Response samples

Content type
application/json
{
  • "message": "5 occurrences successfully deleted."
}

Probes

Returns a list of Pingdom probe servers

Returns a list of all Pingdom probe servers for Uptime and Transaction checks.

query Parameters
includedeleted
boolean
Default: false

Include old probes that are no longer in use.

limit
integer
Example: limit=3

Limits the number of returned probes to the specified quantity.

offset
integer
Default: 0

Offset for listing. (Requires limit.)

onlyactive
boolean
Default: false

Return only active probes.

Responses

Response samples

Content type
application/json
{
  • "probes":
    [
    ]
}

Reference

Get regions, timezone and date/time/number references

Get a reference of regions, timezones and date/time/number formats and their identifiers.

Responses

Response samples

Content type
application/json
{
  • "regions":
    [
    ],
  • "timezones":
    [
    ],
  • "datetimeformats":
    [
    ],
  • "numberformats":
    [
    ],
  • "countries":
    [
    ],
  • "phonecodes":
    {
    }
}

Results

Return a list of raw test results

Return a list of raw test results for a specified check

path Parameters
checkid
required
integer (results_checkid)
query Parameters
from
integer (results_from)

Start of period. Format is UNIX timestamp. Default value is 1 day prior to to.

includeanalysis
boolean (results_includeanalysis)
Default: false

Attach available root cause analysis identifiers to corresponding results

limit
integer (results_limit)
Default: 1000

Number of results to show (Will be set to 1000 if the provided value is greater than 1000)

maxresponse
integer (results_maxresponse)

Maximum response time (ms). If set, specified interval must not be larger than 31 days.

minresponse
integer (results_minresponse)

Minimum response time (ms). If set, specified interval must not be larger than 31 days.

offset
integer (results_offset)
Default: 0

Number of results to skip (Max value is 43200)

probes
string (results_probes)

Filter to only show results from a list of probes. Format is a comma separated list of probe identifiers

status
string (results_status)

Filter to only show results with specified statuses. Format is a comma separated list of (down, up, unconfirmed, unknown)

to
integer (results_to)

End of period. Format is UNIX timestamp. Default value is current timestamp.

Responses

Response samples

Content type
application/json
{
  • "results":
    [
    ],
  • "activeprobes":
    [
    ]
}

Single

Performs a single check.

Performs a single test using a specified Pingdom probe against a specified target. Please note that this method is meant to be used sparingly, not to set up your own monitoring solution.

query Parameters
HTTP (object) or HTTP-Custom (object) or TCP (object) or DNS (object) or UDP (object) or SMTP (object) or POP3 (object) or IMAP (object)

Query Parameters to chose

Responses

Response samples

Content type
application/json
{
  • "result":
    {
    }
}

Summary.average

Get the average time/uptime value for a specified

Get the average time / uptime value for a specified check and time period.

path Parameters
checkid
required
integer (summary.average_checkid)
query Parameters
bycountry
boolean (summary.average_bycountry)
Default: false

Split response times into country groups

byprobe
boolean (summary.average_byprobe)
Default: false

Split response times into probe groups

from
integer (summary.average_from)
Default: 0

Start time of period. Format is UNIX timestamp

includeuptime
boolean (summary.average_includeuptime)
Default: false

Include uptime information

probes
string (summary.average_probes)

Filter to only use results from a list of probes. Format is a comma separated list of probe identifiers. By default result from all probes are shown.

to
integer (summary.average_to)

End time of period. Format is UNIX timestamp. Default is the current time

Responses

Response samples

Content type
application/json
{
  • "summary":
    {
    }
}

Summary.hoursofday

Returns the average response time for each hour.

Returns the average response time for each hour of the day (0-23) for a specific check over a selected time period. I.e. it shows you what an average day looks like during that time period.

path Parameters
checkid
required
integer (summary.hoursofday_checkid)
query Parameters
from
integer (summary.hoursofday_from)

Start time of period. Format is UNIX timestamp. Default value is one week eariler than to.

probes
string (summary.hoursofday_probes)

Filter to only use results from a list of probes. Format is a comma separated list of probe identifiers. By default all probes results are returned.

to
integer (summary.hoursofday_to)

End time of period. Format is UNIX timestamp. Default value is current time.

uselocaltime
boolean (summary.hoursofday_uselocaltime)
Default: false

If true, use the user's local time zone for results (from and to parameters should still be specified in UTC). If false, use UTC for results.

Responses

Response samples

Content type
application/json
{
  • "hoursofday":
    [
    ]
}

Summary.outage

Get a list of status changes for a specified check

Get a list of status changes for a specified check and time period. If order is speficied to descending, the list is ordered by newest first. (Default is ordered by oldest first.)

path Parameters
checkid
required
integer (summary.outage_checkid)
query Parameters
from
integer (summary.outage_from)

Start time of period. Format is UNIX timestamp. Default value is one week earlier than to.

order
string (summary.outage_order)
Default: "asc"
Enum: "asc" "desc"

Sorting order of outages. Ascending or descending.

to
integer (summary.outage_to)

End time of period. Format is UNIX timestamp. Default value is the current time.

Responses

Response samples

Content type
application/json
{
  • "summary":
    {
    }
}

Summary.performance

For a given interval return a list of subintervals

For a given interval in time, return a list of sub intervals with the given resolution. Useful for generating graphs. A sub interval may be a week, a day or an hour depending on the choosen resolution.

path Parameters
checkid
required
integer (summary.performance_checkid)
query Parameters
from
integer (summary.performance_from)

Start time of period. Format is UNIX timestamp. Default value is 10 intervals earlier than to.

includeuptime
boolean (summary.performance_includeuptime)
Default: false

Include uptime information.

order
string (summary.performance_order)
Default: "asc"
Enum: "asc" "desc"

Sorting order of sub intervals. Ascending or descending.

probes
string (summary.performance_probes)

Filter to only use results from a list of probes. Format is a comma separated list of probe identifiers. Can not be used if includeuptime is set to true. Also note that this can cause intervals to be omitted, since there may be no results from the desired probes in them. By deafult results from all probes are returned.

resolution
string (summary.performance_resolution)
Default: "hour"
Enum: "hour" "day" "week"

Interval size

to
integer (summary.performance_to)

End time of period. Format is UNIX timestamp. Default value is the current time.

Responses

Response samples

Content type
application/json
{
  • "summary":
    {
    }
}

Summary.probes

Get a list of probes that performed tests

Get a list of probes that performed tests for a specified check during a specified period.

path Parameters
checkid
required
integer (summary.probes_checkid)
query Parameters
from
required
integer (summary.probes_from)

Start time of period. Format is UNIX timestamp

to
integer (summary.probes_to)

End time of period. Format is UNIX timestamp. The defualt value is current time.

Responses

Response samples

Content type
application/json
{
  • "probes":
    [
    ]
}

Traceroute

Perform a traceroute

Perform a traceroute to a specified target from a specified Pingdom probe.

query Parameters
host
required
string
Example: host=pingdom.com

Target host.

probeid
integer
Example: probeid=23

Probe identifier.

Responses

Response samples

Content type
application/json
{
  • "traceroute":
    {
    }
}

Teams

Returns a list of all teams and their members

Returns a list of all teams and their members

Responses

Response samples

Content type
application/json
{
  • "teams":
    [
    ]
}

Creates a new team

Creates a new team with or without members

Request Body schema: application/json
member_ids
required
Array of integers

Contact ids

name
required
string

Team name

Responses

Request samples

Content type
application/json
{
  • "name": "API Team",
  • "member_ids":
    [
    ]
}

Response samples

Content type
application/json
{
  • "team":
    {
    }
}

Returns a team with its members

Returns a team with its members

path Parameters
teamid
required
integer

ID of the team to be retrieved

Responses

Response samples

Content type
application/json
{
  • "team":
    {
    }
}

Updates a team

Updates a team

path Parameters
teamid
required
integer

ID of the team to be retrieved

Request Body schema: application/json
member_ids
required
Array of integers <int64>

IDs of contacts to be the members of this team

name
required
string

Team name

Responses

Request samples

Content type
application/json
{
  • "name": "Team Rocket",
  • "member_ids":
    [
    ]
}

Response samples

Content type
application/json
{
  • "team":
    {
    }
}

Deletes a team

Deletes a team

path Parameters
teamid
required
integer

ID of the team to be deleted

Responses

Response samples

Content type
application/json
{
  • "message": "Deletion of team 12345 was successful."
}

Contacts

Returns a list of all contacts

Returns a list of all contacts with their contact methods (notification targets)

Responses

Response samples

Content type
application/json
{
  • "contacts":
    [
    ]
}

Creates a new contact

Creates a new contact with at least one contact method (notification target)

Request Body schema: application/json
name
required
string

Contact name

required
Array of SMSes (objects) or Array of Emails (objects)
paused
boolean
Default: false
Enum: true false

Pause contact

Responses

Request samples

Content type
application/json
{
  • "name": "John Doe",
  • "notification_targets":
    {
    }
}

Response samples

Content type
application/json
{
  • "contact":
    {
    }
}

Returns a contact with its contact methods

Returns a contact with its contact methods (notification targets)

path Parameters
contactid
required
integer

ID of contact to be retrieved

Responses

Response samples

Content type
application/json
{
  • "contact":
    {
    }
}

Update a contact

Update a contact with at least one contact method (notification target)

path Parameters
contactid
required
integer

ID of contact to be updated

Request Body schema: application/json
name
required
string

Contact name

required
Array of SMSes (objects) or Array of Emails (objects)
paused
required
boolean
Enum: true false

Pause contact

Responses

Request samples

Content type
application/json
{
  • "name": "John Doe",
  • "paused": false,
  • "notification_targets":
    {
    }
}

Response samples

Content type
application/json
{
  • "contact":
    {
    }
}

Deletes a contact with its contact methods

Deletes a contact with its contact methods (notification targets)

path Parameters
contactid
required
integer

ID of contact to be deleted

Responses

Response samples

Content type
application/json
{
  • "message": "Deletion of contact 12345 was successful"
}

TMS Checks

There are two types of transaction checks:
  • script: the legacy TMS check created with predefined commands in the Pingdom UI or via the public API
  • recording: the TMS check created by recording performed actions in WPM recorder. More information about how to use it can be found in the WPM recorder documentation
For more information about possible commands, please check our vocabulary in the description.

Returns a list overview of all transaction checks.

query Parameters
extended_tags
boolean

Specifies whether to return an extended tags representation in the response (with type and count).

limit
string
Default: 1000

Limit of returned checks

offset
string
Default: 0

Offset of returned checks

tags
Array of strings
Example: tags=nginx,apache

Tag list separated by commas. As an example "nginx,apache" would filter out all responses except those tagged nginx or apache

type
string
Enum: "script" "recording"

Filter to return only checks of a given type (a TMS script or a WPM recording). If not provided, all checks are returned.

Responses

Response samples

Content type
application/json
{
  • "checks":
    [
    ],
  • "limit": 1000,
  • "offset": 0
}

Creates a new transaction check.

Request Body schema: application/json

Specifies the check to be added

name
required
string

Name of the check

required
Array of objects (Step)

steps to be executed as part of the check

active
boolean
Default: true

Check status: active or inactive

contact_ids
Array of integers <int64>

Contacts to alert

custom_message
string

Custom message that is part of the email and webhook alerts

integration_ids
Array of integers <int64>

Integration identifiers.

interval
integer <int64>
Default: 10

TMS test intervals in minutes. Allowed intervals: 5,10,20,60,720,1440. The interval you're allowed to set may vary depending on your current plan.

object (Metadata)

Recording related metadata. Used for recordings only. Modify with caution!

region
string
Default: "us-east"

Name of the region where the check is executed. Supported regions: us-east, us-west, eu, au

send_notification_when_down
integer <int64>
Default: 1

Send notification when down X times

severity_level
string
Default: "high"

Check importance- how important are the alerts when the check fails. Allowed values: low, high

tags
Array of strings

List of tags for a check. The tag name may contain the characters 'A-Z', 'a-z', '0-9', '_' and '-'. The maximum length of a tag is 64 characters.

team_ids
Array of integers <int64>

Teams to alert

Responses

Request samples

Content type
application/json
{
  • "active": false,
  • "contact_ids":
    [
    ],
  • "custom_message": "My custom message",
  • "interval": 20,
  • "name": "My awesome check",
  • "region": "us-west",
  • "send_notification_when_down": 0,
  • "severity_level": "low",
  • "steps":
    [
    ],
  • "team_ids":
    [
    ],
  • "integration_ids":
    [
    ],
  • "metadata":
    {
    },
  • "tags":
    [
    ]
}

Response samples

Content type
application/json
{
  • "id": 3,
  • "name": "My awesome check"
}

Deletes a transaction check.

path Parameters
cid
required
integer <int64>

Specifies the id of the check to be deleted

Responses

Response samples

Content type
application/json
{
  • "message": "Deletion of check 1234567 was successful"
}

Returns a single transaction check.

path Parameters
cid
required
integer <int64>

Specifies the id of the check to be fetched

query Parameters
extended_tags
boolean

Specifies whether to return an extended tags representation in the response (with type and count).

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "contact_ids":
    [
    ],
  • "created_at": 1553070682,
  • "modified_at": 1553070968,
  • "last_downtime_start": 1553081100,
  • "last_downtime_end": 1553089000,
  • "custom_message": "My custom message",
  • "interval": 10,
  • "name": "My awesome check",
  • "region": "us-west",
  • "send_notification_when_down": 1,
  • "severity_level": "low",
  • "status": "successful",
  • "steps":
    [
    ],
  • "team_ids":
    [
    ],
  • "integration_ids":
    [
    ],
  • "metadata":
    {
    },
  • "tags":
    [
    ],
  • "type":
    [
    ]
}

Modify settings for transaction check.

path Parameters
cid
required
integer <int64>

Specifies the id of the check to be modified

Request Body schema: application/json

Specifies the data to be modified for the check

active
boolean

Check status: active or inactive

contact_ids
Array of integers <int64>

Contacts to alert

custom_message
string

Custom message that is part of the email and webhook alerts

integration_ids
Array of integers

Integration identifiers as a list of integers.

interval
integer <int64>

TMS test intervals in minutes. Allowed intervals: 5,10,20,60,720,1440. The interval you're allowed to set may vary depending on your current plan.

object (Metadata)

Recording related metadata. Used for recordings only. Modify with caution!

name
string

Name of the check

region
string

Name of the region where the check is executed. Supported regions: us-east, us-west, eu, au

send_notification_when_down
integer <int64>

Send notification when down X times

severity_level
string

Check importance- how important are the alerts when the check fails. Allowed values: low, high

Array of objects (Step)

steps to be executed as part of the check

tags
Array of strings

List of tags for a check. The tag name may contain the characters 'A-Z', 'a-z', '0-9', '_' and '-'. The maximum length of a tag is 64 characters.

team_ids
Array of integers <int64>

Teams to alert

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "contact_ids":
    [
    ],
  • "custom_message": "My custom message",
  • "interval": 10,
  • "name": "My awesome check",
  • "region": "us-west",
  • "send_notification_when_down": 1,
  • "severity_level": "low",
  • "steps":
    [
    ],
  • "team_ids":
    [
    ],
  • "metadata":
    {
    },
  • "tags":
    [
    ],
  • "integration_ids":
    [
    ]
}

Response samples

Content type
application/json
{
  • "active": true,
  • "contact_ids":
    [
    ],
  • "created_at": 1553070682,
  • "modified_at": 1553070968,
  • "last_downtime_start": 1553081100,
  • "last_downtime_end": 1553089000,
  • "custom_message": "My custom message",
  • "interval": 10,
  • "name": "My awesome check",
  • "region": "us-west",
  • "send_notification_when_down": 1,
  • "severity_level": "low",
  • "status": "successful",
  • "steps":
    [
    ],
  • "team_ids":
    [
    ],
  • "integration_ids":
    [
    ],
  • "metadata":
    {
    },
  • "tags":
    [
    ],
  • "type":
    [
    ]
}

Returns a status change report for a single transaction check

Get a list of status changes for a specified check and time period. If order is speficied to descending, the list is ordered by newest first. (The default is ordered by oldest first.) It can be used to display a detailed view of a check.

path Parameters
check_id
required
integer <int64>

Specifies the id of the check for which the status change report will be fetched

query Parameters
from
string <date-time>

Start time of period. The format is RFC 3339 (properly URL-encoded!). The default value is one week earlier than to

order
string
Default: "asc"
Enum: "asc" "desc"
Example: order=desc

Sorting order of outages. Ascending or descending

to
string <date-time>

End time of period. The format is RFC 3339 (properly URL-encoded!). The default value is the current time

Responses

Response samples

Content type
application/json
{
  • "report":
    {
    }
}

Returns a status change report for all transaction checks in the current organization

Get a list of status changes for all transaction check in the current organization from the requested time period. If order is speficied to descending, the list of statuses within each check is ordered by newest first. (The default is ordered by oldest first.) It can be used to display a list view of all checks and their current status.

query Parameters
from
string <date-time>

Start time of period. The format is RFC 3339 (properly URL-encoded!). The default value is one week earlier than to

limit
string
Default: 100

Limit of returned checks

offset
string
Default: 0

Offset of returned checks

omit_empty
boolean
Default: false

Omits checks without any results within specified time

order
string
Default: "asc"
Enum: "asc" "desc"
Example: order=desc

Sorting order of outages. Ascending or descending

to
string <date-time>

End time of period. The format is RFC 3339 (properly URL-encoded!). The default value is the current time

Responses

Response samples

Content type
application/json
{
  • "report":
    [
    ]
}

Returns a performance report for a single transaction check

For a given period of time, return a list of time intervals with the given resolution. An interval may be a week, a day or an hour depending on the chosen resolution. It can be used to display a detailed view of a check with information about its steps and generate graphs.

path Parameters
check_id
required
integer <int64>

Specifies the id of the check for which the performance report will be fetched

query Parameters
from
string <date-time>

Start time of period. The format is RFC 3339 (properly URL-encoded!). The default value is 10 times the resolution (10 hours, 10 day, 10 weeks) earlier than to. The value is extended to the nearest hour, day or week, depending on the 'resolution' parameter and configured time zone of the account.

include_uptime
boolean
Default: false

Include uptime information. Adds field downtime, uptime, and unmonitored to the interval array objects.

order
string
Default: "asc"
Enum: "asc" "desc"
Example: order=desc

Sorting order of outages. Ascending or descending

resolution
string
Default: "hour"
Enum: "hour" "day" "week"
Example: resolution=day

Size of an interval for which the results are calculated. For the hour resolution, the max allowed period is one week and 1 day. For the day resolution, the max allowed period is 6 months and 1 day.

to
string <date-time>

End time of period. The format is RFC 3339 (properly URL-encoded!). The default value is the current time. The value is extended to the nearest hour, day or week, depending on the 'resolution' parameter and configured time zone of the account.

Responses

Response samples

Content type
application/json
{
  • "report":
    {
    }
}