---
title: "List values for group_by key used in service accounts"
method: POST
path: "/v2/billing/line_items_summary"
tags: ["Billing"]
---

# List values for group_by key used in service accounts

`POST /v2/billing/line_items_summary`

List values for group_by keys.

## Request body

- BillingLineItemSummaryRequest
  - `service_account_ids` string[] — Service Account IDs
  - `descendant_service_account_query` DescendantServiceAccountQuery
    - `service_account_ids` string[], required — Service account IDs that belong to the ancestors of matching accounts.
    - `include_self` boolean — Include the given service accounts in the result set
    - `include_billing_as_parent` boolean — Also include accounts whose billing_account_id matches any of the given accounts.
    - `include_resource_as_parent` boolean — Also include accounts whose resource_service_account_id matches any of the given accounts.
    - `include_commercial_as_parent` boolean — Also include AWS GovCloud accounts whose commercial_account_id matches any of the given accounts.
    - `exclude_service_account_ids` string[] — Service account IDs to excluded with descendants.
  - `for_platform` boolean — If set, redirect the query to billing platform line items summary collection
  - `skip_service_account_grouping` boolean — If set, do not group by service account
  - `key` BillingGroupByDetails, required
    - `selector` 'service_account_tags' | 'service_name' | 'tenant_id' | 'tenant_tags' | 'service_account_id' | 'delegate_service_account_id' | 'availability_zone' | 'billing_entity' | 'line_item_type' | 'location' | 'meter_sub_category' | 'pricing_category' | 'pricing_purchase_option' | 'product_category' | 'product_family' | 'product_service_code' | 'product_sku' | 'publisher' | 'resource_category' | 'resource_group' | 'resource_id' | 'resource_name' | 'resource_operation' | 'extras' | 'tags' | 'hierarchy' | 'dimension' | 'compartment_name' | 'compartment_id' | 'resource_type' | 'utilization_type', required — Dimension to group results by
    - `key` string — Key to use with Extras, Tags, Hierarchy, and Dimension
    - `value` string — Value to use with Extras, Tags and Hierarchy
    - `kind` string — Value to use in Tags
    - `groups` BillingCustomGroup[] — List of custom groups to use with Dimension
      - `attribute_value` string — Value for the group
      - `attribute_key` string — Key for the group
      - `filter` QueryOperator
        - `__type` string, required — Concrete type used for polymorphic deserialization (discriminator)
      - `grouping_rule_id` string — Grouping Rule ID
      - `dimension_id` string — Dimension ID

## Response `200`

Success

- ServiceAccountKeyValues[] — List of tag key/value pairs by service account
  - `service_account_id` string — Service Account ID
  - `values_by_key` KeyValues[] — List of tag key/value pairs for an account
    - `key` string — Key of the pair
    - `values` string[] — Values of the key

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

---

[API](https://skmtc.dev/corestack/apis/corestack-external-api.md) · [All operations](https://skmtc.dev/corestack/apis/corestack-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corestack/corestack-external-api/revisions/bf2cdf20826d/schema)
