Authorizations
Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.
Path Parameters
Unique external identifier for the subscription. This ID is used to track the subscription across systems and must be provided to access subscription-specific alerts.
"SUB_1752779018503"
Body
Complete alert configuration including type, thresholds, and optional metric information. The alert type determines which fields are required.
Type of alert
CURRENT_USAGE_AMOUNT
, METRIC_CURRENT_USAGE_AMOUNT
, METRIC_CURRENT_USAGE_UNITS
, LIFETIME_USAGE_AMOUNT
"CURRENT_USAGE_AMOUNT"
The unique code to identify the alert.
"storage_metric_alert"
List of thresholds that will trigger this alert. At least one threshold is required.
The code of the metric associated with the alert. Required for metric-specific alert types (METRIC_CURRENT_USAGE_AMOUNT and METRIC_CURRENT_USAGE_UNITS).
"storage_metric"
The name of the alert.
"Usage Warning at 80%"
Response
Alert configuration successfully created and activated for the subscription.
Unique identifier for the alert, assigned by the system upon creation.
"fb2d17b8-c66d-4269-b38e-9d62d37812e3"
External identifier of the subscription that this alert is monitoring.
"sub_external_12345"
Type of alert
CURRENT_USAGE_AMOUNT
, METRIC_CURRENT_USAGE_AMOUNT
, METRIC_CURRENT_USAGE_UNITS
, LIFETIME_USAGE_AMOUNT
"CURRENT_USAGE_AMOUNT"
The unique code to identify the alert within a subscription. Used in API endpoints for operations on specific alerts.
"tokens_usage_alert"
Human-readable display name for the alert. Used for identification in user interfaces.
"Tokens Usage Alert"
The usage value from the last time this alert was evaluated. For monetary alerts, this represents currency amount; for unit alerts, this represents consumed units.
75.52
The date and time when this alert was last evaluated by the system. Null for newly created alerts that haven't been processed yet. The system evaluates alerts at regular intervals (typically every 5 minutes) to check if usage has crossed any configured thresholds. Date and time in ISO 8601 format.
"2023-10-01T12:00:00Z"
List of configured thresholds that trigger this alert. Includes both one-time and recurring thresholds.
[
{
"code": "warn",
"value": "80",
"recurring": false
}
]
The date and time when the alert was created. Date and time in ISO 8601 format.
"2023-10-01T12:00:00Z"