API

Update an alert by ID

Update alert by ID

Path parameters

  • id
    string
    Unique identifier of the alert to update

Request body

  • name
    string
    New name for the alert
    • events
      array
      Updated 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
          Updated notification provider for the alert
          • slack_channel_id
            string
            Updated Slack channel ID for notifications
            • webhook_id
              string
              Updated webhook ID for notifications

              Response

              • alert_id
                string
                Unique identifier for the alert
                • name
                  string
                  Name of the alert
                  • events
                    array
                    List of events that 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_channel_id
                          string
                          Slack channel ID for notifications
                          • webhook_id
                            string
                            Webhook ID for notifications
                            • enabled
                              boolean
                              Whether the alert is currently active
                              • creation_date
                                string

                                ISO 8601 timestamp when the alert was created

                                1
                                curl --request PUT \
                                2
                                --url https://api.livesession.io/v1/alerts/id \
                                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
                                }
                                Create alertDelete alert