List alert recommendations
curl --request GET \
--url https://api.cloud.corbado.io/v1/observe/alertRecommendations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloud.corbado.io/v1/observe/alertRecommendations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloud.corbado.io/v1/observe/alertRecommendations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloud.corbado.io/v1/observe/alertRecommendations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cloud.corbado.io/v1/observe/alertRecommendations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cloud.corbado.io/v1/observe/alertRecommendations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.corbado.io/v1/observe/alertRecommendations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"running": true,
"recommendations": [
{
"key": "<string>",
"ruleType": "relative_flow_count",
"rule": {
"version": 1,
"type": "relative_flow_count",
"window": "<string>",
"conditions": [
{
"severity": "info",
"operator": "above",
"threshold": 123
}
],
"groupBy": [
"<string>"
],
"filters": [
{}
],
"maxInstances": 250,
"settings": {},
"recovery": {
"operator": "above",
"threshold": 123
},
"for": "<string>",
"noData": "ok",
"evaluationHours": {
"mode": "always",
"timezone": "<string>",
"ranges": [
{
"weekdays": [
"mon"
],
"start": "09:00",
"end": "18:00"
}
]
},
"overrides": [
{
"match": {},
"conditions": [
{
"severity": "info",
"operator": "above",
"threshold": 123
}
],
"recovery": {
"operator": "above",
"threshold": 123
},
"for": "<string>",
"noData": "ok",
"settings": {},
"evaluationHours": {
"mode": "always",
"timezone": "<string>",
"ranges": [
{
"weekdays": [
"mon"
],
"start": "09:00",
"end": "18:00"
}
]
}
}
]
},
"label": "<string>",
"position": 123,
"status": "simulated",
"variant": "<string>",
"days": 123,
"perSlot": 123,
"coverage": {
"groups": 123,
"alertableGroups": 123,
"coveredShare": 123,
"largestShare": 123,
"hiddenShare": 123
},
"dimensions": [
{
"dimension": "<string>",
"name": "<string>",
"coverage": {
"groups": 123,
"alertableGroups": 123,
"coveredShare": 123,
"largestShare": 123,
"hiddenShare": 123
},
"recommended": true,
"reason": "no_volume"
}
],
"daily": [
123
],
"groups": [
{
"value": "<string>",
"perSlot": 123,
"share": 123,
"daysPresent": 123,
"alertable": true,
"daily": [
123
],
"otherGroups": 123,
"otherAlertableGroups": 123,
"dailyRate": [
123
],
"fired": 123,
"firedPerHour": [
123
]
}
],
"notSimulatedReason": "budget",
"dimension": "<string>",
"dimensionName": "<string>",
"fromMs": 123,
"toMs": 123,
"dailyRate": [
123
],
"simulation": {
"fired": 123,
"days": 123,
"groups": [
{
"labels": {},
"fired": 123
}
],
"refinementComplete": true,
"forecasts": 123,
"topGroups": 123,
"fromMs": 123,
"toMs": 123,
"firedPerHour": [
123
]
}
}
],
"run": {
"id": "<string>",
"status": "running",
"startedMs": 123,
"candidates": 123,
"recommendations": 123,
"simulated": 123,
"forecastsUsed": 123,
"budget": 123,
"finishedMs": 123,
"skippedExisting": 123,
"skippedDismissed": 123
}
}{
"error": {
"message": "Validation failed",
"details": [
{
"field": "projectID",
"message": "required"
}
]
}
}Alert management
List alert recommendations
Returns the alert rules recommended for the project by the last generation that finished with results
(run), in their order, without the recommendations dismissed since. Without such a generation run is
absent and recommendations is empty. running says whether a generation is in progress right now; its
recommendations replace these once it finishes.
Each recommendation carries a complete rule config (rule) to create the rule with as it is, or to tune
first: thresholds and ranges are the rule type’s defaults.
Required API key permission: observe:alerts:read.
GET
/
observe
/
alertRecommendations
List alert recommendations
curl --request GET \
--url https://api.cloud.corbado.io/v1/observe/alertRecommendations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloud.corbado.io/v1/observe/alertRecommendations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloud.corbado.io/v1/observe/alertRecommendations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloud.corbado.io/v1/observe/alertRecommendations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cloud.corbado.io/v1/observe/alertRecommendations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cloud.corbado.io/v1/observe/alertRecommendations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.corbado.io/v1/observe/alertRecommendations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"running": true,
"recommendations": [
{
"key": "<string>",
"ruleType": "relative_flow_count",
"rule": {
"version": 1,
"type": "relative_flow_count",
"window": "<string>",
"conditions": [
{
"severity": "info",
"operator": "above",
"threshold": 123
}
],
"groupBy": [
"<string>"
],
"filters": [
{}
],
"maxInstances": 250,
"settings": {},
"recovery": {
"operator": "above",
"threshold": 123
},
"for": "<string>",
"noData": "ok",
"evaluationHours": {
"mode": "always",
"timezone": "<string>",
"ranges": [
{
"weekdays": [
"mon"
],
"start": "09:00",
"end": "18:00"
}
]
},
"overrides": [
{
"match": {},
"conditions": [
{
"severity": "info",
"operator": "above",
"threshold": 123
}
],
"recovery": {
"operator": "above",
"threshold": 123
},
"for": "<string>",
"noData": "ok",
"settings": {},
"evaluationHours": {
"mode": "always",
"timezone": "<string>",
"ranges": [
{
"weekdays": [
"mon"
],
"start": "09:00",
"end": "18:00"
}
]
}
}
]
},
"label": "<string>",
"position": 123,
"status": "simulated",
"variant": "<string>",
"days": 123,
"perSlot": 123,
"coverage": {
"groups": 123,
"alertableGroups": 123,
"coveredShare": 123,
"largestShare": 123,
"hiddenShare": 123
},
"dimensions": [
{
"dimension": "<string>",
"name": "<string>",
"coverage": {
"groups": 123,
"alertableGroups": 123,
"coveredShare": 123,
"largestShare": 123,
"hiddenShare": 123
},
"recommended": true,
"reason": "no_volume"
}
],
"daily": [
123
],
"groups": [
{
"value": "<string>",
"perSlot": 123,
"share": 123,
"daysPresent": 123,
"alertable": true,
"daily": [
123
],
"otherGroups": 123,
"otherAlertableGroups": 123,
"dailyRate": [
123
],
"fired": 123,
"firedPerHour": [
123
]
}
],
"notSimulatedReason": "budget",
"dimension": "<string>",
"dimensionName": "<string>",
"fromMs": 123,
"toMs": 123,
"dailyRate": [
123
],
"simulation": {
"fired": 123,
"days": 123,
"groups": [
{
"labels": {},
"fired": 123
}
],
"refinementComplete": true,
"forecasts": 123,
"topGroups": 123,
"fromMs": 123,
"toMs": 123,
"firedPerHour": [
123
]
}
}
],
"run": {
"id": "<string>",
"status": "running",
"startedMs": 123,
"candidates": 123,
"recommendations": 123,
"simulated": 123,
"forecastsUsed": 123,
"budget": 123,
"finishedMs": 123,
"skippedExisting": 123,
"skippedDismissed": 123
}
}{
"error": {
"message": "Validation failed",
"details": [
{
"field": "projectID",
"message": "required"
}
]
}
}Authorizations
Was this page helpful?