Issue Summary

I have configured Moogsoft webhook as alert destination. The Moogsoft accepts application/json type data , but I think redash uses form-urlencoded.

Is it possible to add header field? or make redash post json?

Technical details:

  • Redash Version: 8
  • Browser/OS: Firefox
  • How did you install Redash: Docker/ ECS

Looking at source code

data[“alert”][“description”] = alert.custom_body
data[“alert”][“title”] = alert.custom_subject

        headers = {"Content-Type": "application/json"}
        auth = (
            HTTPBasicAuth(options.get("username"), options.get("password"))
            if options.get("username")
            else None
        )
        resp = requests.post(
            options.get("url"),
            data=json_dumps(data),
            auth=auth,
            headers=headers,
            timeout=5.0,
        )

we get the data like
{“alert”:
{“title”: “hoye”, “description”: “oye”,“source”: “Redash”

}
}
what if ,I want to add some custom fields at top level like
{“title”: “hoye”, “description”: “oye”,“source”: “Redash”}