Need help with Linode API
There is no linode.rebuild.usingstackscript API call so what are all the calls I need to make to be able to do this operation programmatically?
Any information / sample code in Python or Ruby will be greatly appreciated.
Thanks
1 Reply
So linode.disk.list(), iterate over disk images and linode.disk.delete() each. Then do a linode.config.list(), iterate over each and run linode.config.delete().
You would then do linode.disk.createfromstackscript() as well as linode.disk.create() to create your swap image. Then you'd want to create your configuration profile using linode.config.create().
I don't have any example code to show as this would depend which library you use to interact with the Linode API. You could either use the Linode binding, or something like 'requests' to make the HTTPS requests and handle the responses on your own.
-Tim