Forum Discussion

Kelemvor's avatar
Kelemvor
Icon for Advisor rankAdvisor
2 years ago

Creating/Copying a website check via API - new portal

Hi,

Our company was acquired by a different one and we both use LM.  We’re working to move things from our ‘old’ portal to the ‘new’ one little by little.  For servers, we can just have the new LM do a scan and that shouldn’t be too hard.  For Websites, we’d have to enter those by hand.  We have almost 1000 of them so manual entry is out of the question.

I’m hoping I can do something with an API call to grab all the current websites, then modify them to replace old server names with new ones (and anything else that needs to be changed), and then use the API to recreate them in the new portal.

I’m assuming that’s possible but I’m wondering if anyone has done this before.  The websites have dozens of properties and I’m not 100% sure which ones I have to specify and which ones it would just fill in on its own.  or, since i”m using a full dump for each site, should I just change the names I know need to be changed and leave everything else in there?

Any ideas or suggestions would be great.

Thanks!!

3 Replies

  • I haven’t migrated any, but I’ve built a script that pulls from our IaaC solution and creates the websites. What language are you building your script in? If Python, consider the SDK as it will make things a bit easier by handling all the authentication for you. 

    As for what stuff, I’d just pull it all over for all external websites (ping and http). The source IDs should be the same. For internal ones, you’d want to map the old collector IDs to the new collector IDs. I’d attempt just swapping that out only; unless the destination addresses are changing as well.

  • Right now I’m just using postman to see what I can get and do.  I was able to take the JSON info, change the name and groupID and Post it back in and it made me a duplicate just fine.

    Next step is to do the same thing but with the collector info from the new side.  These are all Internal checks.  We’ll see if I can get one working as a test and go from there.

    Thanks.

  • yeah, should be able to use the SDK to setup multiple simultaneous portals, get from one, modify the name, groupid, and sources (with a map), and post into the new portal. lmk if you want some help with it. I’m open to moonlighting.