---
title: "List spend metrics"
method: GET
path: "/inventory/api/v2/analytics/spend/metric"
tags: ["analytics"]
---

# List spend metrics

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

Retrieving cost metrics with respect to specified filters. The API returns information such as the total cost and costs per each service based on the specified filters.

## Query parameters

- `filter` string
- `connector` string[]
- `connectionId` string[]
- `connectionGroup` string[]
- `startTime` integer
- `endTime` integer
- `sortBy` 'dimension' | 'cost' | 'growth' | 'growth_rate'
- `pageSize` integer
- `pageNumber` integer
- `metricIDs` string[]

## Response `200`

OK

- GithubComOpengovernOpengovernancePkgInventoryApiListCostMetricsResponse
  - `metrics` GithubComOpengovernOpengovernancePkgInventoryApiCostMetric[]
    - `cost_dimension_id` string
    - `cost_dimension_name` string
    - `daily_cost_at_end_time` number
    - `daily_cost_at_start_time` number
    - `finderPerConnectionQuery` string
    - `finderQuery` string
    - `integration_types` string[]
    - `total_cost` number
  - `total_cost` number
  - `total_count` integer

---

[API](https://skmtc.net/opengovern/apis/opengovernance-service-api.md) · [All operations](https://skmtc.net/opengovern/apis/opengovernance-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opengovern/opengovernance-service-api/versions/ab05295c4094/schema)
