API call /api/nutanix/v3/hosts/list shows error 500

Badge +1
Hi everyone,

I'm very new to Nutanix CE so I apologize in advance if I ask something that is obvious. I installed Nutanix CE as a VM on my vCenter and it was a straightforward process.

However, when I use API against the CVM, specifically call CVM_IP:9440/api/nutanix/v3/hosts/list, I get this strange error:


C:\Users\Jan\Downloads\curl-7.61.0-win64-mingw\bin>curl -X POST -u admin: -s --insecure --header "Content-Type: application/json" "https://:9440/api/nutanix/v3/hosts/list" -d {}
{"state": "ERROR", "code": 500, "message_list": [{"reason": "INTERNAL_ERROR", "message": "Internal Server Error. does not match ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ \nwhile setting 'ip' in ipmi_ \nwhile setting 'ipmi' in resources_ \nwhile setting 'resources' in host_status"}], "api_version": "3.1"}

The error seems to mention a RegEx for an IP address and it also mentions IPMI. As this Nutanix CE is a VM, I don't see any IPMI in the BIOS (as described in

Would anyone have any idea what is causing it and how to resolve it?

1 reply

Userlevel 1
Badge +9
for list endpoints try the following and build from there :

/usr/bin/curl --write-out '%{http_code}\n' --insecure -s -H Content-Type:application/json -H Accept:application/json -X POST -u admin: -d @list_vms_v3.json https://10.*.*.5:9440/api/nutanix/v3/vms/list | jq .

"filter": "",
"offset": 0,
"length": 10

for a specific item in the list output try the following json :

"filter": "vm_name==test",
"offset": 0,
"length": 10

all of the above applies to other list endpoints in say images for example ...