AlertSources
Retrieves an alert source
Retrieves a specific alert source by id
GET
/
v1
/
alert_sources
/
{id}
Retrieves an alert source
curl --request GET \
--url https://api.rootly.com/v1/alert_sources/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rootly.com/v1/alert_sources/{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_sources/{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_sources/{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_sources/{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_sources/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootly.com/v1/alert_sources/{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_sources",
"attributes": {
"name": "<string>",
"secret": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"enabled": true,
"alert_urgency_id": "<string>",
"deduplicate_alerts_by_key": true,
"deduplication_key_kind": "payload",
"deduplication_key_path": "<string>",
"deduplication_key_regexp": "<string>",
"owner_group_ids": [
"<string>"
],
"alert_template_attributes": {
"title": "<string>",
"description": "<string>",
"external_url": "<string>"
},
"alert_source_urgency_rules_attributes": [
{
"json_path": "<string>",
"value": "<string>",
"conditionable_type": "AlertField",
"conditionable_id": "<string>",
"alert_urgency_id": "<string>"
}
],
"sourceable_attributes": {
"auto_resolve": true,
"resolve_state": "<string>",
"accept_threaded_emails": true,
"field_mappings_attributes": [
{
"json_path": "<string>"
}
]
},
"resolution_rule_attributes": {
"enabled": true,
"identifier_matchable_type": "AlertField",
"identifier_matchable_id": "<string>",
"identifier_json_path": "<string>",
"identifier_value_regex": "<string>",
"conditions_attributes": [
{
"field": "<string>",
"value": "<string>",
"conditionable_type": "AlertField",
"conditionable_id": "<string>"
}
]
},
"alert_source_fields_attributes": [
{
"alert_field_id": "<string>",
"template_body": "<string>"
}
],
"email": "<string>",
"webhook_endpoint": "<string>"
}
},
"included": [
{
"id": "<string>",
"type": "<string>",
"attributes": {},
"relationships": {}
}
]
}{
"errors": [
{
"title": "<string>",
"status": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}Was this page helpful?
⌘I
Retrieves an alert source
curl --request GET \
--url https://api.rootly.com/v1/alert_sources/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rootly.com/v1/alert_sources/{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_sources/{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_sources/{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_sources/{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_sources/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootly.com/v1/alert_sources/{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_sources",
"attributes": {
"name": "<string>",
"secret": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"enabled": true,
"alert_urgency_id": "<string>",
"deduplicate_alerts_by_key": true,
"deduplication_key_kind": "payload",
"deduplication_key_path": "<string>",
"deduplication_key_regexp": "<string>",
"owner_group_ids": [
"<string>"
],
"alert_template_attributes": {
"title": "<string>",
"description": "<string>",
"external_url": "<string>"
},
"alert_source_urgency_rules_attributes": [
{
"json_path": "<string>",
"value": "<string>",
"conditionable_type": "AlertField",
"conditionable_id": "<string>",
"alert_urgency_id": "<string>"
}
],
"sourceable_attributes": {
"auto_resolve": true,
"resolve_state": "<string>",
"accept_threaded_emails": true,
"field_mappings_attributes": [
{
"json_path": "<string>"
}
]
},
"resolution_rule_attributes": {
"enabled": true,
"identifier_matchable_type": "AlertField",
"identifier_matchable_id": "<string>",
"identifier_json_path": "<string>",
"identifier_value_regex": "<string>",
"conditions_attributes": [
{
"field": "<string>",
"value": "<string>",
"conditionable_type": "AlertField",
"conditionable_id": "<string>"
}
]
},
"alert_source_fields_attributes": [
{
"alert_field_id": "<string>",
"template_body": "<string>"
}
],
"email": "<string>",
"webhook_endpoint": "<string>"
}
},
"included": [
{
"id": "<string>",
"type": "<string>",
"attributes": {},
"relationships": {}
}
]
}{
"errors": [
{
"title": "<string>",
"status": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}