VMware {code} Community
qedroger
Contributor
Contributor

Using data API

I discovered the API explorer part of our vCenter and I have had some success pulling information about VM’s. What I’m really interested in is the Metrics and Data Points API’s. I haven’t had much luck with getting useful information out of them. Under the Metrics portion I can pull the list of the available metrics but when I use the data part to actually get the data I get empty returns. This is the result for not specifying any metrics on the data API. It’s just empty.

curl -X GET 'https://{myvcenter}/api/stats/data/dp?metric=cpu.capacity.usage' -H 'vmware-api-session-id: {mysessionid}'

This is the entirety of the response.  What am I doing wrong?  {myvcenter} and {mysessionid} are just place holders for the real information.  I

 VstatsDataDataPointsResult 

 
 

  {

  • "data_points":  [ ]
    [
     
    ]

} 

Reply
0 Kudos
0 Replies