Open UiP9AV6Y opened 1 week ago
Wow! Thanks for working on this! Having message templates on the server is one of the features we talked about in the past, but obviously we haven't implemented it yet.
Binwiederhier will be the one to decide whether to merge this, but here are some of my thoughts:
I don't know the best way to remedy this, though. I considered something like tpl=server,inline
for a server message and inline title. Or tpl=1&message=server:grafana&title=New+Grafana+Alert
. Looking toward the future, though, we have discussed making it possible to template all message fields (such as priority and tags) based on the JSON body. I don't know what that looks like and how it combines with this.
instead of sending title/message templates as part of the publishing request, systems can simply reference existing templates from the server. this has two advantages a) publish URLs become shorter b) publish URLs become easier to reuse
the changes backwards-compatible, as the
tpl
parameter continues to support truthy boolean values. the feature has to be enabled on the server. available templates and their content are exposed via new API endpoints.