Monitors
List monitors
Required API key scope: status:view.
List monitors Required API key scope: `status:view`. GET https://api.appgram.dev/api/v1/monitors curl --request GET \ --url 'https://api.appgram.dev/api/v1/monitors' \ --header 'x-api-key: <api-key>' Authentication: x-api-key (header) 200: OK 400: Bad Request 401: Unauthorized 403: Forbidden 500: Internal Server Error
Authorizations
x-api-key (header)requiredRequest examples show the credential location. Use a server-side key with the permissions required by this operation.
Query parameters
status_page_idstringqueryResponses
200OK
400Bad Request
401Unauthorized
403Forbidden
500Internal Server Error
curl --request GET \
--url 'https://api.appgram.dev/api/v1/monitors' \
--header 'x-api-key: <api-key>'const response = await fetch("https://api.appgram.dev/api/v1/monitors", {
method: "GET",
headers: {
"x-api-key": "<api-key>"
},
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.text());
import requests
response = requests.request(
"GET",
"https://api.appgram.dev/api/v1/monitors",
headers={"x-api-key": "<api-key>"},
timeout=30,
)
response.raise_for_status()
print(response.text)
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.appgram.dev/api/v1/monitors"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import Foundation
var request = URLRequest(url: URL(string: "https://api.appgram.dev/api/v1/monitors")!)
request.httpMethod = "GET"
request.setValue("<api-key>", forHTTPHeaderField: "x-api-key")
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))
// Requires OkHttp 4.x.
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.RequestBody.Companion.toRequestBody
fun main() {
val request = Request.Builder()
.url("https://api.appgram.dev/api/v1/monitors")
.method("GET", null)
.addHeader("x-api-key", "<api-key>")
.build()
OkHttpClient().newCall(request).execute().use { response ->
println(response.body?.string())
}
}
// Requires package:http in pubspec.yaml.
import 'package:http/http.dart' as http;
Future<void> main() async {
final request = http.Request("GET", Uri.parse("https://api.appgram.dev/api/v1/monitors"));
request.headers.addAll({
"x-api-key": "<api-key>",
});
final response = await request.send();
print(await response.stream.bytesToString());
}
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.appgram.dev/api/v1/monitors"),
Headers =
{
{ "x-api-key", "<api-key>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}[
{
"auto_create_incident": true,
"check_interval_seconds": 0,
"check_regions": [
"string"
],
"consecutive_failures": 0,
"consecutive_successes": 0,
"created_at": "1970-01-01T00:00:00.000Z",
"current_response_time_ms": 0,
"current_status": "degraded",
"degraded_response_time_ms": 0,
"description": "string",
"expected_response_contains": "string",
"expected_status_codes": [
0
],
"failure_threshold": 0,
"http_body": "string",
"http_headers": {},
"http_method": "string",
"id": "string",
"incident_severity": "string",
"is_active": true,
"last_check_at": "1970-01-01T00:00:00.000Z",
"last_down_at": "1970-01-01T00:00:00.000Z",
"last_status_change_at": "1970-01-01T00:00:00.000Z",
"last_up_at": "1970-01-01T00:00:00.000Z",
"monitor_type": "dns",
"name": "string",
"notify_on_failure": true,
"notify_on_recovery": true,
"recovery_threshold": 0,
"service_id": "string",
"ssl_expiry_warning_days": 0,
"status_page_id": "string",
"timeout_seconds": 0,
"updated_at": "1970-01-01T00:00:00.000Z",
"url": "string",
"verify_ssl": true
}
]