Alerts
/
Create an alert

Create an alert

POST
https:/api.livesession.io/v1/alerts

Create alert

Scopes

Required scopes: alerts:write

Request body

  • name
    string
    Required
    Name of the alert for easy identification
  • events
    array of object
    Required
    List of events that will trigger the alert
    • kind
      integer
      Kind of event, more info [here](/docs/api/rest/EventKind)
    • value
      string
      Value or threshold that triggers the alert
  • provider
    enum
    Required

    Notification provider for the alert, slack or webhooks

    • slack
      string
    • webhooks
      string
  • 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)

Response

Created
  • alert_id
    string
    Unique identifier for the alert
  • name
    string
    Name of the alert
  • events
    array of object
    List of events that trigger the alert
    • kind
      integer
      Kind of event, more info [here](/docs/api/rest/EventKind)
    • value
      string
      Value or threshold that triggers the alert
  • provider
    enum
    Notification provider for the alert
    • slack
      string
    • webhooks
      string
  • 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

Example request
curl --request POST \
--url https://api.livesession.io/v1/alerts \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"name": "string",
"events": [
{
"kind": 0,
"value": "string"
}
],
"provider": "slack",
"slack_channel_id": "string",
"webhook_id": "string"
}
'
Example response
{
"alert_id": "string",
"name": "string",
"events": [
{
"kind": 0,
"value": "string"
}
],
"provider": "slack",
"slack_channel_id": "string",
"webhook_id": "string",
"enabled": true,
"creation_date": "string"
}
Built with

Show your support! Star us on GitHub ⭐️