cURL
curl --request POST \
--url https://{tenant}.chronosphere.io/api/v1/data/alerts \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"active_time_range": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"alert_ids": [
"<string>"
],
"alert_title_contains": "<string>",
"external_connections": [
{
"destination_identity": "<string>",
"slug": "<string>"
}
],
"label_filters": [
{
"label_matchers": [
{
"matcher": {
"name": "<string>",
"value": "<string>"
}
}
]
}
],
"monitor_name_contains": "<string>",
"monitor_slugs": [
"<string>"
],
"notifier_slugs": [
"<string>"
],
"slo_name_contains": "<string>",
"slo_slugs": [
"<string>"
],
"source_collection_slugs": [
"<string>"
],
"source_team_slugs": [
"<string>"
],
"trigger_time_range": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
}
},
"page": {
"max_size": 123,
"token": "<string>"
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/data/alerts"
payload := strings.NewReader("{\n \"filter\": {\n \"active_time_range\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n },\n \"alert_ids\": [\n \"<string>\"\n ],\n \"alert_title_contains\": \"<string>\",\n \"external_connections\": [\n {\n \"destination_identity\": \"<string>\",\n \"slug\": \"<string>\"\n }\n ],\n \"label_filters\": [\n {\n \"label_matchers\": [\n {\n \"matcher\": {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"monitor_name_contains\": \"<string>\",\n \"monitor_slugs\": [\n \"<string>\"\n ],\n \"notifier_slugs\": [\n \"<string>\"\n ],\n \"slo_name_contains\": \"<string>\",\n \"slo_slugs\": [\n \"<string>\"\n ],\n \"source_collection_slugs\": [\n \"<string>\"\n ],\n \"source_team_slugs\": [\n \"<string>\"\n ],\n \"trigger_time_range\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"page\": {\n \"max_size\": 123,\n \"token\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.chronosphere.io/api/v1/data/alerts")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"active_time_range\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n },\n \"alert_ids\": [\n \"<string>\"\n ],\n \"alert_title_contains\": \"<string>\",\n \"external_connections\": [\n {\n \"destination_identity\": \"<string>\",\n \"slug\": \"<string>\"\n }\n ],\n \"label_filters\": [\n {\n \"label_matchers\": [\n {\n \"matcher\": {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"monitor_name_contains\": \"<string>\",\n \"monitor_slugs\": [\n \"<string>\"\n ],\n \"notifier_slugs\": [\n \"<string>\"\n ],\n \"slo_name_contains\": \"<string>\",\n \"slo_slugs\": [\n \"<string>\"\n ],\n \"source_collection_slugs\": [\n \"<string>\"\n ],\n \"source_team_slugs\": [\n \"<string>\"\n ],\n \"trigger_time_range\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"page\": {\n \"max_size\": 123,\n \"token\": \"<string>\"\n }\n}")
.asString();const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: {
active_time_range: {end: '2023-11-07T05:31:56Z', start: '2023-11-07T05:31:56Z'},
alert_ids: ['<string>'],
alert_title_contains: '<string>',
external_connections: [{destination_identity: '<string>', slug: '<string>'}],
label_filters: [{label_matchers: [{matcher: {name: '<string>', value: '<string>'}}]}],
monitor_name_contains: '<string>',
monitor_slugs: ['<string>'],
notifier_slugs: ['<string>'],
slo_name_contains: '<string>',
slo_slugs: ['<string>'],
source_collection_slugs: ['<string>'],
source_team_slugs: ['<string>'],
trigger_time_range: {end: '2023-11-07T05:31:56Z', start: '2023-11-07T05:31:56Z'}
},
page: {max_size: 123, token: '<string>'}
})
};
fetch('https://{tenant}.chronosphere.io/api/v1/data/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{tenant}.chronosphere.io/api/v1/data/alerts"
payload = {
"filter": {
"active_time_range": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"alert_ids": ["<string>"],
"alert_title_contains": "<string>",
"external_connections": [
{
"destination_identity": "<string>",
"slug": "<string>"
}
],
"label_filters": [{ "label_matchers": [{ "matcher": {
"name": "<string>",
"value": "<string>"
} }] }],
"monitor_name_contains": "<string>",
"monitor_slugs": ["<string>"],
"notifier_slugs": ["<string>"],
"slo_name_contains": "<string>",
"slo_slugs": ["<string>"],
"source_collection_slugs": ["<string>"],
"source_team_slugs": ["<string>"],
"trigger_time_range": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
}
},
"page": {
"max_size": 123,
"token": "<string>"
}
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"alerts": [
{
"alert_id": "<string>",
"alert_title": "<string>",
"collection_slug": "<string>",
"external_connections": [
{
"destination_identity": "<string>",
"slug": "<string>"
}
],
"firing_status": "RESOLVED",
"monitor_labels": {},
"monitor_name": "<string>",
"monitor_slug": "<string>",
"mute_status": "MUTED",
"notification_policy_slug": "<string>",
"notifier_slugs": [
"<string>"
],
"resolved_at": "2023-11-07T05:31:56Z",
"severity": "WARN",
"signal": {},
"slo_name": "<string>",
"slo_slug": "<string>",
"triggered_at": "2023-11-07T05:31:56Z"
}
],
"page": {
"next_token": "<string>"
},
"total_count": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}ListAlerts
Lists the alerts that fired for this tenant, most recently triggered first. The trigger time window is always closed and defaults to the last hour.
POST
/
api
/
v1
/
data
/
alerts
cURL
curl --request POST \
--url https://{tenant}.chronosphere.io/api/v1/data/alerts \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"active_time_range": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"alert_ids": [
"<string>"
],
"alert_title_contains": "<string>",
"external_connections": [
{
"destination_identity": "<string>",
"slug": "<string>"
}
],
"label_filters": [
{
"label_matchers": [
{
"matcher": {
"name": "<string>",
"value": "<string>"
}
}
]
}
],
"monitor_name_contains": "<string>",
"monitor_slugs": [
"<string>"
],
"notifier_slugs": [
"<string>"
],
"slo_name_contains": "<string>",
"slo_slugs": [
"<string>"
],
"source_collection_slugs": [
"<string>"
],
"source_team_slugs": [
"<string>"
],
"trigger_time_range": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
}
},
"page": {
"max_size": 123,
"token": "<string>"
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/data/alerts"
payload := strings.NewReader("{\n \"filter\": {\n \"active_time_range\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n },\n \"alert_ids\": [\n \"<string>\"\n ],\n \"alert_title_contains\": \"<string>\",\n \"external_connections\": [\n {\n \"destination_identity\": \"<string>\",\n \"slug\": \"<string>\"\n }\n ],\n \"label_filters\": [\n {\n \"label_matchers\": [\n {\n \"matcher\": {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"monitor_name_contains\": \"<string>\",\n \"monitor_slugs\": [\n \"<string>\"\n ],\n \"notifier_slugs\": [\n \"<string>\"\n ],\n \"slo_name_contains\": \"<string>\",\n \"slo_slugs\": [\n \"<string>\"\n ],\n \"source_collection_slugs\": [\n \"<string>\"\n ],\n \"source_team_slugs\": [\n \"<string>\"\n ],\n \"trigger_time_range\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"page\": {\n \"max_size\": 123,\n \"token\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.chronosphere.io/api/v1/data/alerts")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"active_time_range\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n },\n \"alert_ids\": [\n \"<string>\"\n ],\n \"alert_title_contains\": \"<string>\",\n \"external_connections\": [\n {\n \"destination_identity\": \"<string>\",\n \"slug\": \"<string>\"\n }\n ],\n \"label_filters\": [\n {\n \"label_matchers\": [\n {\n \"matcher\": {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"monitor_name_contains\": \"<string>\",\n \"monitor_slugs\": [\n \"<string>\"\n ],\n \"notifier_slugs\": [\n \"<string>\"\n ],\n \"slo_name_contains\": \"<string>\",\n \"slo_slugs\": [\n \"<string>\"\n ],\n \"source_collection_slugs\": [\n \"<string>\"\n ],\n \"source_team_slugs\": [\n \"<string>\"\n ],\n \"trigger_time_range\": {\n \"end\": \"2023-11-07T05:31:56Z\",\n \"start\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"page\": {\n \"max_size\": 123,\n \"token\": \"<string>\"\n }\n}")
.asString();const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: {
active_time_range: {end: '2023-11-07T05:31:56Z', start: '2023-11-07T05:31:56Z'},
alert_ids: ['<string>'],
alert_title_contains: '<string>',
external_connections: [{destination_identity: '<string>', slug: '<string>'}],
label_filters: [{label_matchers: [{matcher: {name: '<string>', value: '<string>'}}]}],
monitor_name_contains: '<string>',
monitor_slugs: ['<string>'],
notifier_slugs: ['<string>'],
slo_name_contains: '<string>',
slo_slugs: ['<string>'],
source_collection_slugs: ['<string>'],
source_team_slugs: ['<string>'],
trigger_time_range: {end: '2023-11-07T05:31:56Z', start: '2023-11-07T05:31:56Z'}
},
page: {max_size: 123, token: '<string>'}
})
};
fetch('https://{tenant}.chronosphere.io/api/v1/data/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{tenant}.chronosphere.io/api/v1/data/alerts"
payload = {
"filter": {
"active_time_range": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"alert_ids": ["<string>"],
"alert_title_contains": "<string>",
"external_connections": [
{
"destination_identity": "<string>",
"slug": "<string>"
}
],
"label_filters": [{ "label_matchers": [{ "matcher": {
"name": "<string>",
"value": "<string>"
} }] }],
"monitor_name_contains": "<string>",
"monitor_slugs": ["<string>"],
"notifier_slugs": ["<string>"],
"slo_name_contains": "<string>",
"slo_slugs": ["<string>"],
"source_collection_slugs": ["<string>"],
"source_team_slugs": ["<string>"],
"trigger_time_range": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
}
},
"page": {
"max_size": 123,
"token": "<string>"
}
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"alerts": [
{
"alert_id": "<string>",
"alert_title": "<string>",
"collection_slug": "<string>",
"external_connections": [
{
"destination_identity": "<string>",
"slug": "<string>"
}
],
"firing_status": "RESOLVED",
"monitor_labels": {},
"monitor_name": "<string>",
"monitor_slug": "<string>",
"mute_status": "MUTED",
"notification_policy_slug": "<string>",
"notifier_slugs": [
"<string>"
],
"resolved_at": "2023-11-07T05:31:56Z",
"severity": "WARN",
"signal": {},
"slo_name": "<string>",
"slo_slug": "<string>",
"triggered_at": "2023-11-07T05:31:56Z"
}
],
"page": {
"next_token": "<string>"
},
"total_count": "<string>"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
Chronosphere API token
Body
application/json
Which alerts to return. An omitted filter, an empty filter and a filter
that sets neither trigger_time_range nor active_time_range are all
treated alike: the default one hour trigger-time window applies. Every
other unset field places no constraint, so an empty filter returns every
alert in that window.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The order alerts are returned in. Defaults to TRIGGERED_DESC.
Available options:
TRIGGERED_DESC, TRIGGERED_ASC