/reports

GET
https://sample-api.d-velop.cloud
Get a consumption report. For details, see the additional documentation for the report schema.
Parameters
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

Language

const options = {method: 'GET', headers: {accept: 'application/json'}};

fetch('https://example.com/%7BbasePath%7D/reports', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));