Skip to main content
GET
/
monitor
/
{id}
/
alert
List all Alerts for a Monitor
curl --request GET \
  --url https://api.alerty.ai/monitor/{id}/alert \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.alerty.ai/monitor/{id}/alert"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.alerty.ai/monitor/{id}/alert', 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.alerty.ai/monitor/{id}/alert",
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.alerty.ai/monitor/{id}/alert"

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.alerty.ai/monitor/{id}/alert")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.alerty.ai/monitor/{id}/alert")

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
[
  {
    "id": "5df33a85-2b9c-40e3-8854-760ee3b8efc7",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "title": "<string>",
    "description": "<string>",
    "query": "<string>",
    "monitor": {
      "id": "5df33a85-2b9c-40e3-8854-760ee3b8efc7",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "resourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "recipients": [
        {
          "id": "5df33a85-2b9c-40e3-8854-760ee3b8efc7",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z",
          "integration": {
            "id": "5df33a85-2b9c-40e3-8854-760ee3b8efc7",
            "createdAt": "2023-11-07T05:31:56Z",
            "updatedAt": "2023-11-07T05:31:56Z",
            "configuration": {
              "teamId": "<string>",
              "accessToken": "<string>",
              "incomingWebhookURL": "<string>",
              "channelID": "<string>"
            }
          },
          "integrationOverride": {
            "teamId": "<string>",
            "accessToken": "<string>",
            "incomingWebhookURL": "<string>",
            "channelID": "<string>"
          }
        }
      ],
      "pollDurationInterval": "P3Y6M4DT12H30M5S",
      "description": "<string>",
      "snoozedUntil": "2023-11-07T05:31:56Z",
      "query": "<string>",
      "resource": {
        "id": "5df33a85-2b9c-40e3-8854-760ee3b8efc7",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "name": "<string>",
        "configuration": {
          "url": "<string>"
        }
      }
    },
    "resolvedAt": "2023-11-07T05:31:56Z",
    "resolvedBy": {
      "id": "<string>",
      "email": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "emailVerified": true,
      "profilePictureURL": "<string>"
    }
  }
]
{
"description": "A descriptive error message",
"code": 1400,
"field": "name"
}
{
"description": "A descriptive error message",
"code": 1400,
"field": "name"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

the monitor identifier Unique identifier for the entity

Example:

"5df33a85-2b9c-40e3-8854-760ee3b8efc7"

Response

successful retrieved monitor alerts

id
string<uuid>
required

Unique identifier for the entity

Example:

"5df33a85-2b9c-40e3-8854-760ee3b8efc7"

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
title
string
required

the alert title

state
enum<string>
required

state of the alert during its lifecycle

Available options:
TRIGGED,
RESOLVED
severity
enum<string>
required

alert severity

Available options:
NOT_DEFINED,
CRITICAL,
HIGH,
MEDIUM,
LOW
description
string

the alert description field

query
string

the monitor query

monitor
object

resource monitor

resolvedAt
string<date-time>

timestamp when incident was closed

resolvedBy
object