Postman (or similar) application for opennebula API

Ok Bojan!, this is what I’ve tested so far.

I’ve installed this Chrome extension (chrome-extension://mbelaappiaalhoceejaopcghdlnhhain/main.html) which is an XML-RPC client. I’ve entered my OpenNebula testing URL endpoint: http://192.168.121.123:2633/RPC2

Then I’ve clicked on Get methods and… every method listed in the docs are there automagically: http://docs.opennebula.org/5.2/integration/system_interfaces/api.html

So I’ve tried to get the info for a VM with ID = 1. I’ve selected the one.vm.info method which requires two parameters IN according to docs the session string (you can use the content of the /var/lib/one/.one/one_auth file) and the ID of the VM so you have to set those IN parameters in a JSON array in this example: [“oneadmin:opennebula”,1] oneadmin:opennebula is the content of the one_auth file. OK I click on send and it works!

Al those CDATA and &lt and &gt are part of the xml response with comes as a string.

I’ve done the same thing with POSTMAN but it’s a little harder:

I’ve tried to run the one.vmpool.info which provides the onevm list… in XML-RPC client I’ve tried to use the following array [“oneadmin:opennebula”, -2,-1,-1,-1] according to the docs and I think it dumps all the info about VMs:

So next step would be how to parse all that data, so I guess now that a programming language would be helpful to parse the answer and all that stuff!

I’ve found this URL quite interesting to understand how I should prepare the POSTMAN parameters (http://xmlrpc.scripting.com/spec.html)

Cheers!

1 Like