API

Create an alert

Create alert

Request body

  • name
    string
    Name of the alert for easy identification
    • events
      array
      List of events that will trigger the alert
      • kind
        integer

        Kind of event, more info here

        • value
          string
          Value or threshold that triggers the alert
        • provider
          string

          Notification provider for the alert, slack or webhooks

          • slack_channel_id
            string

            Slack channel ID where notifications will be sent (required if provider is slack)

            • webhook_id
              string

              Webhook ID where notifications will be sent (required if provider is webhooks)

              1
              curl --request POST \
              2
              --url https://api.livesession.io/v1/alerts \
              3
              --header 'accept: application/json' \
              4
              --header 'content-type: application/json' \
              5
              --data '
              6
              {
              7
              "name": "string",
              8
              "events": [
              9
              {
              10
              "kind": 0,
              11
              "value": "string"
              12
              }
              13
              ],
              14
              "provider": "slack",
              15
              "slack_channel_id": "string",
              16
              "webhook_id": "string"
              17
              }
              18
              '
              1
              {
              2
              "alert_id": "string",
              3
              "name": "string",
              4
              "events": [
              5
              {
              6
              "kind": 0,
              7
              "value": "string"
              8
              }
              9
              ],
              10
              "provider": "slack",
              11
              "slack_channel_id": "string",
              12
              "webhook_id": "string",
              13
              "enabled": true,
              14
              "creation_date": "string"
              15
              }
              List alertsUpdate alert