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

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

url = URI("https://api.alerty.ai/monitor/{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
{
  "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>"
    }
  }
}
{
"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 monitor retrieval

resource monitor

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
name
string
required

the monitor name

type
enum<string>
required

the monitor type

Available options:
UP_TIME,
LATENCY,
LOAD_TIME,
WEBSITE_TYPO,
STRIPE,
DOMAIN_EXPIRATION,
CERT_EXPIRATION,
CDN_CONFIGURATION,
CLOUDFLARE_REQUESTS,
CLOUDFRONT_REQUESTS,
STATUS_PAGE,
DATABASE_STORAGE_LIMIT,
DATABASE_CPU_USAGE,
DATABASE_MEMORY_USAGE
resourceId
string<uuid>
required
state
enum<string>
required

state of the monitor during its lifecycle

Available options:
ACTIVE,
PAUSED,
SNOOZED,
ERROR
status
enum<string>
required

status of the monitor

Available options:
NO_DATA,
OK,
ALERT,
WARN
priority
enum<string>
required

monitor priority

Available options:
NOT_DEFINED,
CRITICAL,
HIGH,
MEDIUM,
LOW,
INFO
recipients
object[]
required

the monitor recipients of the incidents/alerts notifications

pollDurationInterval
string<duration>

the interval in which the monitor will be checked

Example:

"P3Y6M4DT12H30M5S"

description
string

the monitor description

snoozedUntil
string<date-time>

until when the monitor will be in snoozed mode

query
string

the monitor query

resource
object