Azure UsageDetails API: Filtering on multiple tags works in Dev environment but not Production RRS feed

  • Question

  • In PostMan I am making a callout to the UsageDetails endpoint. When I filter on multiple tags using 'or', it works in our testing environment, but not in our production environment. Below are the query parameters I'm using:

    api-version: 2019-10-01

    $filter: properties/usageStart eq '2020-08-18' and properties/usageEnd eq '2020-08-24' and tags eq 'Project ID:PR-12345' or tags eq 'Project ID:PR-12346' or tags eq 'Project ID:PR-12347'

    When I use the above $filter parameter in our production azure subscription, UsageDetails for the 'Project ID:PR-12346' tag is returned, but none for the other 2 tags are returned. But when I remove the tag filters and only filter on date, UsageDetails for all 3 tags are returned. But in our testing environment, the filters work properly. According to their Usage Detail API Documentation, the 'or' filter is not officially supported, but it does work in our testing environment. Can someone please assist?

    Tuesday, September 1, 2020 6:56 PM

All replies

  • It turns out another important issue is that if a resource has 2 tags, the UsageDetail response will not return that resource even if it matches a tag specified in the $filter query parameter. This seems like a bug, can someone assist?
    Tuesday, September 1, 2020 9:18 PM