How can i add send on all alerts and include image option while creating alert notification channel using api

What Grafana version are you using? 4.4.1
What datasource are you using? opentsdb
What OS are you running grafana on? Ubuntu
What did you do? created alerts notification using api

Here is an example of a request body for a Slack alert notification using the create alert notification api call:

{
  "type": "slack",
  "settings": {
    "uploadImage": true,
    "url": "https://hooks.slack.com/services/blah",
    "recipient": "#grafana"
  },
  "isDefault": true,
  "name": "slack"
}

I want to enable these two option for type Email…
i am not able to find the json key and value for these two option

image

Include image = “uploadImage”

Send on all alerts = “isDefault”

Thanks for the solution responses for the post. Shouldn’t the answers be documented in the API doc? Or is it somewhere, it didn’t seem intuitive browsing the current doc for figuring that out. The doc only gives example for email but without include image & properly mentioning about send on all alerts.

Btw, where did you figure out the url parameter? The API web doc doesn’t seem to officially mention it.

Are you mixing up two different things? The original question was about creating an alert notification in Grafana via Grafana’s API. Your link is about how to create webhooks in Slack. Are you stuck on something?

No I’m not, but you could say I’m asking a side question to the original question. From what I can tell the current API doc (on the web) is not well defined in listing all the JSON parameters. For the slack one for instance, it doesn’t mention “url” field and expects you to know that, maybe from the slack API doc. So I was just questioning how one came to know that for this answer. For example, see this thread for how the OP figured it out: Slack enable image via curl