v1

latestOpenAPI 3.0.12026-07-26152262362.2 KB
Reports

Run a query

Runs a report query with the specified configuration without persisting it. Fields that are not populated will use their default values if needed.

post/analytics/v1/reports/query

Request body

Example request

{
  "config": {
    "metrics": [
      {
        "type": "basic",
        "value": "cost"
      },
      {
        "type": "basic",
        "value": "usage"
      },
      {
        "type": "extended",
        "value": "amortized_cost"
      }
    ],
    "metricFilter": {
      "metric": {
        "type": "basic",
        "value": "cost"
      },
      "operator": "nb",
      "values": [
        -1,
        1
      ],
      "operand": "series_total"
    },
    "limitAggregation": "top",
    "limitByChange": {
      "metric": {
        "type": "basic",
        "value": "cost"
      },
      "changeType": "percentage",
      "operator": ">=",
      "values": [
        50
      ]
    },
    "aggregation": "total",
    "advancedAnalysis": {
      "forecast": false,
      "notTrending": false,
      "trendingDown": false,
      "trendingUp": false
    },
    "forecastSettings": {
      "mode": "totals",
      "futureTimeIntervals": 3
    },
    "timeInterval": "month",
    "dimensions": [
      {
        "id": "year",
        "type": "datetime"
      },
      {
        "id": "month",
        "type": "datetime"
      }
    ],
    "timeRange": {
      "amount": 3,
      "includeCurrent": false,
      "mode": "last",
      "unit": "month"
    },
    "includePromotionalCredits": false,
    "includeSubtotals": false,
    "filters": [
      {
        "id": "attribution",
        "type": "attribution",
        "values": [
          "RB8DndcxODriK83IBXXf",
          "D7r4znsTj2UC95zGnunW"
        ],
        "inverse": true
      },
      {
        "id": "cloud_provider",
        "type": "fixed",
        "values": [
          "amazon-web-services",
          "google-cloud",
          "microsoft-azure"
        ]
      }
    ],
    "group": [
      {
        "id": "service_description",
        "limit": {
          "metric": {
            "type": "basic",
            "value": "cost"
          },
          "sort": "a_to_z",
          "value": 0
        },
        "type": "fixed"
      }
    ],
    "layout": "table",
    "displayValues": "actuals_only",
    "currency": "USD",
    "sortGroups": "a_to_z",
    "sortDimensions": "a_to_z",
    "dataSource": "billing"
  }
}

Response

OK - The request succeeded.