Docs
Open the console →
API reference

API reference: Monitoring

Cushy monitoring API: incidents (correlated timelines), per-resource metrics, alert rules, on-demand evaluation, and the per-employee activity view.

The monitoring/alerts engine. Reads are open to members (a never-connected org gets { empty: true }); rule creation and evaluation need mutate_infra.

GET/api/monitoring/incidentsSession

Correlated incident timelines: firing/resolved alerts plus change events, newest first — reading the same metric series the alert evaluation uses.

Example response
json
{ "incidents": [ { "id": "…", "title": "…", "events": [ … ] } ], "alerts": [ … ] }
Errors
StatusWhen
401Not signed in.
GET/api/monitoring/metricsSession

Per-resource metric series (?nativeId= required): cpu, memory, network_in/out, latency_p99, error_rate. Real polled samples come from a configured per-resource metrics endpoint; a resource without one returns an honest empty.

Example response
json
{ "nativeId": "i-0a1b2c3d4e5f60001",
  "series": [ { "metric": "cpu", "unit": "percent",
      "points": [ { "ts": "2026-08-21T09:00:00.000Z", "value": 18.4 } ] } ] }
Errors
StatusWhen
400Missing nativeId.
404Unknown/cross-org native id.
GET/api/monitoring/alert-rulesSession (create: mutate_infra)

List alert rules (default rules are seeded on first connect). POST creates one (mutate_infra).

Example response
json
{ "rules": [ { "id": 1, "name": "High CPU", "metric": "cpu", "comparator": "gt",
  "threshold": 85, "durationMinutes": 5, "severity": "warn", "enabled": true } ] }
Errors
StatusWhen
401Not signed in.
POST/api/monitoring/evaluatemutate_infra

Evaluate all rules now (also fired by the connect-kick): opens firing alerts (deduplicated per rule+resource) and auto-resolves recovered ones. Audited monitoring.alert_fired/alert_resolved.

Example request
json
{}  // no body — evaluates every enabled rule for the caller's org
Example response
json
{ "ok": true, "evaluated": 4, "opened": 1, "resolved": 2 }
Errors
StatusWhen
401Not signed in.
403Your role cannot mutate infrastructure.
GET/api/monitoring/activitySession (others' activity: manage_users_sso)

Per-employee activity view over the audit trail: your own always; another member's (?userId=) requires manage_users_sso; cross-org 404.

Example response
json
{ "events": [ { "id": 918, "action": "terraform.applied", "detail": "bh-tokyo-vpc #151 v2",
  "createdAt": "2026-08-21T09:05:00.000Z", "userId": 8 } ] }
Errors
StatusWhen
400Malformed userId.
401Not signed in.
403Reading another employee's activity needs the manage_users_sso capability.
404No such user in your organization.