sensorhubDevelopers
Open SensorhubGet an API key
Browse documentation
REST API / Collections

alert_rules

Collection

Alert conditions. Delivery destinations are never exposed.

Max rows per query
100
Default order
id asc
Cursor paging
by id

Use read report_* for dashboard headline metrics and anchored comparison windows.

Fields

FieldTypeDescriptionFilterSort
id
indexed
stringUnique row ID.✓✓
project_id
indexed
stringProject ID from projects.✓–
name
stringRule name.✓✓
metric
stringMonitored metric.✓✓
threshold
numberTrigger threshold.✓✓
enabled
booleanWhether enabled.✓✓

Examples

Example
SELECT id, project_id, name, metric, threshold
FROM alert_rules
ORDER BY id ASC
LIMIT 25

Calling it

MCP

Tool call
query({"sql":"SELECT id, project_id, name, metric, threshold FROM alert_rules ORDER BY id ASC LIMIT 25"})

REST

curl
curl -X POST "https://app.sensorhub.ai/api/v1/query" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "sql": "SELECT id, project_id, name, metric, threshold FROM alert_rules ORDER BY id ASC LIMIT 25"
}
JSON
Row JSON Schema
json
{
  "type": "object",
  "description": "Alert conditions. Delivery destinations are never exposed.",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique row ID.",
      "x-sensorhub-indexed": true,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "project_id": {
      "type": "string",
      "description": "Project ID from projects.",
      "x-sensorhub-indexed": true,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": false
    },
    "name": {
      "type": "string",
      "description": "Rule name.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "metric": {
      "type": "string",
      "description": "Monitored metric.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "threshold": {
      "type": "number",
      "description": "Trigger threshold.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether enabled.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    }
  },
  "additionalProperties": false
}