Usage Details - List
Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later.
Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify customers once a date for retirement has been determined.For Learn more,see Generate Cost Details Report - Create Operation
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&$expand={$expand}&$filter={$filter}&$skiptoken={$skiptoken}&$top={$top}&metric={metric}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
scope
|
path | True |
string |
The fully qualified Azure Resource manager identifier of the resource. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
$expand
|
query |
string |
May be used to expand the properties/additionalInfo or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. |
|
|
$filter
|
query |
string |
May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). PublisherType Filter accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type |
|
|
$skiptoken
|
query |
string |
Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. |
|
|
$top
|
query |
integer (int32) minimum: 1maximum: 1000 |
May be used to limit the number of results to the most recent N usageDetails. |
|
|
metric
|
query |
Allows to select different type of cost/usage records. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. |
|
| 204 No Content |
Operation completed successfully. |
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
BillingAccountUsageDetailsList-Legacy
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000295194820065,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.000402776395232,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.7329,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 4.38
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
BillingAccountUsageDetailsList-Modern
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "modern",
"properties": {
"additionalInfo": "{ \"UsageType\": \"ComputeHR\", \"ImageType\": \"Windows Client BYOL\", \"ServiceType\": \"Standard_D1\", \"VMName\": null, \"VMProperties\": null, \"VCPUs\": 1, \"CPUs\": 0}",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "1234:56789",
"billingAccountName": "Account Name 1",
"billingCurrencyCode": "USD",
"billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
"billingProfileId": "2468",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"costCenter": "DEV",
"costInBillingCurrency": 1.84763819095477,
"costInPricingCurrency": 1.84763819095477,
"costInUSD": 1.84763819095477,
"customerName": "Modern Azure Customer 1",
"customerTenantId": "00000000-0000-0000-0000-000000000000",
"date": "2019-10-30T00:00:00.0000000Z",
"exchangeRate": "1",
"exchangeRateDate": "2019-09-30T00:00:00Z",
"exchangeRatePricingToBilling": 0.077,
"frequency": "UsageBased",
"instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"invoiceId": "",
"invoiceSectionId": "98765",
"invoiceSectionName": "Invoice Section 1",
"isAzureCreditEligible": false,
"marketPrice": 0.077,
"meterId": "00000000-0000-0000-0000-000000000000",
"partnerEarnedCreditApplied": "0",
"partnerEarnedCreditRate": 0.077,
"partnerName": "Partner Name 1",
"partnerTenantId": "00000000-0000-0000-0000-000000000000",
"paygCostInBillingCurrency": 1.848,
"paygCostInUSD": 1.848,
"previousInvoiceId": "",
"pricingCurrencyCode": "USD",
"product": "Virtual Machines D Series - D1 - US East",
"productIdentifier": "DZH318Z0BQ4B00FV",
"productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
"productOrderName": "Azure plan",
"publisherId": "",
"publisherName": "Microsoft",
"publisherType": "Microsoft",
"quantity": 0.7329,
"resellerMpnId": "",
"resellerName": "Reseller Name 1",
"reservationId": "",
"reservationName": "",
"resourceGroup": "Resource Group 1",
"resourceLocation": "USEast",
"resourceLocationNormalized": "US East",
"serviceInfo1": "",
"serviceInfo2": "Windows Client BYOL",
"servicePeriodEndDate": "2019-12-01T00:00:00Z",
"servicePeriodStartDate": "2019-09-01T00:00:00Z",
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"term": "",
"unitPrice": 4.38
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
BillingAccountUsageDetailsListForBillingPeriod-Legacy
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000342194841184,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.010534556373432,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.8234,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 3.74
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
BillingProfileUsageDetailsList-Modern
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/billingProfiles/2468/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/billingProfiles/2468/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "modern",
"properties": {
"additionalInfo": "{ \"UsageType\": \"ComputeHR\", \"ImageType\": \"Windows Client BYOL\", \"ServiceType\": \"Standard_D1\", \"VMName\": null, \"VMProperties\": null, \"VCPUs\": 1, \"CPUs\": 0}",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "1234:56789",
"billingAccountName": "Account Name 1",
"billingCurrencyCode": "USD",
"billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
"billingProfileId": "2468",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"costCenter": "DEV",
"costInBillingCurrency": 1.84763819095477,
"costInPricingCurrency": 1.84763819095477,
"costInUSD": 1.84763819095477,
"customerName": "Modern Azure Customer 1",
"customerTenantId": "00000000-0000-0000-0000-000000000000",
"date": "2019-10-30T00:00:00.0000000Z",
"exchangeRate": "1",
"exchangeRateDate": "2019-09-30T00:00:00Z",
"exchangeRatePricingToBilling": 0.077,
"frequency": "UsageBased",
"instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"invoiceId": "",
"invoiceSectionId": "98765",
"invoiceSectionName": "Invoice Section 1",
"isAzureCreditEligible": false,
"marketPrice": 0.077,
"meterId": "00000000-0000-0000-0000-000000000000",
"partnerEarnedCreditApplied": "0",
"partnerEarnedCreditRate": 0.077,
"partnerName": "Partner Name 1",
"partnerTenantId": "00000000-0000-0000-0000-000000000000",
"paygCostInBillingCurrency": 1.848,
"paygCostInUSD": 1.848,
"previousInvoiceId": "",
"pricingCurrencyCode": "USD",
"product": "Virtual Machines D Series - D1 - US East",
"productIdentifier": "DZH318Z0BQ4B00FV",
"productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
"productOrderName": "Azure plan",
"publisherId": "",
"publisherName": "Microsoft",
"publisherType": "Microsoft",
"quantity": 0.7329,
"resellerMpnId": "",
"resellerName": "Reseller Name 1",
"reservationId": "",
"reservationName": "",
"resourceGroup": "Resource Group 1",
"resourceLocation": "USEast",
"resourceLocationNormalized": "US East",
"serviceInfo1": "",
"serviceInfo2": "Windows Client BYOL",
"servicePeriodEndDate": "2019-12-01T00:00:00Z",
"servicePeriodStartDate": "2019-09-01T00:00:00Z",
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"term": "",
"unitPrice": 4.38
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
CustomerUsageDetailsList-Modern
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/customers/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/customers/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "modern",
"properties": {
"additionalInfo": "{ \"UsageType\": \"ComputeHR\", \"ImageType\": \"Windows Client BYOL\", \"ServiceType\": \"Standard_D1\", \"VMName\": null, \"VMProperties\": null, \"VCPUs\": 1, \"CPUs\": 0}",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "1234:56789",
"billingAccountName": "Account Name 1",
"billingCurrencyCode": "USD",
"billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
"billingProfileId": "2468",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"costCenter": "DEV",
"costInBillingCurrency": 1.84763819095477,
"costInPricingCurrency": 1.84763819095477,
"costInUSD": 1.84763819095477,
"customerName": "Modern Azure Customer 1",
"customerTenantId": "00000000-0000-0000-0000-000000000000",
"date": "2019-10-30T00:00:00.0000000Z",
"exchangeRate": "1",
"exchangeRateDate": "2019-09-30T00:00:00Z",
"exchangeRatePricingToBilling": 0.077,
"frequency": "UsageBased",
"instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"invoiceId": "",
"invoiceSectionId": "98765",
"invoiceSectionName": "Invoice Section 1",
"isAzureCreditEligible": false,
"marketPrice": 0.077,
"meterId": "00000000-0000-0000-0000-000000000000",
"partnerEarnedCreditApplied": "0",
"partnerEarnedCreditRate": 0.077,
"partnerName": "Partner Name 1",
"partnerTenantId": "00000000-0000-0000-0000-000000000000",
"paygCostInBillingCurrency": 1.848,
"paygCostInUSD": 1.848,
"previousInvoiceId": "",
"pricingCurrencyCode": "USD",
"product": "Virtual Machines D Series - D1 - US East",
"productIdentifier": "DZH318Z0BQ4B00FV",
"productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
"productOrderName": "Azure plan",
"publisherId": "",
"publisherName": "Microsoft",
"publisherType": "Microsoft",
"quantity": 0.7329,
"resellerMpnId": "",
"resellerName": "Reseller Name 1",
"reservationId": "",
"reservationName": "",
"resourceGroup": "Resource Group 1",
"resourceLocation": "USEast",
"resourceLocationNormalized": "US East",
"serviceInfo1": "",
"serviceInfo2": "Windows Client BYOL",
"servicePeriodEndDate": "2019-12-01T00:00:00Z",
"servicePeriodStartDate": "2019-09-01T00:00:00Z",
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"term": "",
"unitPrice": 4.38
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
DepartmentUsageDetailsList-Legacy
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000295194820065,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.000402776395232,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.7329,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 4.38
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
DepartmentUsageDetailsListForBillingPeriod-Legacy
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000342194841184,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.010534556373432,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.8234,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 3.74
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
EnrollmentAccountUsageDetailsList-Legacy
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000295194820065,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.000402776395232,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.7329,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 4.38
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
EnrollmentAccountUsageDetailsListForBillingPeriod-Legacy
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000342194841184,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.010534556373432,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.8234,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 3.74
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
InvoiceSectionUsageDetailsList-Modern
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/invoiceSections/98765/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/invoiceSections/98765/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "modern",
"properties": {
"additionalInfo": "{ \"UsageType\": \"ComputeHR\", \"ImageType\": \"Windows Client BYOL\", \"ServiceType\": \"Standard_D1\", \"VMName\": null, \"VMProperties\": null, \"VCPUs\": 1, \"CPUs\": 0}",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "1234:56789",
"billingAccountName": "Account Name 1",
"billingCurrencyCode": "USD",
"billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
"billingProfileId": "2468",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"costCenter": "DEV",
"costInBillingCurrency": 1.84763819095477,
"costInPricingCurrency": 1.84763819095477,
"costInUSD": 1.84763819095477,
"customerName": "Modern Azure Customer 1",
"customerTenantId": "00000000-0000-0000-0000-000000000000",
"date": "2019-10-30T00:00:00.0000000Z",
"exchangeRate": "1",
"exchangeRateDate": "2019-09-30T00:00:00Z",
"exchangeRatePricingToBilling": 0.077,
"frequency": "UsageBased",
"instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"invoiceId": "",
"invoiceSectionId": "98765",
"invoiceSectionName": "Invoice Section 1",
"isAzureCreditEligible": false,
"marketPrice": 0.077,
"meterId": "00000000-0000-0000-0000-000000000000",
"partnerEarnedCreditApplied": "0",
"partnerEarnedCreditRate": 0.077,
"partnerName": "Partner Name 1",
"partnerTenantId": "00000000-0000-0000-0000-000000000000",
"paygCostInBillingCurrency": 1.848,
"paygCostInUSD": 1.848,
"previousInvoiceId": "",
"pricingCurrencyCode": "USD",
"product": "Virtual Machines D Series - D1 - US East",
"productIdentifier": "DZH318Z0BQ4B00FV",
"productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
"productOrderName": "Azure plan",
"publisherId": "",
"publisherName": "Microsoft",
"publisherType": "Microsoft",
"quantity": 0.7329,
"resellerMpnId": "",
"resellerName": "Reseller Name 1",
"reservationId": "",
"reservationName": "",
"resourceGroup": "Resource Group 1",
"resourceLocation": "USEast",
"resourceLocationNormalized": "US East",
"serviceInfo1": "",
"serviceInfo2": "Windows Client BYOL",
"servicePeriodEndDate": "2019-12-01T00:00:00Z",
"servicePeriodStartDate": "2019-09-01T00:00:00Z",
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"term": "",
"unitPrice": 4.38
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
ManagementGroupUsageDetailsList-Legacy
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000342194841184,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.010534556373432,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.8234,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 3.74
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
},
{
"name": "usageDetails_Id2",
"type": "Microsoft.Consumption/usageDetails",
"id": "/scope/providers/Microsoft.Billing/billingPeriods/20180801/providers/Microsoft.Consumption/usageDetails/usageDetails_Id2",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 2",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 2",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000295194820065,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.000402776395232,
"invoiceSection": "Invoice Section 2",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "11111111-1111-1111-1111-111111111111",
"offerId": "Offer Id 2",
"partNumber": "Part Number 2",
"product": "Product Name 2",
"quantity": 0.7329,
"resourceGroup": "Resource Group 2",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 2/providers/Microsoft.Storage/storageAccounts/Resource Name 2",
"resourceLocation": "USEast",
"resourceName": "Resource Name 2",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 4.38
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
ManagementGroupUsageDetailsListForBillingPeriod-Legacy
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000342194841184,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.010534556373432,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.8234,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 3.74
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
},
{
"name": "usageDetails_Id2",
"type": "Microsoft.Consumption/usageDetails",
"id": "/scope/providers/Microsoft.Billing/billingPeriods/billingPeriodName/providers/Microsoft.Consumption/usageDetails/usageDetails_Id2",
"kind": "legacy",
"properties": {
"accountName": "Account Name 2",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 2",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 2",
"chargeType": "UnusedReservation",
"consumedService": "Microsoft.Storage",
"cost": 0.000821821271948,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.073488920944598,
"invoiceSection": "Invoice Section 2",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "11111111-1111-1111-1111-111111111111",
"offerId": "Offer Id 2",
"partNumber": "Part Number 2",
"product": "Product Name 2",
"quantity": 0.4759,
"resourceGroup": "Resource Group 2",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 2/providers/Microsoft.Storage/storageAccounts/Resource Name 2",
"resourceLocation": "USEast",
"resourceName": "Resource Name 2",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 2",
"unitPrice": 5.74
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
UsageDetailsExpand-Legacy
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&$expand=meterDetails,additionalInfo&$filter=tags eq 'dev:tools'&$top=1
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"additionalInfo": "{\"MyType\":\"\",\"ServiceType\":\"\",\"VMName\":\"\",\"UsageType\":\"MyUsage\"}",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000342194841184,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.010464556322455,
"frequency": "UsageBased",
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": {
"meterCategory": "Networking",
"meterName": "Data Transfer Out (GB)",
"meterSubCategory": "ExpressRoute",
"serviceFamily": "Compute",
"unitOfMeasure": "GB"
},
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.8234,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 3.54
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
UsageDetailsList-Legacy
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "AccountName",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Customer Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Customer Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.ClassicStorage",
"cost": 1.980949998E-06,
"costCenter": "BAS",
"date": "2019-04-09T00:00:00.0000000Z",
"effectivePrice": 0.054693034210767,
"frequency": "UsageBased",
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product1",
"quantity": 3.6E-05,
"resourceGroup": "Resource-Group-westus",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
"resourceLocation": "uswest",
"resourceName": "ResourceName1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "SubscriptionName 1",
"unitPrice": 5.47
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
UsageDetailsListByMetricActualCost-Legacy
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&metric=actualcost
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "AccountName",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Customer Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Customer Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.ClassicStorage",
"cost": 1.968949998E-06,
"costCenter": "BAS",
"date": "2019-04-09T00:00:00.0000000Z",
"effectivePrice": 0.054693055510767,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product1",
"quantity": 3.6E-05,
"resourceGroup": "Resource-Group-westus",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
"resourceLocation": "uswest",
"resourceName": "ResourceName1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "SubscriptionName 1",
"unitPrice": 5.47
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
UsageDetailsListByMetricAmortizedCost-Legacy
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&metric=amortizedcost
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "AccountName",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Customer Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Customer Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.ClassicStorage",
"cost": 1.968949998E-06,
"costCenter": "BAS",
"date": "2019-04-09T00:00:00.0000000Z",
"effectivePrice": 0.054693055510767,
"frequency": "UsageBased",
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product1",
"quantity": 3.6E-05,
"resourceGroup": "Resource-Group-westus",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
"resourceLocation": "uswest",
"resourceName": "ResourceName1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "SubscriptionName 1",
"unitPrice": 5.47
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
UsageDetailsListByMetricUsage-Legacy
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&metric=usage
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "AccountName",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Customer Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Customer Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.ClassicStorage",
"cost": 1.968949998E-06,
"costCenter": "BAS",
"date": "2019-04-09T00:00:00.0000000Z",
"effectivePrice": 0.054693055510767,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product1",
"quantity": 3.6E-05,
"resourceGroup": "Resource-Group-westus",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
"resourceLocation": "uswest",
"resourceName": "ResourceName1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "SubscriptionName 1",
"unitPrice": 5.47
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
UsageDetailsListFilterByTag-Legacy
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&$filter=tags eq 'dev:tools'
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000342194841184,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.010534556373432,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.8234,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 3.74
},
"tags": {
"dev": "tools"
}
}
]
}
UsageDetailsListForBillingPeriod-Legacy
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
Sample response
{
"value": [
{
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"kind": "legacy",
"properties": {
"accountName": "Account Name 1",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59",
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingCurrency": "CAD",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"chargeType": "Usage",
"consumedService": "Microsoft.Storage",
"cost": 0.000342194841184,
"costCenter": "DEV",
"date": "2019-03-30T00:00:00.0000000Z",
"effectivePrice": 0.010534556373432,
"invoiceSection": "Invoice Section 1",
"isAzureCreditEligible": false,
"meterDetails": null,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerId": "Offer Id 1",
"partNumber": "Part Number 1",
"product": "Product Name 1",
"quantity": 0.8234,
"resourceGroup": "Resource Group 1",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceLocation": "USEast",
"resourceName": "Resource Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"unitPrice": 3.74
},
"tags": {
"dev": "tools",
"env": "newcrp"
}
}
]
}
Definitions
| Name | Description |
|---|---|
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Legacy |
Legacy usage detail. |
|
Meter |
The properties of the meter detail. |
| Metrictype | |
|
Modern |
Modern usage detail. |
|
Pricing |
Identifier that indicates how the meter is priced. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Usage |
Specifies the kind of usage details. |
|
Usage |
Result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
LegacyUsageDetail
Legacy usage detail.
| Name | Type | Description |
|---|---|---|
| etag |
string |
The etag for the resource. |
| id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| kind |
string:
legacy |
Specifies the kind of usage details. |
| name |
string |
The name of the resource |
| properties.accountName |
string |
Account Name. |
| properties.accountOwnerId |
string |
Account Owner Id. |
| properties.additionalInfo |
string |
Additional details of this usage item. By default this is not populated, unless it's specified in $expand. Use this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in which the reservation discount is applied. |
| properties.benefitId |
string |
Unique identifier for the applicable benefit. |
| properties.benefitName |
string |
Name of the applicable benefit. |
| properties.billingAccountId |
string |
Billing Account identifier. |
| properties.billingAccountName |
string |
Billing Account Name. |
| properties.billingCurrency |
string |
Billing Currency. |
| properties.billingPeriodEndDate |
string (date-time) |
The billing period end date. |
| properties.billingPeriodStartDate |
string (date-time) |
The billing period start date. |
| properties.billingProfileId |
string |
Billing Profile identifier. |
| properties.billingProfileName |
string |
Billing Profile Name. |
| properties.chargeType |
string |
Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund. |
| properties.consumedService |
string |
Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage. |
| properties.cost |
number (decimal) |
The amount of cost before tax. |
| properties.costCenter |
string |
The cost center of this department if it is a department and a cost center is provided. |
| properties.date |
string (date-time) |
Date for the usage record. |
| properties.effectivePrice |
number (decimal) |
Effective Price that's charged for the usage. |
| properties.frequency |
string |
Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees which recur every month, and UsageBased for charges based on how much a service is used. |
| properties.invoiceSection |
string |
Invoice Section Name. |
| properties.isAzureCreditEligible |
boolean |
Is Azure Credit Eligible. |
| properties.meterDetails |
The details about the meter. By default this is not populated, unless it's specified in $expand. |
|
| properties.meterId |
string (uuid) |
The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for which the reservation was purchased. For the actual VM Size for which the reservation is purchased see productOrderName. |
| properties.offerId |
string |
Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. |
| properties.partNumber |
string |
Part Number of the service used. Can be used to join with the price sheet. Not available for marketplace. |
| properties.payGPrice |
number (decimal) |
Retail price for the resource. |
| properties.planName |
string |
Plan Name. |
| properties.pricingModel |
Identifier that indicates how the meter is priced. |
|
| properties.product |
string |
Product name for the consumed service or purchase. Not available for Marketplace. |
| properties.productOrderId |
string |
Product Order Id. For reservations this is the Reservation Order ID. |
| properties.productOrderName |
string |
Product Order Name. For reservations this is the SKU that was purchased. |
| properties.publisherName |
string |
Publisher Name. |
| properties.publisherType |
string |
Publisher Type. |
| properties.quantity |
number (decimal) |
The usage quantity. |
| properties.reservationId |
string |
ARM resource id of the reservation. Only applies to records relevant to reservations. |
| properties.reservationName |
string |
User provided display name of the reservation. Last known name for a particular day is populated in the daily data. Only applies to records relevant to reservations. |
| properties.resourceGroup |
string |
Resource Group Name. |
| properties.resourceId |
string |
Unique identifier of the Azure Resource Manager usage detail resource. |
| properties.resourceLocation |
string |
Resource Location. |
| properties.resourceName |
string |
Resource Name. |
| properties.serviceInfo1 |
string |
Service-specific metadata. |
| properties.serviceInfo2 |
string |
Legacy field with optional service-specific metadata. |
| properties.subscriptionId |
string |
Subscription guid. |
| properties.subscriptionName |
string |
Subscription name. |
| properties.term |
string |
Term (in months). 1 month for monthly recurring purchase. 12 months for a 1 year reservation. 36 months for a 3 year reservation. |
| properties.unitPrice |
number (decimal) |
Unit Price is the price applicable to you. (your EA or other contract price). |
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
object |
Resource tags. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
MeterDetailsResponse
The properties of the meter detail.
| Name | Type | Description |
|---|---|---|
| meterCategory |
string |
The category of the meter, for example, 'Cloud services', 'Networking', etc.. |
| meterName |
string |
The name of the meter, within the given meter category |
| meterSubCategory |
string |
The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. |
| serviceFamily |
string |
The service family. |
| unitOfMeasure |
string |
The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc. |
Metrictype
| Value | Description |
|---|---|
| actualcost |
Actual cost data. |
| amortizedcost |
Amortized cost data. |
| usage |
Usage data. |
ModernUsageDetail
Modern usage detail.
| Name | Type | Description |
|---|---|---|
| etag |
string |
The etag for the resource. |
| id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| kind |
string:
modern |
Specifies the kind of usage details. |
| name |
string |
The name of the resource |
| properties.additionalInfo |
string |
Additional details of this usage item. Use this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in which the reservation discount is applied. |
| properties.benefitId |
string |
Unique identifier for the applicable benefit. |
| properties.benefitName |
string |
Name of the applicable benefit. |
| properties.billingAccountId |
string |
Billing Account identifier. |
| properties.billingAccountName |
string |
Name of the Billing Account. |
| properties.billingCurrencyCode |
string |
The currency defining the billed cost. |
| properties.billingPeriodEndDate |
string (date-time) |
Billing Period End Date as in the invoice. |
| properties.billingPeriodStartDate |
string (date-time) |
Billing Period Start Date as in the invoice. |
| properties.billingProfileId |
string |
Identifier for the billing profile that groups costs across invoices in the a singular billing currency across across the customers who have onboarded the Microsoft customer agreement and the customers in CSP who have made entitlement purchases like SaaS, Marketplace, RI, etc. |
| properties.billingProfileName |
string |
Name of the billing profile that groups costs across invoices in the a singular billing currency across across the customers who have onboarded the Microsoft customer agreement and the customers in CSP who have made entitlement purchases like SaaS, Marketplace, RI, etc. |
| properties.chargeType |
string |
Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund. |
| properties.consumedService |
string |
Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage. |
| properties.costAllocationRuleName |
string |
Name for Cost Allocation Rule. |
| properties.costCenter |
string |
The cost center of this department if it is a department and a cost center is provided. |
| properties.costInBillingCurrency |
number (decimal) |
ExtendedCost or blended cost before tax in billed currency. |
| properties.costInPricingCurrency |
number (decimal) |
ExtendedCost or blended cost before tax in pricing currency to correlate with prices. |
| properties.costInUSD |
number (decimal) |
Estimated extendedCost or blended cost before tax in USD. |
| properties.customerName |
string |
Name of the customer's AAD tenant. |
| properties.customerTenantId |
string |
Identifier of the customer's AAD tenant. |
| properties.date |
string (date-time) |
Date for the usage record. |
| properties.effectivePrice |
number (decimal) |
Effective Price that's charged for the usage. |
| properties.exchangeRate |
string |
Exchange rate used in conversion from pricing currency to billing currency. |
| properties.exchangeRateDate |
string (date-time) |
Date on which exchange rate used in conversion from pricing currency to billing currency. |
| properties.exchangeRatePricingToBilling |
number (decimal) |
Exchange Rate from pricing currency to billing currency. |
| properties.frequency |
string |
Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees which recur every month, and UsageBased for charges based on how much a service is used. |
| properties.instanceName |
string |
Instance Name. |
| properties.invoiceId |
string |
Invoice ID as on the invoice where the specific transaction appears. |
| properties.invoiceSectionId |
string |
Identifier of the project that is being charged in the invoice. Not applicable for Microsoft Customer Agreements onboarded by partners. |
| properties.invoiceSectionName |
string |
Name of the project that is being charged in the invoice. Not applicable for Microsoft Customer Agreements onboarded by partners. |
| properties.isAzureCreditEligible |
boolean |
Determines if the cost is eligible to be paid for using Azure credits. |
| properties.marketPrice |
number (decimal) |
Market Price that's charged for the usage. |
| properties.meterCategory |
string |
Identifies the top-level service for the usage. |
| properties.meterId |
string (uuid) |
The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for which the reservation was purchased. For the actual VM Size for which the reservation is purchased see productOrderName. |
| properties.meterName |
string |
Identifies the name of the meter against which consumption is measured. |
| properties.meterRegion |
string |
Identifies the ___location of the datacenter for certain services that are priced based on datacenter ___location. |
| properties.meterSubCategory |
string |
Defines the type or sub-category of Azure service that can affect the rate. |
| properties.partnerEarnedCreditApplied |
string |
Flag to indicate if partner earned credit has been applied or not. |
| properties.partnerEarnedCreditRate |
number (decimal) |
Rate of discount applied if there is a partner earned credit (PEC) based on partner admin link access. |
| properties.partnerName |
string |
Name of the partner' AAD tenant. |
| properties.partnerTenantId |
string |
Identifier for the partner's AAD tenant. |
| properties.payGPrice |
number (decimal) |
Retail price for the resource. |
| properties.paygCostInBillingCurrency |
number (decimal) |
The amount of PayG cost before tax in billing currency. |
| properties.paygCostInUSD |
number (decimal) |
The amount of PayG cost before tax in US Dollar currency. |
| properties.previousInvoiceId |
string |
Reference to an original invoice there is a refund (negative cost). This is populated only when there is a refund. |
| properties.pricingCurrencyCode |
string |
Pricing Billing Currency. |
| properties.pricingModel |
Identifier that indicates how the meter is priced |
|
| properties.product |
string |
Name of the product that has accrued charges by consumption or purchase as listed in the invoice. Not available for Marketplace. |
| properties.productIdentifier |
string |
Identifier for the product that has accrued charges by consumption or purchase . This is the concatenated key of productId and SkuId in partner center. |
| properties.productOrderId |
string |
The identifier for the asset or Azure plan name that the subscription belongs to. For example: Azure Plan. For reservations this is the Reservation Order ID. |
| properties.productOrderName |
string |
Product Order Name. For reservations this is the SKU that was purchased. |
| properties.provider |
string |
Identifier for Product Category or Line Of Business, Ex - Azure, Microsoft 365, AWS e.t.c |
| properties.publisherId |
string |
Publisher Id. |
| properties.publisherName |
string |
Name of the publisher of the service including Microsoft or Third Party publishers. |
| properties.publisherType |
string |
Type of publisher that identifies if the publisher is first party, third party reseller or third party agency. |
| properties.quantity |
number (decimal) |
Measure the quantity purchased or consumed.The amount of the meter used during the billing period. |
| properties.resellerMpnId |
string |
MPNId for the reseller associated with the subscription. |
| properties.resellerName |
string |
Reseller Name. |
| properties.reservationId |
string |
ARM resource id of the reservation. Only applies to records relevant to reservations. |
| properties.reservationName |
string |
User provided display name of the reservation. Last known name for a particular day is populated in the daily data. Only applies to records relevant to reservations. |
| properties.resourceGroup |
string |
Name of the Azure resource group used for cohesive lifecycle management of resources. |
| properties.resourceLocation |
string |
Name of the resource ___location. |
| properties.resourceLocationNormalized |
string |
Resource Location Normalized. |
| properties.serviceFamily |
string |
List the service family for the product purchased or charged (Example: Storage ; Compute). |
| properties.serviceInfo1 |
string |
Service-specific metadata. |
| properties.serviceInfo2 |
string |
Legacy field with optional service-specific metadata. |
| properties.servicePeriodEndDate |
string (date-time) |
End date for the period when the service usage was rated for charges. The prices for Azure services are determined based on the rating period. |
| properties.servicePeriodStartDate |
string (date-time) |
Start date for the rating period when the service usage was rated for charges. The prices for Azure services are determined for the rating period. |
| properties.subscriptionGuid |
string |
Unique Microsoft generated identifier for the Azure Subscription. |
| properties.subscriptionName |
string |
Name of the Azure Subscription. |
| properties.term |
string |
Term (in months). Displays the term for the validity of the offer. For example. In case of reserved instances it displays 12 months for yearly term of reserved instance. For one time purchases or recurring purchases, the terms displays 1 month; This is not applicable for Azure consumption. |
| properties.unitOfMeasure |
string |
Identifies the Unit that the service is charged in. For example, GB, hours, 10,000 s. |
| properties.unitPrice |
number (decimal) |
Unit Price is the price applicable to you. (your EA or other contract price). |
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
object |
Resource tags. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
PricingModelType
Identifier that indicates how the meter is priced.
| Value | Description |
|---|---|
| On Demand | |
| Reservation | |
| Spot |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |
UsageDetailsKind
Specifies the kind of usage details.
| Value | Description |
|---|---|
| legacy | |
| modern |
UsageDetailsListResult
Result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period.
| Name | Type | Description |
|---|---|---|
| nextLink |
string |
The link (url) to the next page of results. |
| value | UsageDetail[]: |
The list of usage details. |