Here is my curl command:
curl -X PUT -u 'adminaccount:teampassword' -H 'Content-Type: application/json' -H 'App-Key: appkey' -d 'paused=true' https://api.pingdom.com/api/2.0/checks/checkID
I get the following error when passing through the admin account (the account which stores our checks):
{"error":{"statuscode":401,"statusdesc":"Unauthorized","errormessage":"Invalid email and/or password"}}
If I change the username I'm passing through to my teams account (non-admin, no checks locally) I get the following error:
{"error":{"statuscode":403,"statusdesc":"Forbidden","errormessage":"Not permitted for account type."}}
This suggests to me that I need to include multi-user authentication, however I can't find any documentation explaining how to do this via a curl command.
Any help would be appreciated.
For anyone who comes across this problem, I have found a resolution. It is because in my particular case all of my Pingdom checks have been configured on the admin account. I obviously don't have access to the password for that account so I have to add the following:
-H "account-email: admin@email.com"
So my cURL is now:
curl -X PUT -u myaccount@email.com:Password -H "account-email: admin@email.com" -H 'Content-Type: application/json' -H 'App-Key: appkey' -d 'paused=false' https://api.pingdom.com/api/2.0/checks/2328054
Hope this can help someone!