Alerts
/Create an alert
Create an alert
https:/api.livesession.io/v1/alerts
Create alert
Scopes
Required scopes:
alerts:writeRequest body
namestringRequired
Name of the alert for easy identificationeventsarray of objectRequired
List of events that will trigger the alertkindinteger
Kind of event, more info [here](/docs/api/rest/EventKind)valuestring
Value or threshold that triggers the alert
providerstringRequired
Notification provider for the alert,
slackorwebhooksslackstring
webhooksstring
slack_channel_idstring
Slack channel ID where notifications will be sent (required if provider is
slack)webhook_idstring
Webhook ID where notifications will be sent (required if provider is
webhooks)
Response
Created
alert_idstring
Unique identifier for the alertnamestring
Name of the alerteventsarray of object
List of events that trigger the alertkindinteger
Kind of event, more info [here](/docs/api/rest/EventKind)valuestring
Value or threshold that triggers the alert
providerstring
Notification provider for the alertslackstring
webhooksstring
slack_channel_idstring
Slack channel ID for notificationswebhook_idstring
Webhook ID for notificationsenabledboolean
Whether the alert is currently activecreation_datestring
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 ⭐️