projectkudu / AzureResourceExplorer

Azure Resource Explorer - a site to explore and manage your ARM resources in style
https://resources.azure.com
Apache License 2.0
199 stars 77 forks source link

Resource List REST API filter parameter not working #312

Closed dbutaciu closed 3 years ago

dbutaciu commented 3 years ago

https://docs.microsoft.com/en-us/rest/api/resources/resources/list

I tried using the following command, as described in the above link. The request sends back a lot of resources, many of them not having the desired tagName and tagValue values. I used the exact format mentioned in the parameter description (tagName eq 'tag1' and tagValue eq 'Value1)

curl --request GET \ --url 'https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resources?api-version=2021-04-01&filter=tagName%20eq%20'\''Owner'\''%20and%20tagValue%20eq%20'\''firstname%20lastname'\''' \ --header 'Authorization: Bearer bearer_token'

I also tried this filter resourceType eq 'Microsoft.Network/virtualNetworks'. The response contains Storage Accounts, VMs.

So either I am doing something terribly wrong or the filter parameter is simply not working.

balag0 commented 3 years ago

Looks like you are reporting an issue with using curl and not specific to Resource Explorer? Note: Resource Explorer doesn't support filter parameters.

dbutaciu commented 3 years ago

I performed that request using Insomnia and only exported it into curl. The basic call, without parameters, worked alright.

What do you mean by "Resource Explorer doesn't support filter parameters."? Are you talking about the REST API that I posted above? Then why is the filter parameter mentioned in the docs?

balag0 commented 3 years ago

I was referring to the current repo where this issue was opened. The tool this repo powers doesn't support filter parameters. It looks like you might have opened this issue in the wrong repo. Closing this issue since it does not look related to Resource Explorer.