Azure / Azure/azure-rest-api-specs

Consumption API (2019-10-01) missing startDate and endDate query parameters and incorrect bool type

Open
#11,849 18 comments 2 reactions 0 assignees View on GitHub
bug Consumption - UsageDetailsAndExport Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

The consumption API definition has a couple of problems in the 2019-10-01 version:

* The query parameters startDate and endDate are missing for `UsageDetails_List` - for non-Enterprise Agreement subscriptions (e.g. PAYG or MCA) these allow filtering by date, adding `properties/usageStart` and `properties/usageEnd` to $filter has no effect. Manually specifying these parameters on the URL has the desired effect.

* The returned results from the API for the LegacyUsageDetailProperties and ModernUsageDetailProperties uses the string value "1" in the field `IsAzureCreditEligible`, which is defined in the spec as a boolean. At least in the Go Azure SDK, the string value "1" is not parseable as a boolean, so the parse fails.

Contributor guide

Open the contributing guide

Research direction

Search the 2019-10-01 consumption API definition for `UsageDetails_List`, `LegacyUsageDetailProperties`, and `ModernUsageDetailProperties`. Verify the declared query parameters and the `IsAzureCreditEligible` type against the reported API responses. Done means both date filters are represented and the returned value can be parsed consistently with the specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.