/reports
GET
Get a consumption report.
For details, see the additional documentation for the report schema.
Parameters
startDate/string/required
The time period for which the report should be retrieved.
Valid values depend on the value of period.
If period is 'month', date must be a string with the following pattern: YYYYMM.
If period is 'day', date must be a string with the following pattern: YYYYMMDD.
period/string/required
The time period for which the report should be retrieved. Must be either 'day' or 'month'.
tenant/string/required
The tenant id for which the report should be retrieved.
app/string/required
The app id for which the report should be retrieved.
Responses
200
Successfully returned a report.
Content
Media type: application/json
{
"meta": {
"type": "object",
"description": "Contains metadata for this report.\n",
"properties": {
"startDate": {
"type": "string",
"format": "date",
"description": "The start date of the timespan for which this report contains data."
},
"endDate": {
"type": "string",
"format": "date",
"description": "The end date of the timespan for which this report contains data."
}
}
},
"consumption": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appId": {
"type": "string",
"description": "The ID of the app for which the consumption was aggregated."
},
"tenantId": {
"type": "string",
"description": "The ID of the tenant for which the consumption was aggregated."
},
"metric": {
"type": "string",
"description": "The name of the metric for which the consumption was aggregated."
},
"aggregations": {
"type": "object",
"description": "Contains the aggregated consumption values for each available aggregation.",
"properties": {
"average": {
"type": "number",
"description": "The numeric value created by the average aggregation ('avg')."
},
"sum": {
"type": "number",
"description": "The numeric value created by the sum aggregation ('sum')."
},
"max": {
"type": "number",
"description": "The numeric value created by the maximum aggregation ('max')."
},
"min": {
"type": "number",
"description": "The numeric value created by the minimum aggregation ('min')."
},
"distinctDetails": {
"type": "number",
"description": "The numeric value created by the countDistinctDetails aggregation ('countDistinctDetails')."
}
}
},
"billedAggregation": {
"type": "string",
"description": "The aggregation that was chosen by the app builder to be billing-relevant.",
"enum": [
"avg",
"sum",
"min",
"max",
"countDistinctDetails"
]
},
"billedValue": {
"type": "number",
"description": "The value created by the aggregation that was chosen by the app builder to be billing-relevant."
}
}
}
}
}
400
Bad Request
Content
Media type: application/json
{
"title": {
"type": "string"
}
}
401
Unauthorized
Content
Media type: application/json
{
"title": {
"type": "string"
}
}
403
Forbidden
Content
Media type: application/json
{
"title": {
"type": "string"
}
}
500
Internal Server Error
Content
Media type: application/json
{
"title": {
"type": "string"
}
}
Show operation