Grafana alert API format for automation

Hello,

I’m trying to configure Grafana alerts with Terraform tool.
I use this blog post as good source of inspiration. There is 1 weird point where you need to specify “model” for an alerting rule.
However the model isn’t documented properly - at least I didn’t find anything.
There was following comment in the blog post:

            // `model` is a JSON blob that sends datasource-specific data.
            // It's different for every datasource. The alert's query is defined here.

So I did that. However I have one question to it.
My model data for 1 alert stage looks like:

        model = jsonencode({
          //"conditions" = {
          //  "evaluator" = {
          //    "params" = [0, 0]
          //    "type" = "gt"
          //  }

          //  "operator" = {
          //    "type" = "and"
          //  }

          //  "query" = {
          //    "params" = []
          //  }

          //  "reducer" = {
          //    "params" = []
          //    "type" = "avg"
          //  }

          //  "type" = "query"
          //}

          //"datasource" = {
          //  "name" = "Expression"
          //  "type" = "__expr__"
          //  "uid" = "__expr__"
          //}

          "expression"    = "A"
          "intervalMs"    = 1000
          "maxDataPoints" = 43200
          "reducer"       = "last"
          "refId"         = "B"

          "settings" = {
            "mode"             = "replaceNN"
            "replaceWithValue" = 0
          }

          "type" = "reduce"
        })

As you can see above I commented out some portion of the data.
The reason is simple the data look useless in this specific case.
I also tested it without it and the alert seems to work properly.
I didn’t find any documentation for what are these attributes needed.

Is it safe to don’t use commented data?
Is there any documentation to learn more about these attributes?

BR

Create your Alert in UI and watch request (browser network console), which is making Grafana frontend to backend when is creating alert. Request payload will have your desired alert model json, which you can use.

Create your Alert in UI and watch request (browser network console), 

I did that. My question is whether detected model data which look as not needed/useless could be stripped and it will not have any consequences. And / Or if there is any documentation what this data are for …