meraki / dashboard-api-python

Official Dashboard API library (SDK) for Python
MIT License
293 stars 154 forks source link

Getting network by tag not performing exact match #169

Closed gopurx closed 3 years ago

gopurx commented 3 years ago

While trying to get networks in an organization by passing query parameter "tags", one of my observation is filtering using tags not performing exact match. It seems doing a like/contains/startwith operation.

I have some networks tagged to "test","test_A","test_B" and now trying to search for all networks which belongs to tag "test", dashboard.organizations.getOrganizationNetworks(org_id, total_pages="all", tags=["test"]). Observing all networks returned which belong to tag starting with "test" (test*) but not exactly tagged as "test".

Not sure if this behavior exists since beginning, did not remember encountering such earlier.

Is this an expected behavior? and does this pattern holds good for all query parameters for other APIs?

TKIPisalegacycipher commented 3 years ago

Meraki tags do not have spaces. If you tag something as "test two" it will apply tags "test" and "two". I think this answers your question. If not, please open a thread in the community to discuss.

gopurx commented 3 years ago

issue is not with spaces, I agree that space will create two tags in your example. I am referring to query parameter, it seems default behavior is tag=test* vs tag=test