Get Alert (OpsGenie)
curl --request GET \
--url https://api.warrn.io/v2/alerts/{identifier} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.warrn.io/v2/alerts/{identifier}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.warrn.io/v2/alerts/{identifier}', 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.warrn.io/v2/alerts/{identifier}",
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.warrn.io/v2/alerts/{identifier}"
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.warrn.io/v2/alerts/{identifier}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.warrn.io/v2/alerts/{identifier}")
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": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tinyId": "<string>",
"alias": "<string>",
"message": "<string>",
"tags": [
"<string>"
],
"teams": [
{
"name": "<string>"
}
]
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "Unauthorized"
}{
"detail": "Not found"
}OpsGenie Compatible
Get Alert (OpsGenie)
Retrieve a single alert in OpsGenie response format. Supports lookup by alias, ID, or tiny ID.
GET
/
v2
/
alerts
/
{identifier}
Get Alert (OpsGenie)
curl --request GET \
--url https://api.warrn.io/v2/alerts/{identifier} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.warrn.io/v2/alerts/{identifier}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.warrn.io/v2/alerts/{identifier}', 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.warrn.io/v2/alerts/{identifier}",
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.warrn.io/v2/alerts/{identifier}"
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.warrn.io/v2/alerts/{identifier}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.warrn.io/v2/alerts/{identifier}")
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": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tinyId": "<string>",
"alias": "<string>",
"message": "<string>",
"tags": [
"<string>"
],
"teams": [
{
"name": "<string>"
}
]
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "Unauthorized"
}{
"detail": "Not found"
}Authorizations
Bearer token using your Warrn API key.
Path Parameters
Query Parameters
Available options:
id, alias, tiny ⌘I