List alerts
curl --request GET \
--url https://api.astronomer.io/labs/v1/organizations/{organizationId}/alerts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.astronomer.io/labs/v1/organizations/{organizationId}/alerts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.astronomer.io/labs/v1/organizations/{organizationId}/alerts', 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.astronomer.io/labs/v1/organizations/{organizationId}/alerts",
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.astronomer.io/labs/v1/organizations/{organizationId}/alerts"
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.astronomer.io/labs/v1/organizations/{organizationId}/alerts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronomer.io/labs/v1/organizations/{organizationId}/alerts")
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{
"alerts": [
{
"createdAt": "2022-11-22T04:37:12Z",
"createdBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"entityId": "<string>",
"entityType": "DEPLOYMENT",
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"rules": {
"properties": "<unknown>",
"patternMatches": [
{
"entityType": "DAG_ID TASK_ID",
"operatorType": "IS IS_NOT INCLUDES EXCLUDES",
"values": [
"<string>"
]
}
]
},
"updatedAt": "2022-11-22T04:37:12Z",
"updatedBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"deploymentId": "<string>",
"entityName": "<string>",
"notificationChannels": [
{
"createdAt": "2022-11-22T04:37:12Z",
"definition": "<unknown>",
"entityId": "<string>",
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"updatedAt": "2022-11-22T04:37:12Z",
"deploymentId": "<string>",
"workspaceId": "<string>"
}
],
"workspaceId": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}Alerts
List alerts
List alerts, including their notification channels. Supports filtering by alert and deployment IDs.
GET
/
organizations
/
{organizationId}
/
alerts
List alerts
curl --request GET \
--url https://api.astronomer.io/labs/v1/organizations/{organizationId}/alerts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.astronomer.io/labs/v1/organizations/{organizationId}/alerts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.astronomer.io/labs/v1/organizations/{organizationId}/alerts', 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.astronomer.io/labs/v1/organizations/{organizationId}/alerts",
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.astronomer.io/labs/v1/organizations/{organizationId}/alerts"
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.astronomer.io/labs/v1/organizations/{organizationId}/alerts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronomer.io/labs/v1/organizations/{organizationId}/alerts")
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{
"alerts": [
{
"createdAt": "2022-11-22T04:37:12Z",
"createdBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"entityId": "<string>",
"entityType": "DEPLOYMENT",
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"rules": {
"properties": "<unknown>",
"patternMatches": [
{
"entityType": "DAG_ID TASK_ID",
"operatorType": "IS IS_NOT INCLUDES EXCLUDES",
"values": [
"<string>"
]
}
]
},
"updatedAt": "2022-11-22T04:37:12Z",
"updatedBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"deploymentId": "<string>",
"entityName": "<string>",
"notificationChannels": [
{
"createdAt": "2022-11-22T04:37:12Z",
"definition": "<unknown>",
"entityId": "<string>",
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"updatedAt": "2022-11-22T04:37:12Z",
"deploymentId": "<string>",
"workspaceId": "<string>"
}
],
"workspaceId": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the Organization to which the alerts belong to.
Query Parameters
A list of IDs for specific alerts to list. The API returns details for all alerts which have been specified in this list. At most 1000.
A list of deployment IDs the alerts belong to. The API returns details for all alerts belonging only to the specified Deployments. At most 1000.
The number of results to skip before returning values.
Required range:
x >= 0The maximum number of results to return.
Required range:
0 <= x <= 1000Response
OK
The alerts that were created or updated.
Show child attributes
Show child attributes
Was this page helpful?
⌘I