<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[XO Rest API]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/julien-f" aria-label="Profile: julien-f">@<bdi>julien-f</bdi></a>,</p>
<p dir="auto">Thank you for your efforts in creating the REST endpoints. I want to create VMs using the REST API of XO, but I need a little help in this regard. Could you please provide the endpoint or the request structure for creating VMs?</p>
<p dir="auto">My connection is working perfectly fine.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1734335738837-e2508a4d-ebc7-48e9-8306-fcd7519f005f-image.png" alt="e2508a4d-ebc7-48e9-8306-fcd7519f005f-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://xcp-ng.org/forum/topic/10123/xo-rest-api</link><generator>RSS for Node</generator><lastBuildDate>Tue, 16 Jun 2026 00:34:57 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/10123.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Dec 2024 07:56:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to XO Rest API on Wed, 08 Jan 2025 16:14:09 GMT]]></title><description><![CDATA[<p dir="auto">Yes, you can use JSON-RPC et REST APIs together for now <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=1e2d7c4c493" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">We will try to add support for CPU settings soon.</p>
<p dir="auto">Also, expect things to accelerate in 2025 regarding the REST API.</p>
]]></description><link>https://xcp-ng.org/forum/post/87887</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87887</guid><dc:creator><![CDATA[julien-f]]></dc:creator><pubDate>Wed, 08 Jan 2025 16:14:09 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Wed, 08 Jan 2025 13:43:43 GMT]]></title><description><![CDATA[<p dir="auto">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 <code>/v6</code></p>
]]></description><link>https://xcp-ng.org/forum/post/87869</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87869</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Wed, 08 Jan 2025 13:43:43 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Wed, 08 Jan 2025 11:48:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/danp" aria-label="Profile: Danp">@<bdi>Danp</bdi></a> For now I'm going with <code>JSON-RPC</code> for only VM creation and for listings I'm using <code>rest-apis</code>. When XO6 will release I'll change the endpoint with rest endpoint. <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> any expected release date for XO6?</p>
]]></description><link>https://xcp-ng.org/forum/post/87858</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87858</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Wed, 08 Jan 2025 11:48:47 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Wed, 08 Jan 2025 11:15:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/df-cgdm" aria-label="Profile: df-cgdm">@<bdi>df-cgdm</bdi></a> You are correct. That feature isn't currently available via the REST APIs as previously mentioned by Julien <a href="https://xcp-ng.org/forum/post/87530">earlier in this thread</a>.</p>
]]></description><link>https://xcp-ng.org/forum/post/87855</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87855</guid><dc:creator><![CDATA[Danp]]></dc:creator><pubDate>Wed, 08 Jan 2025 11:15:14 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Wed, 08 Jan 2025 09:17:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> yes I think so.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1736327740014-xoa.jpg" alt="XOA.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Here is the result of /rest/v0/pools/_/actions/create_vm (there is no cpu parameter)</p>
<pre><code>{
  "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
          }
        }
      }
    }
  }
}
</code></pre>
]]></description><link>https://xcp-ng.org/forum/post/87842</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87842</guid><dc:creator><![CDATA[df-cgdm]]></dc:creator><pubDate>Wed, 08 Jan 2025 09:17:23 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Wed, 08 Jan 2025 08:43:22 GMT]]></title><description><![CDATA[<p dir="auto">Are you fully up to date? Also pinging <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/julien-f" aria-label="Profile: julien-f">@<bdi>julien-f</bdi></a> about this.</p>
]]></description><link>https://xcp-ng.org/forum/post/87840</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87840</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Wed, 08 Jan 2025 08:43:22 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Wed, 08 Jan 2025 08:12:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> I'm not able to specify the number of vCPU for the VM</p>
]]></description><link>https://xcp-ng.org/forum/post/87838</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87838</guid><dc:creator><![CDATA[df-cgdm]]></dc:creator><pubDate>Wed, 08 Jan 2025 08:12:54 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Wed, 08 Jan 2025 07:53:24 GMT]]></title><description><![CDATA[<p dir="auto">What do you mean by "specify the CPU"?</p>
]]></description><link>https://xcp-ng.org/forum/post/87833</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87833</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Wed, 08 Jan 2025 07:53:24 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Tue, 07 Jan 2025 16:09:58 GMT]]></title><description><![CDATA[<p dir="auto">It looks like that's not possible to specify the CPU ??! with the /rest/v0/pools/{{pool_id}}/actions/create_vm</p>
]]></description><link>https://xcp-ng.org/forum/post/87810</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87810</guid><dc:creator><![CDATA[df-cgdm]]></dc:creator><pubDate>Tue, 07 Jan 2025 16:09:58 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Fri, 03 Jan 2025 09:10:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> omg <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f635.png?v=1e2d7c4c493" class="not-responsive emoji emoji-android emoji--dizzy_face" style="height:23px;width:auto;vertical-align:middle" title=":dizzy_face:" alt="😵" /> 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 <code>xo-cli</code> <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60a.png?v=1e2d7c4c493" class="not-responsive emoji emoji-android emoji--blush" style="height:23px;width:auto;vertical-align:middle" title=":blush:" alt="😊" /></p>
]]></description><link>https://xcp-ng.org/forum/post/87607</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87607</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Fri, 03 Jan 2025 09:10:21 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Fri, 03 Jan 2025 08:44:32 GMT]]></title><description><![CDATA[<p dir="auto">Great <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=1e2d7c4c493" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> 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 <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=1e2d7c4c493" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> For XOA, then it's up to the support to answer you <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=1e2d7c4c493" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://xcp-ng.org/forum/post/87606</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87606</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Fri, 03 Jan 2025 08:44:32 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Fri, 03 Jan 2025 05:34:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> Thank you for your time. I've a paid subscription but I am using XO from sources. I've opened a ticket from the help desk <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f622.png?v=1e2d7c4c493" class="not-responsive emoji emoji-android emoji--cry" style="height:23px;width:auto;vertical-align:middle" title=":cry:" alt="😢" /></p>
]]></description><link>https://xcp-ng.org/forum/post/87600</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87600</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Fri, 03 Jan 2025 05:34:48 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 18:35:49 GMT]]></title><description><![CDATA[<p dir="auto">I strongly suggest to read this part of the doc: <a href="https://docs.xen-orchestra.com/community" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.xen-orchestra.com/community</a></p>
<p dir="auto">And especially with this big yellow warning: <a href="https://docs.xen-orchestra.com/community#report-a-bug" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.xen-orchestra.com/community#report-a-bug</a></p>
]]></description><link>https://xcp-ng.org/forum/post/87576</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87576</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Thu, 02 Jan 2025 18:35:49 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 17:49:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/danp" aria-label="Profile: Danp">@<bdi>Danp</bdi></a> said in <a href="/forum/post/87554">XO Rest API</a>:</p>
<blockquote>
<p dir="auto">Is your VM up-to-date with the latest sources?</p>
</blockquote>
<p dir="auto"><img src="/forum/assets/uploads/files/1735840011782-8892b31b-6087-4951-af2d-a4f8b4a2d0bd-image.png" alt="8892b31b-6087-4951-af2d-a4f8b4a2d0bd-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Yes I configured the XO from sources and it's not up to date. Should I update my XO and will it fix the issue or not?</p>
]]></description><link>https://xcp-ng.org/forum/post/87571</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87571</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Thu, 02 Jan 2025 17:49:23 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 17:40:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/danp" aria-label="Profile: Danp">@<bdi>Danp</bdi></a> template info via rest-api</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1735839636613-a227dc22-db3a-41b3-bc5b-9fa766784905-image.png" alt="a227dc22-db3a-41b3-bc5b-9fa766784905-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://xcp-ng.org/forum/post/87570</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87570</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Thu, 02 Jan 2025 17:40:57 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 17:39:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/danp" aria-label="Profile: Danp">@<bdi>Danp</bdi></a> said in <a href="/forum/post/87554">XO Rest API</a>:</p>
<blockquote>
<p dir="auto">xo-cli --list-objects type=VM-template uuid=f6745939-cc54-fa9c-5169-6f14ba830a6a</p>
<p dir="auto">Reply</p>
</blockquote>
<pre><code>C:\Users\PC&gt;xo-cli --list-objects type=VM-template uuid=f6745939-cc54-fa9c-5169-6f14ba830a6a
`--list-objects` is deprecated and will be removed in the future, use `list-objects` subcommand instead

