The below is an example. "cursor" and "result_count" are missing.
root@manager:~# curl -k -u 'admin:<password>' -X GET https://localhost/policy/api/v1/infra/realized-state/virtual-machines?page_size=1 { "results": [ { "host_id": "a4c4a5b3-4a2c-45df-####-#############", "source": { "target_id": "a4c4a5b3-4a2c-####-#############", "target_display_name": "tn", "target_type": "HostNode", "is_valid": true }, "external_id": "5222c257-bedd-34a2-####-#############", "power_state": "VM_STOPPED", "local_id_on_host": "4", "compute_ids": [ "moIdOnHost:4", "hostLocalId:4", "locationId:564de87f-cf88-c647-####-#############", "instanceUuid:5222c257-bedd-34a2-####-#############", "externalId:5222c257-bedd-34a2-####-#############", "biosUuid:564de87f-cf88-c647-####-#############" ], "type": "REGULAR", "resource_type": "VirtualMachine", "display_name": "vm1", "_last_sync_time": 1612518456279 } ] }
This issue is resolved in VMware NSX 3.2.0 and later versions, available at Broadcom downloads.
If you are having difficulty finding and downloading software, please review the Download Broadcom products and software KB.
Workaround:
Use GET /api/v1/fabric/virtual-machines API
.