我无法列出v3版本的虚拟机,我有相同的错误与API explorer,我有一个错误403,我的集群是版本5.5.3.1,你可以帮助我吗?
代码:
代码:
$ username =“admin”;
密码=美元“通过”;
美元url2 = " https://a01ntnx003:9440 / api / nutanix / v3 / vm /列表”;
美元data_string2 = '{\“\”:\“vm \”}';
(ch2 = curl_init美元url2);
curl_setopt (ch2美元,CURLOPT_CUSTOMREQUEST,“文章”);
curl_setopt ($ ch2 CURLOPT_POSTFIELDS data_string2美元);
curl_setopt ($ ch2 CURLOPT_HTTPAUTH CURLAUTH_BASIC);
curl_setopt (ch2美元,CURLOPT_USERPWD,“用户名:密码美元”);
curl_setopt ($ ch2 CURLOPT_RETURNTRANSFER真实);
curl_setopt ($ ch2 CURLOPT_SSL_VERIFYPEER假);
curl_setopt ($ ch2 CURLOPT_SSL_VERIFYHOST假);
$ data3 = curl_exec (ch2);
错误:
代码:
{"state": "ERROR", "code": 403, "message_list": [{"message": "请求的动作不被支持。","reason": "ACTION_NOT_SUPPORTED"}], "api_version": "3.0"}