Creating an API for XCP-ng tasks
Why not using XO API then? What's not covered there for what you need?
I can't find any detailed documentation on how to access and use the API, i could only find the xo-cli command reference guide.
We want to create XEN functions (start/restart/shutdown) from our web application which is PHP.
Is there a set of docs somewhere ?
Each feature you can access with
xo-clican be called with XO API. It's JSON-RPC, so it will be easy to call it in PHP (for example).
Is there a definitive guide for the xo-cli commands ?
Where can I find an example of a JSON-RPC call that we can learn from ?
Pinging @julien-f to give you a good answer
xo-cliis an advanced tool, mainly for the developers of XO, but useful for advanced users well
There is no guide of commands, it uses introspection to get the available commands from
For more information, take a look at the documentation.
I have played with xo-cli and have an idea on it's workings, however that's not useful for creating scripts to utilise the API.
I want to understand how to form an API instruction to perform a task.
Is there a guide to creating JSON-RPC scripts that work with XO Server?
You can call the method
system.getMethodsInfoto see which methods are available.
You can use
We had a discussion with our developer on Friday and he was recommending we look at ovirt to achieve our goal here, but I am not yet convinced we need to start down that path.
We've run XEN/XCP in our environment since version 5, hence I am keen to continue with it as our core, however customer service is a growing issue for us as our customers are complaining about lack of self-service capability which is fair enough.
Thanks for your help.
oVirt is the same concept, the only diff is maybe a REST API, but otherwise it's really similar (but even a bit harder to setup).
Anyway, if you need assistance on API calls, let us know.