v1

latestOpenAPI 3.0.12026-07-26152262362.2 KB
Reports

Update a report

Updates a report with the specified configuration.

Only specified fields will be updated.

patch/analytics/v1/reports/{id}

Path parameters

idstring required

Report ID. See Resource IDs.

Request body

descriptionstring

Report description

namestring

Report name

labelsstring[]

Array of label IDs assigned to the report

folderIdstring

Identifier of the folder that contains the report. Set to "root" if the report is at the top level (not in a folder).

Example request

{
  "config": {
    "timeRange": {
      "amount": 1,
      "includeCurrent": false,
      "mode": "last",
      "unit": "month"
    },
    "timeInterval": "week"
  },
  "description": "An update via API",
  "name": "A new name"
}

Response

OK - Report updated.

idstring

Report ID.

namestring required

Report name.

descriptionstring

Report description.

type'custom' | 'preset' | 'managed'

Report type.

labelsstring[]

Array of label IDs assigned to the report

folderIdstring

Identifier of the folder that contains the report. Set to "root" if the report is at the top level (not in a folder).

Example response

{
  "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"
  },
  "folderId": "root"
}