XO Rest API
-
Great For the version from the sources, it doesn't matter that you have paid support or not: you must use it with latest commits as possible For XOA, then it's up to the support to answer you
-
@olivierlambert omg I'll upgrade the XO. My question is still same, why the rest-api is not responding properly when I hit it from postman and the same api is responding with error when using
xo-cli
-
It looks like that's not possible to specify the CPU ??! with the /rest/v0/pools/{{pool_id}}/actions/create_vm
-
What do you mean by "specify the CPU"?
-
@olivierlambert I'm not able to specify the number of vCPU for the VM
-
Are you fully up to date? Also pinging @julien-f about this.
-
@olivierlambert yes I think so.
Here is the result of /rest/v0/pools/_/actions/create_vm (there is no cpu parameter)
{ "params": { "affinity": { "type": "string", "optional": true }, "auto_poweron": { "type": "boolean", "optional": true }, "boot": { "type": "boolean", "default": false }, "clone": { "type": "boolean", "default": true }, "cloud_config": { "type": "string", "optional": true }, "destroy_cloud_config_vdi": { "type": "boolean", "default": false }, "install": { "type": "object", "optional": true, "properties": { "method": { "enum": [ "cdrom", "network" ] }, "repository": { "type": "string" } } }, "memory": { "type": "integer", "optional": true }, "name_description": { "type": "string", "minLength": 0, "optional": true }, "name_label": { "type": "string" }, "network_config": { "type": "string", "optional": true }, "template": { "type": "string" }, "vdis": { "type": "array", "default": [], "items": { "type": "object", "properties": { "destroy": { "type": "boolean", "optional": true }, "userdevice": { "type": "string", "optional": true }, "size": { "type": "number", "optional": true }, "sr": { "type": "string", "optional": true }, "name_description": { "type": "string", "optional": true }, "name_label": { "type": "string", "optional": true } }, "if": { "not": { "required": [ "userdevice" ] } }, "then": { "required": [ "size", "name_label" ], "not": { "required": [ "destroy" ] } } } }, "vifs": { "default": [], "type": "array", "items": { "type": "object", "properties": { "destroy": { "type": "boolean", "optional": true }, "device": { "type": "string", "optional": true }, "ipv4_allowed": { "type": "array", "items": { "type": "string" }, "optional": true }, "ipv6_allowed": { "type": "array", "items": { "type": "string" }, "optional": true }, "mac": { "type": "string", "optional": true }, "network": { "type": "string", "optional": true } } } } } }
-
@df-cgdm You are correct. That feature isn't currently available via the REST APIs as previously mentioned by Julien earlier in this thread.
-
@Danp For now I'm going with
JSON-RPC
for only VM creation and for listings I'm usingrest-apis
. When XO6 will release I'll change the endpoint with rest endpoint. @olivierlambert any expected release date for XO6? -
It's rolled out progressively: every bit of UI that's exposed will use the REST API, so both a getting more stuff every release. You can already use some bits of the REST API like you can already use XO 6 UI with
/v6
-
Yes, you can use JSON-RPC et REST APIs together for now
We will try to add support for CPU settings soon.
Also, expect things to accelerate in 2025 regarding the REST API.