---
title: "Get Spend Trend"
method: GET
path: "/inventory/api/v2/analytics/spend/table"
tags: ["analytics"]
---

# Get Spend Trend

`GET /inventory/api/v2/analytics/spend/table`

## Request

- Base URL: `https://api.opengovernance.io`
- URL: `https://api.opengovernance.io/inventory/api/v2/analytics/spend/table`
- Auth: API key in header `Authorization`

Returns spend table with respect to the dimension and granularity

## Query parameters

- `startTime` integer
- `endTime` integer
- `granularity` 'monthly' | 'daily' | 'yearly'
- `dimension` 'connection' | 'metric'
- `connectionId` string[]
- `connectionGroup` string[]
- `connector` string[]
- `metricIds` string[]

## Response `200`

OK

- GithubComOpengovernOpengovernancePkgInventoryApiSpendTableRow[]
  - `accountID` string
  - `category` string
  - `costValue` object
  - `dimensionId` string
  - `dimensionName` string
  - `integrationType` string

---

[API](https://skmtc.dev/opengovern/apis/opengovernance-service-api.md) - [All operations](https://skmtc.dev/opengovern/apis/opengovernance-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/opengovern/apis/opengovernance-service-api/revisions/ab05295c4094?raw)
