I have created a webhook connector which uses servicenow api to send, then I have created a rule and used that webhook connector so whenever that rule trigger I need to send that alert data in body as a JSON as servicenow api expect data in json format.
Do you have a code sample you are using? Are you encountering any errors? You may want to double-check that your Content-Type header is set to application/json.
Hey @jessgarson thanks, I am able to send the body in JSON format by using {{#ParseHjson}}, but I am not able to get the document details ({{context.hits.0._source.message}}) could you please help me.
It seems you can use the Mustache template array syntax to iterate the hits. This similar forum post suggests that you can add {{.}} within that message to get a listing of all the available variables.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.