XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Trouble Creating VM via API

    Scheduled Pinned Locked Moved REST API
    3 Posts 2 Posters 23 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      bryonadams
      last edited by

      I'm very new to doing things with APIs and running into this error. What exactly does "is an excess property and therefore is not allowed" mean as a response? Below is the body I'm sending via Bruno client. I'm sure I'm missing something simple, the docs were a bit of a struggle though.

      Endpoint is https://xo.ducknet.org/rest/v0/pools/3c6777fc-e8d8-e065-7c30-37eb2800f472/actions/create_vm/

      {
        "auto_poweron": true,
        "boot": false,
        "memory": 1073741824,
        "name_description": "test_desc",
        "name_label": "test_label",
        "template": "3ceb66f7-c137-ef4a-7a06-9af524ed5110"
      }
      

      Full response

      {
        "error": {
          "body": {
            "message": "\"auto_poweron,memory,name_description\" is an excess property and therefore is not allowed",
            "value": {
              "name_description": "test_desc",
              "memory": 1073741824,
              "auto_poweron": true
            }
          }
        }
      }
      
      1 Reply Last reply Reply Quote 0
      • olivierlambertO Online
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Question for @lsouai-vates for the XO team

        1 Reply Last reply Reply Quote 0
        • B Offline
          bryonadams
          last edited by

          It looks like if I exclude those three values it makes the VM. So maybe the better question is; if I'm taking these values from the template, am I not meant to override them? The description seems like an odd one to not be able to override if that's how it works.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post