Using my trial account I am trying to eval the API to create a new "check" with the pingdom API 3.1 (or 2.1)
Here is the published documentation with the sample code I am following: Pingdom API (https://docs.pingdom.com/api/#tag/Resource:-Checks/paths/~1checks/post)
HERE IS MY POST: (response follows below)
------------------
curl -X POST \
https://api.pingdom.com/api/3.1/checks \
-H 'Accept: */*' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Authorization: Bearer REMOVED' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Length: 459' \
-H 'Content-Type: application/json' \
-H 'Cookie: __cfduid=d9176e894c9e7447aaa6fe93b74da28e51569381518' \
-H 'Host: api.pingdom.com' \
-H 'Postman-Token: 31f0c5af-86db-4c7a-a9ed-56db4ddddad0,1194f682-4c16-4ba3-92d4-c761bb2919ae' \
-H 'User-Agent: PostmanRuntime/7.16.3' \
-H 'cache-control: no-cache' \
-d '{
"http": {
"url": "https://pingdom.com",
"encryption": true,
"port": 443
},
"name": "mycheck1",
"host": "pingdom.com",
"type": "http",
"paused": false,
"resolution": 5,
"sendnotificationwhendown": 2,
"notifyagainevery": 0,
"notifywhenbackup": true,
"tags": [
{
"name": "pingdom",
"type": "whatever",
"count": 2
}
],
"probe_filters": [
"region:LATAM"
],
"responsetime_threshold": 30000
}'
HERE IS PINGDOM'S RESPONSE
----------------------------------------
{
"error": {
"statuscode": 400,
"statusdesc": "Bad Request",
"errormessage": "Invalid parameter: 'http'"
}
}
Huh? I've even tried removing the 'http' object from the request above.... when I do that then I get back
{
"error": {
"statuscode": 400,
"statusdesc": "Bad Request",
"errormessage": "Invalid parameter value: paused"
}
}
Huh? I've even tried removing the 'paused' property from the request above.... when I do that then I get back
"error": {
"statuscode": 400,
"statusdesc": "Bad Request",
"errormessage": "Invalid parameter value: notifywhenbackup"
}
}
Huh? I've even tried removing the 'notifywhenbackup' property from the request above.... when I do that then I get back
"error": {
"statuscode": 400,
"statusdesc": "Bad Request",
"errormessage": "Invalid parameter tags value Array"
}
}
Huh? I've even tried removing the 'tags' property from the request above.... when I do that then I get back
"error": {
"statuscode": 400,
"statusdesc": "Bad Request",
"errormessage": "Invalid parameter: filters"
}
}
Huh? There is NO 'filters" property! Ok next best guess, I've even tried removing the 'probe_filters' property from the request above.... when I do that then I get back
"check": {
"id": 5454775,
"name": "mycheck1"
}
}
So.... what is going on here? the final request I posted looks like this.... a far cry from what the documentation states... Pingdom API
{
"name": "mycheck1",
"host": "pingdom.com",
"type": "http",
"resolution": 5,
"sendnotificationwhendown": 2,
"notifyagainevery": 0,
"responsetime_threshold": 30000
}