I am trying to use the following function of the REST API in VmWare Workstation 16:
/vms/{id}/configparams update the vm config params
the CURL command is:
curl 'https://localhost:8697/api/vms/78BC37CO4B5GCTSVHKPVEIHGQ4DBQK1K/configparams' -X PUT --header 'Content-Type: application/vnd.vmware.vmw.rest-v1+json' --header 'Accept: text/plain' --header 'Authorization: Basic XXXXXXXXXXXXXXXXXX=' -d @- <<REQUEST_BODY
{
"name": "displayName",
"value": "test"
}
REQUEST_BODY
and the response is:
404 page not found
In the other hand when I try the following function
/vms/{id} Updates the VM settings
the CURL command is:
curl 'https://localhost:8697/api/vms/78BC37CO4B5GCTSVHKPVEIHGQ4DBQK1K' -X PUT --header 'Content-Type: application/vnd.vmware.vmw.rest-v1+json' --header 'Accept: application/vnd.vmware.vmw.rest-v1+json' --header 'Authorization: Basic XXXXXXXXXXXXXXXXXX=' -d @- <<REQUEST_BODY
{
"processors": 2,
"memory": 1024
}
REQUEST_BODY
and the response is:
{
"id": "78BC37CO4B5GCTSVHKPVEIHGQ4DBQK1K",
"cpu": {
"processors": 2
},
"memory": 1024
}
As you can see, the first function is not working correctly, while the second yes.
It seems that the REST API is not responding correctly to the second URL, please could someone help me?
Thanks in advance, regards
question from:
https://stackoverflow.com/questions/65928722/vmware-workstation-api-rest-failed-in-method-configparams 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…