-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make "tag" an available field to search for components in query_string #2920
Comments
Hello, The idea of querying for components using tags may be useful. But the question that I am wondering is: a component may have many tags, so in the query string we may give many tags too. Should they be combined with an AND and OR? And if an OR, should he be exclusive or not? Example:
Are we looking for components that have tag1 && tag2, or those that have tag1 || tag2? |
@anthonybocci I would vote in option A because to be consistent with current API. For example, if you get info from http://cachet.dev/api/v1/components?status=1&name=XYZ, it would return an AND operation, not an OR. |
@hugomcfonseca I agree, indeed the other criterias are an AND operation, so the components that are returned in your example have the status 1 && the name XYZ. So it would be something like: http://cachet.dev/api/v1/components?tags[]=ABC&tags[]=DEF&name=XYZ |
Yes, exactly @anthonybocci. |
@hugomcfonseca if you implement it I can contribute if necessary, either by coding or testing. |
ok @anthonybocci, I am already on it. Once I finish it, I'll do a pull request |
👍 |
I created an issue related to that a few days ago (issue #2903), but still without any feedback at the moment. |
Since tags can technically be applied to any model now, I'd be keen on having this built into Cachet :) |
I started working on this last night for a "proof of concept", I don't think it's too much work honestly. |
Current API does not support to query for components using tags as a querystring field.
Is it expectable to have this implemented? I can help with a pull request.
The text was updated successfully, but these errors were encountered: