Create/Update Email Parser Configuration

📘

The system will reject a request to create a parser configuration that is identical to an existing one.

🚧

Authentication

All BigPanda APIs require Bearer Token Authorization in the call headers.

This API uses the Org Token type of Authorization token.

📘

Sample Payload

For field validation, BigPanda checks against an existing sample JSON payload from the integration. For all create calls to the API, a sample must be included in the body of all calls. For update calls to the API, the sample payload field must be included, but can be blank.

All payload fields referenced in configuration settings must be included in the sample.

Sample Call

curl --request POST \
   --url https://integrations.bigpanda.io/configurations/alerts/emailparser/{APP_KEY} \
   --header 'Authorization: Bearer {YOUR ORG TOKEN}' \
   --header 'Content-Type: application/json' \
   --data '
  {
    "config":
    {
      "email_format": "plain_text",
      "allow_list": [
        "string"
      ],
      "status": {
        "default_to": "warning",
        "source": "subject",
        "status_map": {
          "critical": [
            "major",
            "very bad"
          ],
          "warning": [
            "warning"
          ],
          "ok": [
            "ok",
            "clear"
          ],
          "acknowledged": [
            "ack"
          ]
        }
      },
      "primary_property": {
        "name": "host",
        "source": "body",
        "extraction": "host is (.*)",
        "default_to": "general issue"
      },
      "secondary_property": {
        "name": "region",
        "source": "body",
        "extraction": "region (.*)",
        "default_to": "us-west-1"
      },
      "additional_attributes": [
      {
        "name": "region",
        "source": "body",
        "extraction": "region: (.*)",
        "default_to": "us-west-2"
      }
    ]
  }
},
"sample_payload": {
        "alerts": [
          {
            "generatorURL": "https://some-url.io",
            "fingerprint": "123456789",
            "annotations": {
              "description": "This alert is used to check the CPU utilization of this non-existent server",
              "runbook_url": "https://runbook.io/cpu-check"
            },
            "startsAt": "2022-07-05T19:59:25.661Z",
            "endsAt": "0001-01-01T00:00:00Z",
            "status": "firing",
            "labels": {
              "severity": "page",
              "instance": "bigpanda-server",
              "alertname": "BigPanda Test",
              "team": "metrics",
              "env": "test",
              "job": "CPU Check",
              "locale": "ca",
              "timestamp": "1.657051103137505e+09"
            }
          }
        ],
        "commonLabels": {
          "instance": "bigpanda-server",
          "alertname": "BigPanda Test",
          "team": "metrics",
          "env": "test",
          "job": "CPU Check",
          "locale": "ca",
          "timestamp": "1.657051103137505e+09"
        },
        "externalURL": "https://external-url.io",
        "groupLabels": {
          "instance": "bigpanda-server",
          "alertname": "BigPanda Test",
          "team": "metrics",
          "env": "test",
          "job": "CPU Check",
          "locale": "ca",
          "timestamp": "1.657051103137505e+09"
        },
        "receiver": "bigpanda",
        "version": "4",
        "commonAnnotations": {
          "description": "This alert is used to check the CPU utilization of this non-existent server",
          "runbook_url": "https://runbook.io/cpu-check"
        },
        "status": "firing"
      }
curl --request POST \
   --url https://eu.integrations.bigpanda.io/configurations/alerts/emailparser/{APP_KEY} \
   --header 'Authorization: Bearer {YOUR ORG TOKEN}' \
   --header 'Content-Type: application/json' \
   --data '
  {
    "config":
    {
      "email_format": "plain_text",
      "allow_list": [
        "string"
      ],
      "status": {
        "default_to": "warning",
        "source": "subject",
        "status_map": {
          "critical": [
            "major",
            "very bad"
          ],
          "warning": [
            "warning"
          ],
          "ok": [
            "ok",
            "clear"
          ],
          "acknowledged": [
            "ack"
          ]
        }
      },
      "primary_property": {
        "name": "host",
        "source": "body",
        "extraction": "host is (.*)",
        "default_to": "general issue"
      },
      "secondary_property": {
        "name": "region",
        "source": "body",
        "extraction": "region (.*)",
        "default_to": "us-west-1"
      },
      "additional_attributes": [
      {
        "name": "region",
        "source": "body",
        "extraction": "region: (.*)",
        "default_to": "us-west-2"
      }
    ]
  }
},
"sample_payload": {
        "alerts": [
          {
            "generatorURL": "https://some-url.io",
            "fingerprint": "123456789",
            "annotations": {
              "description": "This alert is used to check the CPU utilization of this non-existent server",
              "runbook_url": "https://runbook.io/cpu-check"
            },
            "startsAt": "2022-07-05T19:59:25.661Z",
            "endsAt": "0001-01-01T00:00:00Z",
            "status": "firing",
            "labels": {
              "severity": "page",
              "instance": "bigpanda-server",
              "alertname": "BigPanda Test",
              "team": "metrics",
              "env": "test",
              "job": "CPU Check",
              "locale": "ca",
              "timestamp": "1.657051103137505e+09"
            }
          }
        ],
        "commonLabels": {
          "instance": "bigpanda-server",
          "alertname": "BigPanda Test",
          "team": "metrics",
          "env": "test",
          "job": "CPU Check",
          "locale": "ca",
          "timestamp": "1.657051103137505e+09"
        },
        "externalURL": "https://external-url.io",
        "groupLabels": {
          "instance": "bigpanda-server",
          "alertname": "BigPanda Test",
          "team": "metrics",
          "env": "test",
          "job": "CPU Check",
          "locale": "ca",
          "timestamp": "1.657051103137505e+09"
        },
        "receiver": "bigpanda",
        "version": "4",
        "commonAnnotations": {
          "description": "This alert is used to check the CPU utilization of this non-existent server",
          "runbook_url": "https://runbook.io/cpu-check"
        },
        "status": "firing"
      }
    }'    }'
Language
Authorization
Bearer
JWT