Sign Up
Home Getting Started SDK Guides AI Product Guide API Reference
Open in ChatGPT Open in Claude Open in Perplexity

GET /api/v1/monitors/{monitor_id}

GET/api/v1/monitors/{monitor_id}

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

NameLocationTypePresenceDescription
X-Project-Idheaderstring (uuid)RequiredProject UUID. Use the project associated with your API key.
monitor_idpathstring (uuid)Required

Examples

curl --request GET 'https://api.monoscope.tech/api/v1/monitors/YOUR_MONITOR_ID' \
  --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/YOUR_MONITOR_ID",
  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/YOUR_MONITOR_ID", {
  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.

FieldTypePresenceDescription
alert_configobjectRequired
alert_last_triggeredstring (yyyy-mm-ddThh:MM:ssZ)Optional
alert_recovery_thresholdnumber (double)Optional
alert_thresholdnumber (double)Required
check_interval_minsintegerRequired
created_atstring (yyyy-mm-ddThh:MM:ssZ)Required
current_statusnormal | warning | alertingRequired
current_valuenumber (double)Required
dashboard_idstring (uuid)Optional
deactivated_atstring (yyyy-mm-ddThh:MM:ssZ)Optional
deleted_atstring (yyyy-mm-ddThh:MM:ssZ)Optional
environmentstringOptional
idstring (uuid)Required
last_evaluatedstring (yyyy-mm-ddThh:MM:ssZ)Optional
log_querystringRequired
log_query_as_sqlstringRequired
muted_untilstring (yyyy-mm-ddThh:MM:ssZ)Optional
notification_countintegerRequired
project_idstring (uuid)Required
renotify_interval_minsintegerOptional
servicestringOptional
stop_after_countintegerOptional
teamsstring (uuid)[]Required
threshold_sustained_for_minsintegerRequired
time_window_minsintegerRequired
trigger_less_thanbooleanRequired
updated_atstring (yyyy-mm-ddThh:MM:ssZ)Required
visualization_typestringRequired
warning_last_triggeredstring (yyyy-mm-ddThh:MM:ssZ)Optional
warning_recovery_thresholdnumber (double)Optional
warning_thresholdnumber (double)Optional
widget_idstringOptional
JSON schema
{
  "properties": {
    "alert_config": {
      "$ref": "#/components/schemas/MonitorAlertConfig"
    },
    "alert_last_triggered": {
      "$ref": "#/components/schemas/UTCTime"
    },
    "alert_recovery_threshold": {
      "format": "double",
      "type": "number"
    },
    "alert_threshold": {
      "format": "double",
      "type": "number"
    },
    "check_interval_mins": {
      "maximum": 9223372036854776000,
      "minimum": -9223372036854776000,
      "type": "integer"
    },
    "created_at": {
      "$ref": "#/components/schemas/UTCTime"
    },
    "current_status": {
      "enum": [
        "normal",
        "warning",
        "alerting"
      ],
      "type": "string"
    },
    "current_value": {
      "format": "double",
      "type": "number"
    },
    "dashboard_id": {
      "$ref": "#/components/schemas/UUID"
    },
    "deactivated_at": {
      "$ref": "#/components/schemas/UTCTime"
    },
    "deleted_at": {
      "$ref": "#/components/schemas/UTCTime"
    },
    "environment": {
      "type": "string"
    },
    "id": {
      "$ref": "#/components/schemas/UUID"
    },
    "last_evaluated": {
      "$ref": "#/components/schemas/UTCTime"
    },
    "log_query": {
      "type": "string"
    },
    "log_query_as_sql": {
      "type": "string"
    },
    "muted_until": {
      "$ref": "#/components/schemas/UTCTime"
    },
    "notification_count": {
      "maximum": 9223372036854776000,
      "minimum": -9223372036854776000,
      "type": "integer"
    },
    "project_id": {
      "$ref": "#/components/schemas/UUID"
    },
    "renotify_interval_mins": {
      "maximum": 9223372036854776000,
      "minimum": -9223372036854776000,
      "type": "integer"
    },
    "service": {
      "type": "string"
    },
    "stop_after_count": {
      "maximum": 9223372036854776000,
      "minimum": -9223372036854776000,
      "type": "integer"
    },
    "teams": {
      "items": {
        "$ref": "#/components/schemas/UUID"
      },
      "type": "array"
    },
    "threshold_sustained_for_mins": {
      "maximum": 9223372036854776000,
      "minimum": -9223372036854776000,
      "type": "integer"
    },
    "time_window_mins": {
      "maximum": 9223372036854776000,
      "minimum": -9223372036854776000,
      "type": "integer"
    },
    "trigger_less_than": {
      "type": "boolean"
    },
    "updated_at": {
      "$ref": "#/components/schemas/UTCTime"
    },
    "visualization_type": {
      "type": "string"
    },
    "warning_last_triggered": {
      "$ref": "#/components/schemas/UTCTime"
    },
    "warning_recovery_threshold": {
      "format": "double",
      "type": "number"
    },
    "warning_threshold": {
      "format": "double",
      "type": "number"
    },
    "widget_id": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "project_id",
    "created_at",
    "updated_at",
    "check_interval_mins",
    "alert_threshold",
    "log_query",
    "log_query_as_sql",
    "trigger_less_than",
    "threshold_sustained_for_mins",
    "alert_config",
    "visualization_type",
    "teams",
    "current_status",
    "current_value",
    "notification_count",
    "time_window_mins"
  ],
  "type": "object"
}

HTTP 400

Refused; error.code says why

FieldTypePresenceDescription
errorobjectRequired
JSON schema
{
  "properties": {
    "error": {
      "$ref": "#/components/schemas/ApiProblem"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}

HTTP 401

Refused; error.code says why

FieldTypePresenceDescription
errorobjectRequired
JSON schema
{
  "properties": {
    "error": {
      "$ref": "#/components/schemas/ApiProblem"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}

HTTP 404

Refused; error.code says why

FieldTypePresenceDescription
errorobjectRequired
JSON schema
{
  "properties": {
    "error": {
      "$ref": "#/components/schemas/ApiProblem"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}

Authentication · Errors and retries · OpenAPI specification