Why can't I pull an Instance Hours report with the Reporting API?
search cancel

Why can't I pull an Instance Hours report with the Reporting API?

book

Article ID: 283394

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

Our instance hours report (and other tabular reports like Underutilized RI) is not an OLAP graphical report so it's not available via the Reporting API endpoint.  The Reporting API can only query our visual OLAP reports. 

To get similar information, we recommend using an Assets API query similar to the following, which is listing InstanceUsageHours for active instances within a specific month: 

https://chapi.cloudhealthtech.com/api/search?api_key=<api_key>api_version=2&page=1&per_page=100&query=is_active=1&name=AwsInstanceUsageHoursMonthly&query=month='<month to be queried>'&tags='<tag key: tag value>'&include=instance

The per_page limits are between 100 - 1000 so you may need to page through the results. Tags should be written in a "key: value" format.

 

For more information on the platform API, see:  API Guide