List the connections between incidents and alerts
GET
/
v2
/
incident_alerts
List
curl --request GET \
--url https://api.incident.io/v2/incident_alerts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.incident.io/v2/incident_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.incident.io/v2/incident_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.incident.io/v2/incident_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.incident.io/v2/incident_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.incident.io/v2/incident_alerts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v2/incident_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{
"incident_alerts": [
{
"alert": {
"alert_group_ids": [
"01GW2G3V0S59R238FAHPDS1R66"
],
"alert_source_id": "01GW2G3V0S59R238FAHPDS1R66",
"created_at": "2021-08-17T13:28:57.801578Z",
"deduplication_key": "4293868629",
"description": "CPU on the payments service has exceeded 75 percent for 5 minutes",
"id": "01GW2G3V0S59R238FAHPDS1R66",
"resolved_at": "2021-08-17T14:28:57.801578Z",
"source_url": "https://www.my-alerting-platform.com/alerts/my-alert-123",
"status": "firing",
"title": "*errors.withMessage: PG::Error failed to connect",
"updated_at": "2021-08-17T13:28:57.801578Z"
},
"alert_route_id": "01GW2G3V0S59R238FAHPDS1R67",
"id": "01GW2G3V0S59R238FAHPDS1R66",
"incident": {
"external_id": 123,
"id": "01FDAG4SAP5TYPT98WGR2N7W91",
"name": "Our database is sad",
"reference": "INC-123",
"status_category": "triage",
"summary": "Our database is really really sad, and we don't know why yet.",
"visibility": "public"
}
}
],
"pagination_meta": {
"after": "01FCNDV6P870EA6S7TK1DSYDG0",
"page_size": 25
}
}Authorizations
API key from your incident.io dashboard (Settings → API keys)
Query Parameters
Number of incident alerts to return per page
Required range:
1 <= x <= 50Example:
25
If provided, pass this as the 'after' param to load the next page
Example:
"01FCNDV6P870EA6S7TK1DSYDG0"
Alert that this incident alert refers to
Example:
"01FCNDV6P870EA6S7TK1DSYDG1"
Incident that this incident alert is attached to
Example:
"01FCNDV6P870EA6S7TK1DSYDG0"
Response
200 - application/json
OK response.
Show child attributes
Show child attributes
Example:
[ { "alert": { "alert_group_ids": ["01GW2G3V0S59R238FAHPDS1R66"], "alert_source_id": "01GW2G3V0S59R238FAHPDS1R66", "created_at": "2021-08-17T13:28:57.801578Z", "deduplication_key": "4293868629", "description": "CPU on the payments service has exceeded 75 percent for 5 minutes", "id": "01GW2G3V0S59R238FAHPDS1R66", "resolved_at": "2021-08-17T14:28:57.801578Z", "source_url": "https://www.my-alerting-platform.com/alerts/my-alert-123", "status": "firing", "title": "*errors.withMessage: PG::Error failed to connect", "updated_at": "2021-08-17T13:28:57.801578Z" }, "alert_route_id": "01GW2G3V0S59R238FAHPDS1R67", "id": "01GW2G3V0S59R238FAHPDS1R66", "incident": { "external_id": 123, "id": "01FDAG4SAP5TYPT98WGR2N7W91", "name": "Our database is sad", "reference": "INC-123", "status_category": "triage", "summary": "Our database is really really sad, and we don't know why yet.", "visibility": "public" } } ]
Show child attributes
Show child attributes
Example:
{ "after": "01FCNDV6P870EA6S7TK1DSYDG0", "page_size": 25 }
Was this page helpful?
⌘I
List
curl --request GET \
--url https://api.incident.io/v2/incident_alerts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.incident.io/v2/incident_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.incident.io/v2/incident_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.incident.io/v2/incident_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.incident.io/v2/incident_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.incident.io/v2/incident_alerts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v2/incident_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{
"incident_alerts": [
{
"alert": {
"alert_group_ids": [
"01GW2G3V0S59R238FAHPDS1R66"
],
"alert_source_id": "01GW2G3V0S59R238FAHPDS1R66",
"created_at": "2021-08-17T13:28:57.801578Z",
"deduplication_key": "4293868629",
"description": "CPU on the payments service has exceeded 75 percent for 5 minutes",
"id": "01GW2G3V0S59R238FAHPDS1R66",
"resolved_at": "2021-08-17T14:28:57.801578Z",
"source_url": "https://www.my-alerting-platform.com/alerts/my-alert-123",
"status": "firing",
"title": "*errors.withMessage: PG::Error failed to connect",
"updated_at": "2021-08-17T13:28:57.801578Z"
},
"alert_route_id": "01GW2G3V0S59R238FAHPDS1R67",
"id": "01GW2G3V0S59R238FAHPDS1R66",
"incident": {
"external_id": 123,
"id": "01FDAG4SAP5TYPT98WGR2N7W91",
"name": "Our database is sad",
"reference": "INC-123",
"status_category": "triage",
"summary": "Our database is really really sad, and we don't know why yet.",
"visibility": "public"
}
}
],
"pagination_meta": {
"after": "01FCNDV6P870EA6S7TK1DSYDG0",
"page_size": 25
}
}