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

# List cost composition

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

Retrieving the cost composition with respect to specified filters. Retrieving information such as the total cost for the given time range, and the top services by cost.

## Query parameters

- `connector` string[]
- `connectionId` string[]
- `connectionGroup` string[]
- `top` integer
- `startTime` integer
- `endTime` integer

## Response `200`

OK

- GithubComOpengovernOpengovernancePkgInventoryApiListCostCompositionResponse
  - `others` number
  - `top_values` object
  - `total_cost_value` 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)
