AlertRoutes
Get an alert route
Get a specific alert route by id. Note: This endpoint requires access to Advanced Alert Routing. If you’re unsure whether you have access to this feature, please contact Rootly customer support.
Optional Parameters
- show_nested_ids (query parameter): When set to
true, the response will include IDs for all nested resources (destinations, condition_groups, conditions). This is useful when you need to reference these nested resources for updates or deletions via PATCH requests.
Example: GET /v1/alert_routes/{id}?show_nested_ids=true
GET
/
v1
/
alert_routes
/
{id}
Get an alert route
curl --request GET \
--url https://api.rootly.com/v1/alert_routes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rootly.com/v1/alert_routes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rootly.com/v1/alert_routes/{id}', 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.rootly.com/v1/alert_routes/{id}",
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.rootly.com/v1/alert_routes/{id}"
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.rootly.com/v1/alert_routes/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootly.com/v1/alert_routes/{id}")
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{
"data": {
"id": "<string>",
"type": "alert_routes",
"attributes": {
"name": "<string>",
"alerts_source_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enabled": true,
"owning_team_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rules": [
{
"name": "<string>",
"destinations": [
{
"target_type": "Service",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"catalog_type": "Service",
"catalog_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"match_keys": [
{
"property_ref": "<string>",
"source_kind": "attribute",
"source_ref": "<string>",
"normalizers": {
"ignore_case": false,
"ignore_whitespace": false,
"strip_prefix": "<string>",
"strip_suffix": "<string>",
"extract_pattern": "<string>"
}
}
]
}
],
"condition_groups": [
{
"conditions": [
{
"property_field_condition_type": "is_one_of",
"property_field_name": "<string>",
"property_field_type": "attribute",
"property_field_value": "<string>",
"property_field_values": [
"<string>"
],
"alert_urgency_ids": [
"<string>"
],
"conditionable_type": "AlertField",
"conditionable_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 123
}
],
"position": 123,
"fallback_rule": false,
"non_paging": true,
"ai_sre_provider": "rootly",
"enabled": true
}
]
}
}
}{
"errors": [
{
"title": "<string>",
"status": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"title": "<string>",
"status": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Include the IDs of nested destinations, condition groups and conditions, for referencing them in PATCH updates or deletions
Response
alert route found
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Get an alert route
curl --request GET \
--url https://api.rootly.com/v1/alert_routes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rootly.com/v1/alert_routes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rootly.com/v1/alert_routes/{id}', 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.rootly.com/v1/alert_routes/{id}",
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.rootly.com/v1/alert_routes/{id}"
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.rootly.com/v1/alert_routes/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootly.com/v1/alert_routes/{id}")
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{
"data": {
"id": "<string>",
"type": "alert_routes",
"attributes": {
"name": "<string>",
"alerts_source_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enabled": true,
"owning_team_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rules": [
{
"name": "<string>",
"destinations": [
{
"target_type": "Service",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"catalog_type": "Service",
"catalog_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"match_keys": [
{
"property_ref": "<string>",
"source_kind": "attribute",
"source_ref": "<string>",
"normalizers": {
"ignore_case": false,
"ignore_whitespace": false,
"strip_prefix": "<string>",
"strip_suffix": "<string>",
"extract_pattern": "<string>"
}
}
]
}
],
"condition_groups": [
{
"conditions": [
{
"property_field_condition_type": "is_one_of",
"property_field_name": "<string>",
"property_field_type": "attribute",
"property_field_value": "<string>",
"property_field_values": [
"<string>"
],
"alert_urgency_ids": [
"<string>"
],
"conditionable_type": "AlertField",
"conditionable_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 123
}
],
"position": 123,
"fallback_rule": false,
"non_paging": true,
"ai_sre_provider": "rootly",
"enabled": true
}
]
}
}
}{
"errors": [
{
"title": "<string>",
"status": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"title": "<string>",
"status": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}