The MAC address for a given VNIC is not returned via the following API calls:
VMware Aria Operations for Networks (AON)
VMware vRealize Network Insight (vRNI)
This is a known issue affecting VCF Operations for Networks.
Workaround :
curl -X 'POST' \'https://<nsxt-ip>/api/ni/search/ql' \ -H 'accept: application/json' \ -H 'Authorization: NetworkInsight <token>' \ -H 'Content-Type: application/json' \ -d '{ "query": "Vnic where vm = '\''App-VM-1'\'' group by mac address", "size": 10}'****Output { "search_response_total_hits": 2, "groupby_response": { "results": [ { "bucket": [ { "value": "##:##:##:##:##:##" } ], "count": 1, "aggregations": [], "series_values": [] }, { "bucket": [ { "value": "##:##:##:##:##:##" } ], "count": 1, "aggregations": [], "series_values": [] } ], "size": 2, "total_bucket": { "value": 2, "is_approx": false }, "total_count": 2, "time_range": { "start_time": 1747374461, "end_time": 1747374461 } }
}
Vnic where name = '[App-VM-1]-[Network adapter 1]' group by mac addressReference Links :