Use JSON in Watcher webhook body

How is it possible to use plain JSON in Watcher webhook body?

Just putting the plain JSON in the body

                "Authorization":"Key XXX",
             "body": {
                "message":"Some message",
                    "string a",
                    "string b"

results in interpreting fields by Watcher which fails:

[1:653] [script] unknown field [message]

Handling the whole JSON as a string does not work to. How to handle it?

Same problem, but no solution: Watcher webhook body How to build a json format?

Use the {{#toJson}} template function in the body.

See Search templates | Elasticsearch Guide [7.17] | Elastic

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.