AlertEvents
Retrieve alert event
Retrieves a specific alert_event by id
GET
/
v1
/
alert_events
/
{id}
Retrieve alert event
curl --request GET \
--url https://api.rootly.com/v1/alert_events/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rootly.com/v1/alert_events/{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_events/{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_events/{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_events/{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_events/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootly.com/v1/alert_events/{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_events",
"attributes": {
"alert_id": "<string>",
"source": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"user_id": 123,
"details": "<string>",
"user": {
"id": 123,
"name": "<string>",
"email": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"preferred_name": "<string>",
"full_name": "<string>",
"time_zone": "<string>"
},
"incident": {
"id": "<string>",
"sequential_id": 123,
"title": "<string>",
"slug": "<string>",
"kind": "<string>",
"status": "<string>",
"private": true,
"description": "<string>",
"started_at": "<string>",
"duration": 123,
"url": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"schedule": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"escalation_policies": [
{
"id": "<string>",
"name": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"created_at": "<string>",
"updated_at": "<string>"
},
"escalation_level": 123,
"escalation_target_type": "<string>",
"escalation_target": {
"data": {
"id": "<string>",
"type": "<string>",
"attributes": {}
}
},
"slack_channel": {
"id": "<string>",
"slack_channel_name": "<string>",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"incident_ids": [
"<string>"
]
}
},
"included": [
{
"id": "<string>",
"type": "<string>",
"attributes": {},
"relationships": {}
}
]
}{
"errors": [
{
"title": "<string>",
"status": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}Was this page helpful?
Previous
Delete alert eventDeletes a specific alert event. Only alert events with kind 'note' (user-created notes) can be deleted. System-generated events are immutable to maintain audit trail integrity.
Next
⌘I
Retrieve alert event
curl --request GET \
--url https://api.rootly.com/v1/alert_events/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rootly.com/v1/alert_events/{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_events/{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_events/{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_events/{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_events/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootly.com/v1/alert_events/{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_events",
"attributes": {
"alert_id": "<string>",
"source": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"user_id": 123,
"details": "<string>",
"user": {
"id": 123,
"name": "<string>",
"email": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"preferred_name": "<string>",
"full_name": "<string>",
"time_zone": "<string>"
},
"incident": {
"id": "<string>",
"sequential_id": 123,
"title": "<string>",
"slug": "<string>",
"kind": "<string>",
"status": "<string>",
"private": true,
"description": "<string>",
"started_at": "<string>",
"duration": 123,
"url": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"schedule": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"escalation_policies": [
{
"id": "<string>",
"name": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"created_at": "<string>",
"updated_at": "<string>"
},
"escalation_level": 123,
"escalation_target_type": "<string>",
"escalation_target": {
"data": {
"id": "<string>",
"type": "<string>",
"attributes": {}
}
},
"slack_channel": {
"id": "<string>",
"slack_channel_name": "<string>",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"incident_ids": [
"<string>"
]
}
},
"included": [
{
"id": "<string>",
"type": "<string>",
"attributes": {},
"relationships": {}
}
]
}{
"errors": [
{
"title": "<string>",
"status": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}