API response: "errors":{"newid":"property is missing and it is not optional"}

Lzkas

New Member
Jun 13, 2023
2
0
1
I would like to clone a server this is the API-Endpoint https://X.X.X.X:8006/api2/extjs/nodes/proxmox/qemu/100/clone,
And here is the request code:
JavaScript:
const options = {
  rejectUnauthorized: false,
  headers: {
    "Authorization": "PVEAPIToken=root@pam!admin=XxXxXxXxXxXxXxXxXxXxXxXxXx"
  },
  "body": "newid=103&target=proxmox&full=1",
  "method": "POST"
};

The response is:
Response status code: 400 Parameter verification failed. Response body: {"data":null,"errors":{"newid":"property is missing and it is not optional"}}
 
Last edited:
What library/framework do you use – without that information it's hard to tell if you direct it correctly w.r.t. assembling the request header and/or body...