问题描述
我正在尝试在 VmWare Workstation 16 中使用 REST API 的以下功能:
/vms/{id}/configparams update the vm config params
CURL 命令是:
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
响应是:
未找到 404 页面
另一方面,当我尝试以下功能时
/vms/{id} Updates the VM settings
CURL 命令是:
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
响应是:
{
"id": "78BC37CO4B5GCTSVHKPVEIHGQ4DBQK1K","cpu": {
"processors": 2
},"memory": 1024
}
REST API 似乎没有正确响应第二个 URL,有人可以帮助我吗?
提前致谢,问候
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)