Create an alert
POSThttps:/api.livesession.io/v1/alerts
Create alert
Scopes
Required scopes:
alerts:write
Request body
application/json
name
string
Required
Name of the alert for easy identificationevents
array
Required
List of events that will trigger the alertkind
integer
Kind of event, more info here
value
string
Value or threshold that triggers the alert
provider
string
Required
Notification provider for the alert,
slack
orwebhooks
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
application/json
alert_id
string
Unique identifier for the alertname
string
Name of the alertevents
array
List of events that trigger the alertkind
integer
Kind of event, more info here
value
string
Value or threshold that triggers the alert
provider
string
Notification provider for the alertslack
string
webhooks
string
slack_channel_id
string
Slack channel ID for notificationswebhook_id
string
Webhook ID for notificationsenabled
boolean
Whether the alert is currently activecreation_date
string
ISO 8601 timestamp when the alert was created
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 }
Built with