When using API call /api/resources/stats/latest/query with a VM resourceID and the statKey net|usage_average the API server returns not only the requested key net|usage_average, but also net:4000|usage_average, net:vmnic0|usage_average,net:vmnic1|usage_average... statkeys. Is there any way to prevent returning the extra keys?
Environment
VMware Aria Operations 8.x
Cause
The metrics boolean was not part of the API call and defaulted to a value of false. The metrics boolean indicates whether specified statKey-s of query should be forcibly treated as metrics (does not include instanced stats.)
Resolution
Navigate in the UI to Home > Developer Center and click API Documentation
Click Authorize and provide credentials
Expand Resources and expand GET /api/resources/stats/latest
Click Try it out
Click the dropdown selector for the metrics boolen and select true
Click Add Item for resourceID and type the resourceId(s) for a VM
Click Add Item for statKey and type net|usage_average