Skip to content

HPE GreenLake Consumption Analytics Reports v2 API (1.0.0)

API reference documentation for the HPE GreenLake Consumption Analytics Reports v2 API

Overview
Languages
Servers
Production - US West

https://us-west.api.greenlake.hpe.com/

Mock server

https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/consumption-analytics/public/openapi/consumption-analytics-latest/v2/public-reports-v2/

Reports

Reference documentation for reporting operations.

Operations

List report definitions

Request

List the report definitions that are available to the caller.

Security
glcUserBearerAuth
Query
limitinteger(int64)[ 0 .. 100 ]

The maximum number of items to return.

Default 10
offsetinteger(int64)

The number of items to skip before starting to collect the result set.

Default 0
curl -i -X GET \
  https://us-west.api.greenlake.hpe.com/consumption-analytics/v2/reports \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Success

Bodyapplication/json
countinteger(int32)
itemsArray of objects(ReportIdentifierV2)
offsetinteger(int32)
totalinteger(int32)
Response
application/json

success

{ "count": 2, "total": 2, "offset": 0, "items": [ {}, {} ] }

Generate Report

Request

Generates the report based on report definition provided in the request body.

Security
glcUserBearerAuth
Bodyapplication/jsonrequired

The request body containing the details for executing the report.

filterobject(ReportFilter)required
filter.​dateFilterobject(ReportDateFilter)required
filter.​dateFilter.​typestringrequired

Defines whether the filter uses a relative date range or an absolute date range.

Enum"ABSOLUTE""RELATIVE"
filter.​dateFilter.​endDatestring(date)

The end date of the filter range. Used when the type is ABSOLUTE.

filter.​dateFilter.​relativeRangestring

A predefined time period relative to the current date. Used when the type is set to RELATIVE.

Enum"YESTERDAY""LAST_7_DAYS""LAST_14_DAYS"
filter.​dateFilter.​startDatestring(date)

The start date of the filter range. Used when the type is ABSOLUTE.

filter.​fieldFiltersArray of objects(ReportFieldCriteria)required

A list of field-level filter conditions that apply to the report. Each condition specifies a field, comparison operator, and one or more values.

filter.​fieldFilters[].​namestringrequired

The name of the field to filter on.

filter.​fieldFilters[].​operatorstringrequired

The comparison operator used to evaluate the field's value.

Enum"EQ""NOT_EQ""IN"
filter.​fieldFilters[].​valuesArray of arraysrequired

One or more values to be used for filtering. Can be strings, numbers, or dates, depending on the field type and operator.

curl -i -X POST \
  https://us-west.api.greenlake.hpe.com/consumption-analytics/v2/reports/execute \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "filter": {
      "dateFilter": {
        "type": "ABSOLUTE"
      },
      "fieldFilters": [
        {
          "name": "string",
          "operator": "EQ",
          "values": []
        }
      ]
    }
  }'

Responses

Report generated successfully

Bodyapplication/json
itemsArray of objects
totalCountinteger(int32)
Response
application/json

success

{ "totalCount": 2, "items": [ {}, {} ] }

Generate Report for saved definition

Request

Executes a report for a saved definition; specify the date range in the request body.

Security
glcUserBearerAuth
Path
idstring(uuid)[ 32 .. 36 ] characters^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{...required

The ID of the report to export.

Example: 7021d69d-de13-44bd-97e1-dbb05eef0759
Bodyapplication/jsonrequired
endDatestring
relativeDatestring
startDatestring
curl -i -X POST \
  https://us-west.api.greenlake.hpe.com/consumption-analytics/v2/reports/7021d69d-de13-44bd-97e1-dbb05eef0759/execute \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{}'

Responses

The exported report as a JSON file

Bodyapplication/json
itemsArray of objects
totalCountinteger(int32)
Response
application/json

success

{ "totalCount": 2, "items": [ {}, {} ] }