[
{
  "type": "VM-template",
  "addresses": {},
  "auto_poweron": false,
  "bios_strings": {
    "bios-vendor": "Xen",
    "bios-version": "",
    "system-manufacturer": "Xen",
    "system-product-name": "HVM domU",
    "system-version": "",
    "system-serial-number": "",
    "baseboard-manufacturer": "",
    "baseboard-product-name": "",
    "baseboard-version": "",
    "baseboard-serial-number": "",
    "baseboard-asset-tag": "",
    "baseboard-location-in-chassis": "",
    "enclosure-asset-tag": "",
    "hp-rombios": "",
    "oem-1": "Xen",
    "oem-2": "MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d"
  },
  "blockedOperations": {},
  "boot": {
    "order": "cdn"
  },
  "CPUs": {
    "max": 2,
    "number": 2
  },
  "current_operations": {},
  "expNestedHvm": false,
  "viridian": true,
  "high_availability": "",
  "isFirmwareSupported": true,
  "memory": {
    "dynamic": [
      2147483648,
      2147483648
    ],
    "static": [
      2147483648,
      2147483648
    ],
    "size": 2147483648
  },
  "installTime": null,
  "name_description": "Ubuntu Linux (64-bit)",
  "name_label": "ubuntu22image",
  "needsVtpm": false,
  "other": {
    "import_task": "OpaqueRef:a36b7087-b9a2-4e31-96c6-a0e95a0b280f",
    "mac_seed": "09d66866-7e77-af81-7432-3d5b48caa0d0",
    "vgpu_pci": "",
    "base_template_name": "Other install media",
    "install-methods": "cdrom"
  },
  "os_version": {},
  "power_state": "Halted",
  "hasVendorDevice": false,
  "snapshots": [],
  "startDelay": 0,
  "startTime": null,
  "secureBoot": false,
  "tags": [],
  "VIFs": [],
  "VTPMs": [],
  "virtualizationMode": "hvm",
  "$container": "d1aa29fb-9fed-e39b-0f88-fc4ebbd42d3f",
  "$VBDs": [
    "11bb8f2c-6cd0-e55a-9ff1-6d9b14689237"
  ],
  "VGPUs": [],
  "$VGPUs": [],
  "xenStoreData": {
    "vm-data/mmio-hole-size": "268435456",
    "vm-data": ""
  },
  "vga": "cirrus",
  "videoram": 4,
  "isDefaultTemplate": false,
  "template_info": {
    "disks": [],
    "install_methods": [
      "cdrom"
    ]
  },
  "cpuWeight": 256,
  "id": "f6745939-cc54-fa9c-5169-6f14ba830a6a",
  "uuid": "f6745939-cc54-fa9c-5169-6f14ba830a6a",
  "$pool": "d1aa29fb-9fed-e39b-0f88-fc4ebbd42d3f",
  "$poolId": "d1aa29fb-9fed-e39b-0f88-fc4ebbd42d3f",
  "_xapiRef": "OpaqueRef:ce5af387-410c-4e10-8eaf-46315b980ed2"
}
]
</code></pre>
]]></description><link>https://xcp-ng.org/forum/post/87569</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87569</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Thu, 02 Jan 2025 17:39:14 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 13:41:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/irtaza9" aria-label="Profile: irtaza9">@<bdi>irtaza9</bdi></a> I assume that you are running XO from the sources. Is your VM up-to-date with the latest sources?</p>
<p dir="auto">Are you sure a template with that UUID exists for the target pool? What does the following command return?</p>
<p dir="auto"><code>xo-cli --list-objects type=VM-template uuid=f6745939-cc54-fa9c-5169-6f14ba830a6a</code></p>
]]></description><link>https://xcp-ng.org/forum/post/87554</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87554</guid><dc:creator><![CDATA[Danp]]></dc:creator><pubDate>Thu, 02 Jan 2025 13:41:34 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 12:32:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/danp" aria-label="Profile: Danp">@<bdi>Danp</bdi></a> for now I'm hitting cli for testing. This is the response im getting rn. The error is saying that the template doesn't exists in the pool, right? Also shared json-object is not giving the right response in postman.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1735821114145-a4e2124c-216e-4d43-978d-dd28e1d7c93d-image.png" alt="a4e2124c-216e-4d43-978d-dd28e1d7c93d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/forum/assets/uploads/files/1735820823041-65396814-2782-4a89-b290-9719e7e85cd8-image.png" alt="65396814-2782-4a89-b290-9719e7e85cd8-image.png" class=" img-fluid img-markdown" /></p>
<pre><code>"result": {
  "message": "no object with UUID or opaque ref: 'f6745939-cc54-fa9c-5169-6f14ba830a6a'",
  "name": "Error",
  "stack": "Error: no object with UUID or opaque ref: 'f6745939-cc54-fa9c-5169-6f14ba830a6a'\n    at Xapi.apply (file:///opt/xen-orchestra/packages/xen-api/index.mjs:726:11)\n    at Xapi.getObject (file:///opt/xen-orchestra/packages/xo-server/src/xapi/index.mjs:98:26)\n    at Xapi.apply (file:///opt/xen-orchestra/packages/xo-server/src/xapi/mixins/vm.mjs:63:27)\n    at Xapi.createVm (/opt/xen-orchestra/node_modules/golike-defer/src/index.js:85:19)\n    at apply (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/rest-api.mjs:715:38)\n    at fn (/opt/xen-orchestra/node_modules/golike-defer/src/index.js:85:19)\n    at file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/rest-api.mjs:1339:38\n    at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)\n    at Task.runInside (/opt/xen-orchestra/@vates/task/index.js:172:41)\n    at Task.run (/opt/xen-orchestra/@vates/task/index.js:156:31)\n    at file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/rest-api.mjs:1339:28\n    at Layer.handle [as handle_request] (/opt/xen-orchestra/node_modules/express/lib/router/layer.js:95:5)\n    at next (/opt/xen-orchestra/node_modules/express/lib/router/route.js:149:13)\n    at /opt/xen-orchestra/node_modules/body-parser/lib/read.js:137:5\n    at AsyncResource.runInAsyncScope (node:async_hooks:211:14)\n    at invokeCallback (/opt/xen-orchestra/node_modules/raw-body/index.js:238:16)\n    at done (/opt/xen-orchestra/node_modules/raw-body/index.js:227:7)\n    at IncomingMessage.onEnd (/opt/xen-orchestra/node_modules/raw-body/index.js:287:7)\n    at IncomingMessage.emit (node:events:518:28)\n    at IncomingMessage.patchedEmit [as emit] (/opt/xen-orchestra/@xen-orchestra/log/configure.js:52:17)\n    at endReadableNT (node:internal/streams/readable:1698:12)\n    at processTicksAndRejections (node:internal/process/task_queues:90:21)"
}
</code></pre>
]]></description><link>https://xcp-ng.org/forum/post/87549</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87549</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Thu, 02 Jan 2025 12:32:05 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 13:22:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/irtaza9" aria-label="Profile: irtaza9">@<bdi>irtaza9</bdi></a> Have you tried it with the body formatted like this?</p>
<pre><code class="language-json">{
	"boot": true,
	"memory": 2147483648,
	"name_label": "testingVM" ,
	"template": "f6745939-cc54-fa9c-5169-6f14ba830a6a" ,
	"auto_poweron": true
}
</code></pre>
]]></description><link>https://xcp-ng.org/forum/post/87547</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87547</guid><dc:creator><![CDATA[Danp]]></dc:creator><pubDate>Thu, 02 Jan 2025 13:22:09 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 11:23:21 GMT]]></title><description><![CDATA[<p dir="auto">This is the JSON-RPC send request and it's is using the same template which I'm using in above postman api call. If I pass all the params of JSON-RPC in<br />
<code>pools/_/actions/create_vm</code> does it support all the payload? Actually I want to create the VM programmatically.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1735816831168-fa9e92a8-b6a4-4661-b2ec-a10702004628-image.png" alt="fa9e92a8-b6a4-4661-b2ec-a10702004628-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://xcp-ng.org/forum/post/87545</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87545</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Thu, 02 Jan 2025 11:23:21 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 10:56:35 GMT]]></title><description><![CDATA[<p dir="auto">Also this is the task output in XO.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1735815376513-1ab20195-cf59-4d9d-a67d-a6e85b17f6a0-image.png" alt="1ab20195-cf59-4d9d-a67d-a6e85b17f6a0-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://xcp-ng.org/forum/post/87543</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87543</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Thu, 02 Jan 2025 10:56:35 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 10:50:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/julien-f" aria-label="Profile: julien-f">@<bdi>julien-f</bdi></a> I'm hitting the api in postman and this is the response i'm getting from the endpoint. My Pool is active and the template also is available. Can you please help me to solve this issue. Thank you.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1735814950071-af08d031-7919-4164-b652-ffe272ac0e50-image.png" alt="af08d031-7919-4164-b652-ffe272ac0e50-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://xcp-ng.org/forum/post/87542</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87542</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Thu, 02 Jan 2025 10:50:33 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Thu, 02 Jan 2025 09:05:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/irtaza9" aria-label="Profile: irtaza9">@<bdi>irtaza9</bdi></a> As explained in the documentation, the method is a <code>POST</code> (cf. <a href="https://github.com/vatesfr/xen-orchestra/blob/master/packages/xo-server/docs/rest-api.md#start-an-action" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/vatesfr/xen-orchestra/blob/master/packages/xo-server/docs/rest-api.md#start-an-action</a>).</p>
<p dir="auto">As explained in the documentation, you can list the available actions at <code>/rest/v0/pools/_/actions</code> and see the list of available params for a specific action by checking out its endpoint (<code>/rest/v0/pools/_/create_vm</code> for <code>create_vm</code>).</p>
<p dir="auto">To create/alter disks, you need to use the <code>vdis</code> param, if you do not see it on your instance, it means it is not up-to-date.</p>
<p dir="auto">CPU settings are not available at this time.</p>
]]></description><link>https://xcp-ng.org/forum/post/87530</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87530</guid><dc:creator><![CDATA[julien-f]]></dc:creator><pubDate>Thu, 02 Jan 2025 09:05:44 GMT</pubDate></item><item><title><![CDATA[Reply to XO Rest API on Tue, 31 Dec 2024 14:27:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/julien-f" aria-label="Profile: julien-f">@<bdi>julien-f</bdi></a> yes it is working, But when i pass the params as per shared in json-schema then nothing happens, no vm creation happens.</p>
<pre><code>POST {{host}}/rest/v0/pools/active_pool/actions/create_vm

{
    "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"
        }
    }
}
</code></pre>
<p dir="auto">where to pass cpu and disk variables in the payload? Is there any payload example which I used for the rest-api? Is the http method is POST or PUT?</p>
]]></description><link>https://xcp-ng.org/forum/post/87494</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87494</guid><dc:creator><![CDATA[irtaza9]]></dc:creator><pubDate>Tue, 31 Dec 2024 14:27:27 GMT</pubDate></item></channel></rss>