Update subscriptions
Learn how to create and update subscriptions for your users
Last updated
Learn how to create and update subscriptions for your users
Last updated
This route facilitates the management of subscriptions, enabling users to create, update, and delete subscriptions effectively.
Users are allowed only one subscription per metric, ensuring simplicity and clarity in tracking metrics. When adjusting thresholds on existing subscriptions, the new parameters overwrite the previous settings, ensuring seamless customization.
Setting a threshold of 0 for a subscription promptly deletes it.
POST https://sentry.aleno.ai/subscriptions
No query parameters.
Name | Required | Type | Description |
---|---|---|---|
SubscriptionCreateData is an object that describes a subscription you want to create.
Name | Required | Type | Description |
---|---|---|---|
The result of this operation is an object that includes a list of Subscription objects, representing the updated subscriptions. Additionally, it provides the count of deleted subscriptions.
Name | Type | Description |
---|---|---|
subscriptions
required
List of SubscriptionCreateData
List that contains data related to subscriptions you want to create. Data description can be found bellow
userId
required
string
The ID of the user for this subscription.
metricKey
required
string
The key of the metric for this subscription.
threshold
required
number
The value of the threshold for alert triggering. Threshold unit is % (threshold 50 means 50%) of variation of the metric on which on alert should be triggered.
Must be in range: 0 U [0.0001, 10000].
Using a threshold of 0 will dekete the subscription.
upsertedSubscriptions
Subscription list
The list of subscrptions that have either been created or updated during the update.
numberDeletedSubscriptions
number
The number of subscriptions that have been deleted during the update