This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Help using Pingdom API to export existing transaction checks (mainly uptime), and Posting the configuration to a separate Pingdom account

I could really use some help to with the Pingdom API to GET existing transaction checks (mainly uptime), and Posting the configuration to a separate Pingdom account. We are consolidating Pingdom accounts and have around 300 checks, so creating them manually is my worst nightmare.

Can anyone help to get me started with a basic template for a GET command to get all of the checks, then a POST command to create the checks with the existing configuration?


I'm not very good with the API commands, so any help would be greatly appreciated!

Parents
  • Get POstman https://www.postman.com/ - it will help with testing and running the API's, and it is free. You will need to log into both Pingdom webconsoles, click on settings, then pingdom API. Create read and readwrite tokens. Record them somewhere. 

    Pingdom API - this site does have pretty good documentation. 

    Call to get a list of uptime checks: api.pingdom.com/.../checks

    call to get details on each uptime check: https://api.pingdom.com/api/3.1/checks/xxxxxxx

    where xxxxxx is the ID of each check from the list checks. 

    You will want to look at the action and endpoint commands in the api calls too. 

    The pingdom api site offers good examples. Setting up postman with your token will make it easier to test and get output. Please look at the postman help - its pretty good. 

    Lastly, I am not a developer, but postman has been VERY useful in testing and dealign with all sorts of API stuff. 


  • Thanks for the input! I was able to extract the checks with postman and even able to post a new check. Now my struggle is formatting the check output from the environment I want migrate so it will POST and create the checks in the new account. I have around 200 checks so filtering the output is tricky.

    I could use some regex help at this point. See the screenshot sbelow. I'm using Notepad++ to Find and mark all rows, then deleting them.

    I need some help selecting\marking all rows highlighted in the red box. The "maintenanceids" repeats itself in each check so the select needs to stop at the ].

    Any ideas on how to write this regex find?  





  • Take a peek at RegExr: Learn, Build, & Test RegEx. It allows you to test your output and has some help files. Otherwise, I dont spend much time with regex. 

Reply Children
No Data