VMware Cloud Community
fc989
Contributor
Contributor

Documentation for vROPS Rest api parameters call to figure out when VMs were powered off

Hi,

I am trying to gather when certain virtual machines were powered off within the last 2 months in a rest call.  I see in the API documentation how to get the stat keys and make the calls but I don't know what possible values I can put in for rollUpType, intervalQuantifier, etc.  Here is what I used (statKey sys|poweredOn) but all are get in the response are the timestamps with a data value of 1.0 and I know this VM was powered off 30 days ago so it wasn't correct. 

The other stat key: "summary|poweredOff" produced all data values of 0.0

Rest call:  https:{{VROPS_Server}}/suite-api/api/resources/stats/query

 

Body of POST:

{
"begin": {{epochPrev60}},
"end": {{epoch}},
"rollUpType" : "MIN",
"intervalType" : "MINUTES",
"intervalQuantifier" : "60",
"resourceId": [
"{{resourceid}}"
],
"statKey": [
"summary|poweredOff"
]
}

 

Thanks in advance,

0 Kudos
1 Reply
fc989
Contributor
Contributor

I also tried the following without rollUpType, intervalType and intervalQuantifier and it worked.

 

{
"begin": {{epochPrev60}},
"end": {{epoch}},
"resourceId": [
"{{resourceid}}"
],
"statKey": [
"summary|poweredOff"
]
}

0 Kudos