{
  "extensionType": "jira",
  "endpoint": "/rest/api/3/issue",
  "method": "POST",
  "events": {
    "0": {
      "payload": {
        "fields": {
          "project": {
            "key": "${projectKey}"
          },
          "summary": "TEST -  Jira connection successful",
          "issuetype": {
            "name": "${issueType}"
          }
        }
      }
    },
    "3": {
      "payload": {
        "fields": {
          "project": {
            "key": "${projectKey}"
          },
          "summary": "ALERT - ${severity} | ${value} | ${subject}",
          "issuetype": {
            "name": "${issueType}"
          },
          "description": {
            "type": "doc",
            "version": 1,
            "content": [
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Rule Name: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${rule_name}" }
                ]
              },
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Severity: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${severity}" }
                ]
              },
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Metrics Subject: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${subject}" }
                ]
              },
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Status: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${status}" }
                ]
              },
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Value: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${value}" }
                ]
              },
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Event Time: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${event_time} ${timezone}" }
                ]
              },
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Alert Time Range: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${event_time_range} ${timezone}" }
                ]
              },
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Conditions: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${conditions}" }
                ]
              },
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Expression: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${exp}" }
                ]
              },
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Message: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${rule_msg}" }
                ]
              },
              {
                "type": "paragraph",
                "content": [
                  { "type": "text", "text": "Description: ", "marks": [{ "type": "strong" }] },
                  { "type": "text", "text": "${rule_desc}" }
                ]
              }
            ]
          }
        }
      }
    }
  }
}

