Retrieve an alert
curl --request GET \
--url https://api.orq.ai/v2/alerts/{alert_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.orq.ai/v2/alerts/{alert_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.orq.ai/v2/alerts/{alert_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"alert": {
"alert_id": "<string>",
"display_name": "<string>",
"description": "<string>",
"project_id": "<string>",
"signal": "cost",
"query": {
"metric": "<string>",
"filters": [
{
"field": "<string>",
"op": "eq",
"values": [
"<string>"
]
}
]
},
"condition": {
"comparator": "gt",
"threshold": 123,
"window": "5m",
"interval": "5m",
"degraded_threshold": 123,
"resolve_threshold": 123,
"delay": "30s"
},
"notifier_ids": [
"<string>"
],
"enabled": true,
"status": "ok",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_id": "<string>",
"updated_by_id": "<string>",
"last_triggered_at": "2023-11-07T05:31:56Z",
"recent_runs": [
{
"at": "2023-11-07T05:31:56Z",
"value": 123,
"breached": true,
"has_data": true,
"severity": "critical"
}
],
"display": {
"visualization": "lines",
"preview_range": "1h"
}
}
}Alerts
Retrieve an alert
Retrieves an alert by ID.
GET
/
v2
/
alerts
/
{alert_id}
Retrieve an alert
curl --request GET \
--url https://api.orq.ai/v2/alerts/{alert_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.orq.ai/v2/alerts/{alert_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.orq.ai/v2/alerts/{alert_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"alert": {
"alert_id": "<string>",
"display_name": "<string>",
"description": "<string>",
"project_id": "<string>",
"signal": "cost",
"query": {
"metric": "<string>",
"filters": [
{
"field": "<string>",
"op": "eq",
"values": [
"<string>"
]
}
]
},
"condition": {
"comparator": "gt",
"threshold": 123,
"window": "5m",
"interval": "5m",
"degraded_threshold": 123,
"resolve_threshold": 123,
"delay": "30s"
},
"notifier_ids": [
"<string>"
],
"enabled": true,
"status": "ok",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_id": "<string>",
"updated_by_id": "<string>",
"last_triggered_at": "2023-11-07T05:31:56Z",
"recent_runs": [
{
"at": "2023-11-07T05:31:56Z",
"value": 123,
"breached": true,
"has_data": true,
"severity": "critical"
}
],
"display": {
"visualization": "lines",
"preview_range": "1h"
}
}
}Was this page helpful?
⌘I