---
title: "GET /subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates"
method: GET
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates"
tags: ["UsageAggregates"]
---

# GET /subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates

`GET /subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates`

Query aggregated Azure subscription consumption data for a date range.

## Path parameters

- `subscriptionId` string, required

## Query parameters

- `reportedStartTime` string, date-time, required
- `reportedEndTime` string, date-time, required
- `showDetails` boolean
- `aggregationGranularity` 'Daily' | 'Hourly'
- `continuationToken` string
- `api-version` string, required

## Response `200`

Normal response for a successful query. The response body will contain the data that matches the filters specified in the query parameters.

- UsageAggregationListResult — The Get UsageAggregates operation response.
  - `value` UsageAggregation[] — Gets or sets details for the requested aggregation.
    - `id` string — Unique Id for the usage aggregate.
    - `name` string — Name of the usage aggregate.
    - `type` string — Type of the resource being returned.
    - `properties` UsageSample — Describes a sample of the usageAggregation.
      - `subscriptionId` string, uuid — The subscription identifier for the Azure user.
      - `meterId` string — Unique ID for the resource that was consumed (aka ResourceID).
      - `usageStartTime` string, date-time — UTC start time for the usage bucket to which this usage aggregate belongs.
      - `usageEndTime` string, date-time — UTC end time for the usage bucket to which this usage aggregate belongs.
      - `quantity` number, float — The amount of the resource consumption that occurred in this time frame.
      - `unit` string — The unit in which the usage for this resource is being counted, e.g. Hours, GB.
      - `meterName` string — Friendly name of the resource being consumed.
      - `meterCategory` string — Category of the consumed resource.
      - `meterSubCategory` string — Sub-category of the consumed resource.
      - `meterRegion` string — Region of the meterId used for billing purposes
      - `infoFields` unknown
      - `instanceData` string — Key-value pairs of instance details represented as a string.
  - `nextLink` string — Gets or sets the link to the next set of results.

## Other responses

- `202` — Response indicating that a request has been accepted for processing. However, the processing has not been completed.
- `default` — Error response describing why the operation failed.

---

[API](https://skmtc.net/azure/apis/usagemanagementclient.md) · [All operations](https://skmtc.net/azure/apis/usagemanagementclient/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/usagemanagementclient/versions/323eec36de82/schema)
