GET /api/v1/monitors
Authenticate with Authorization: Bearer YOUR_API_KEY and X-Project-Id: YOUR_PROJECT_ID. Replace path placeholders and example values with your project's values.
Parameters
| Name | Location | Type | Presence | Description |
|---|---|---|---|---|
X-Project-Id | header | string (uuid) | Required | Project UUID. Use the project associated with your API key. |
Examples
curl --request GET 'https://api.monoscope.tech/api/v1/monitors' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'X-Project-Id: YOUR_PROJECT_ID'import requests
response = requests.get(
"https://api.monoscope.tech/api/v1/monitors",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"X-Project-Id": "YOUR_PROJECT_ID"
},
timeout=30,
)
response.raise_for_status()
print(response.text)const response = await fetch("https://api.monoscope.tech/api/v1/monitors", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"X-Project-Id": "YOUR_PROJECT_ID"
},
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.text());Responses
HTTP 200
Response defined by the API schema.
| Field | Type | Presence | Description |
|---|---|---|---|
alert_config | object | Required | |
alert_last_triggered | string (yyyy-mm-ddThh:MM:ssZ) | Optional | |
alert_recovery_threshold | number (double) | Optional | |
alert_threshold | number (double) | Required | |
check_interval_mins | integer | Required | |
created_at | string (yyyy-mm-ddThh:MM:ssZ) | Required | |
current_status | normal | warning | alerting | Required | |
current_value | number (double) | Required | |
dashboard_id | string (uuid) | Optional | |
deactivated_at | string (yyyy-mm-ddThh:MM:ssZ) | Optional | |
deleted_at | string (yyyy-mm-ddThh:MM:ssZ) | Optional | |
environment | string | Optional | |
id | string (uuid) | Required | |
last_evaluated | string (yyyy-mm-ddThh:MM:ssZ) | Optional | |
log_query | string | Required | |
log_query_as_sql | string | Required | |
muted_until | string (yyyy-mm-ddThh:MM:ssZ) | Optional | |
notification_count | integer | Required | |
project_id | string (uuid) | Required | |
renotify_interval_mins | integer | Optional | |
service | string | Optional | |
stop_after_count | integer | Optional | |
teams | string (uuid)[] | Required | |
threshold_sustained_for_mins | integer | Required | |
time_window_mins | integer | Required | |
trigger_less_than | boolean | Required | |
updated_at | string (yyyy-mm-ddThh:MM:ssZ) | Required | |
visualization_type | string | Required | |
warning_last_triggered | string (yyyy-mm-ddThh:MM:ssZ) | Optional | |
warning_recovery_threshold | number (double) | Optional | |
warning_threshold | number (double) | Optional | |
widget_id | string | Optional |
JSON schema
{
"items": {
"$ref": "#/components/schemas/QueryMonitor"
},
"type": "array"
}HTTP 400
Refused; error.code says why
| Field | Type | Presence | Description |
|---|---|---|---|
error | object | Required |
JSON schema
{
"properties": {
"error": {
"$ref": "#/components/schemas/ApiProblem"
}
},
"required": [
"error"
],
"type": "object"
}HTTP 401
Refused; error.code says why
| Field | Type | Presence | Description |
|---|---|---|---|
error | object | Required |
JSON schema
{
"properties": {
"error": {
"$ref": "#/components/schemas/ApiProblem"
}
},
"required": [
"error"
],
"type": "object"
}