curl --request GET \
--url https://api.withorb.com/v1/alerts \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "<string>",
"type": "\"usage_exceeded\", \"cost_exceeded\", \"credit_balance_depleted\", \"credit_balance_recovered\", or \"credit_balance_dropped\"",
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"thresholds": [
{
"value": 123
}
],
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"plan": {
"id": "m2t5akQeh2obwxeU",
"external_plan_id": "m2t5akQeh2obwxeU",
"name": "Example plan",
"plan_version": "<string>"
},
"subscription": {
"id": "<string>"
},
"metric": {
"id": "<string>"
},
"currency": "<string>",
"balance_alert_status": [
{
"threshold_value": 123,
"in_alert": true
}
]
}
],
"pagination_metadata": {
"has_more": true,
"next_cursor": "<string>"
}
}This endpoint returns a list of alerts within Orb.
The request must specify one of customer_id, external_customer_id, or subscription_id.
If querying by subscription_id, the endpoint will return the subscription level alerts as well as the plan level alerts associated with the subscription.
The list of alerts is ordered starting from the most recently created alert. This endpoint follows Orb’s standardized pagination format.
curl --request GET \
--url https://api.withorb.com/v1/alerts \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "<string>",
"type": "\"usage_exceeded\", \"cost_exceeded\", \"credit_balance_depleted\", \"credit_balance_recovered\", or \"credit_balance_dropped\"",
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"thresholds": [
{
"value": 123
}
],
"customer": {
"id": "<string>",
"external_customer_id": "<string>"
},
"plan": {
"id": "m2t5akQeh2obwxeU",
"external_plan_id": "m2t5akQeh2obwxeU",
"name": "Example plan",
"plan_version": "<string>"
},
"subscription": {
"id": "<string>"
},
"metric": {
"id": "<string>"
},
"currency": "<string>",
"balance_alert_status": [
{
"threshold_value": 123,
"in_alert": true
}
]
}
],
"pagination_metadata": {
"has_more": true,
"next_cursor": "<string>"
}
}API Keys can be issued in the Orb's web application.
The number of items to fetch. Defaults to 20.
1 <= x <= 100Cursor for pagination. This can be populated by the next_cursor value returned from the initial request.
Fetch alerts scoped to this customer_id
Fetch alerts scoped to this external_customer_id
Fetch alerts scoped to this subscription_id
OK
Show child attributes
Also referred to as alert_id in this documentation.
The type of alert. This must be a valid alert type.
credit_balance_depleted, credit_balance_dropped, credit_balance_recovered "\"usage_exceeded\", \"cost_exceeded\", \"credit_balance_depleted\", \"credit_balance_recovered\", or \"credit_balance_dropped\""
The creation time of the resource in Orb.
Whether the alert is enabled or disabled.
The thresholds that define the conditions under which the alert will be triggered.
Show child attributes
The value at which an alert will fire. For credit balance alerts, the alert will fire at or below this value. For usage and cost alerts, the alert will fire at or above this value.
The plan the alert applies to.
Show child attributes
"m2t5akQeh2obwxeU"
An optional user-defined ID for this plan resource, used throughout the system as an alias for this Plan. Use this field to identify a plan by an existing identifier in your system.
"m2t5akQeh2obwxeU"
"Example plan"
The name of the currency the credit balance or invoice cost is denominated in.
The current status of the alert. This field is only present for credit balance alerts.
Was this page helpful?