-
Notifications
You must be signed in to change notification settings - Fork 14
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
Simplify the tag data structure required by the Incident API endpoint #136
Comments
When considering the two more intuitive ways it should be decided if we want to support more than one value per key (tag "type" as I've named it in frontend source code). The first version retains this property while the second one does not. There are some places where this property is required, such as when filtering by tags, so it could be useful to have it be universal. |
|
If we are to support "simplex" tags, what makes sense is the tag being just a key, not a value. Backend-wise, that can be supported by allowing the bits after '=' to be an empty string. |
I would have preferred the API to be:
|
More importantly data-model wise, currently, a tag-relation has an owner and a date.
I think the purpose is to prevent there being a build-up of unused tags or something. The frontend cannot change tags at the moment, and the backend shouldn't either. Incidents should not (never?) be deleted, so currently, tags should never be deleted, so currently, this is YAGNI. Changing this should not affect the API though. |
We could consider the use of PostgreSQL JSON storage and query features. |
Tags need to be posted as a list of tag models when POSTing incidents to the API, which seems unintuitive and should be changed to simplify the API. It shouldn't matter to the API consumer how the internal modelling of Argus works in this regard.
E.g. one needs to post something like this as of today:
A more intuitive way might be
or even
(although I'm not entirely convinced we should always require a tag to be key=value, even if it would be the norm...)
EDIT: Also, the API endpoint requires the
tags
attribute to be present, even though tags aren't mandatory. Allowing the attribute to be omitted, rather than requiring an empty list to be posted, should be considered part of this issue.The text was updated successfully, but these errors were encountered: