I can not list the VMs with the v3 version, I have the same error with the API explorer, I have an error 403, my cluster is in version 5.5.3.1 can you help me?
Code:
code:
$username = 'admin';
$password = "pass";
$url2 = "https://a01ntnx003:9440/api/nutanix/v3/vms/list";
$data_string2 = '{\"kind\":\"vm\"}';
$ch2 = curl_init($url2);
curl_setopt($ch2, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch2, CURLOPT_POSTFIELDS, $data_string2);
curl_setopt($ch2, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch2, CURLOPT_USERPWD, "$username:$password");
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch2, CURLOPT_SSL_VERIFYHOST, false);
$data3 = curl_exec($ch2);
Error:
code:
{ "state": "ERROR", "code": 403, "message_list": [ { "message": "Requested action is not supported.", "reason": "ACTION_NOT_SUPPORTED" } ], "api_version": "3.0" }