Wardterm documentation

Monitoring API

Read the status, uptime, response times and incidents of your Wardterm monitors from your own scripts and dashboards, with an API key.

Base address and key

Create a key in the app: Monitoring, API keys. Send it in every request:

Authorization: Bearer wtm_...

https://monitor-api.wardterm.com. The API is read only. Times are milliseconds since 1970 (UTC), uptime is a fraction from 0 to 1.

Endpoints

  • GET /v1/monitors: All your monitors: status, last check, uptime of 24 hours, 7 and 30 days.
  • GET /v1/monitors/<id>: One monitor.
  • GET /v1/monitors/<id>/incidents: Its incidents, newest first.
  • GET /v1/monitors/<id>/response-times: Checks, passed checks, average and longest time per hour (?hours=1 to 2160, 24 by default).

Examples

The list of monitors:

curl -H "Authorization: Bearer wtm_..." https://monitor-api.wardterm.com/v1/monitors
{
  "monitors": [
    {
      "id": "6f1c2a4e-8b0d-4e5f-9a7b-3c2d1e0f9a8b",
      "status": "up",
      "since": 1764300000000,
      "last_check": 1764345600000,
      "last_ms": 42,
      "last_error": null,
      "delayed": false,
      "uptime": { "h24": 1.0, "d7": 0.9993, "d30": 0.9998 }
    }
  ]
}

Incidents and response times of one monitor:

curl -H "Authorization: Bearer wtm_..." https://monitor-api.wardterm.com/v1/monitors/6f1c2a4e-8b0d-4e5f-9a7b-3c2d1e0f9a8b/incidents
{ "incidents": [ { "monitor_id": "6f1c2a4e-8b0d-4e5f-9a7b-3c2d1e0f9a8b", "started_at": 1764301200000, "ended_at": 1764301500000, "cause": "timeout" } ] }
curl -H "Authorization: Bearer wtm_..." "https://monitor-api.wardterm.com/v1/monitors/6f1c2a4e-8b0d-4e5f-9a7b-3c2d1e0f9a8b/response-times?hours=24"
{ "hours": [ { "hour": 1764342000000, "checks": 60, "up": 60, "avg_ms": 41, "max_ms": 97 } ] }

Limits and errors

60 requests a minute per key, 10 active keys per account. Revoke a key in the app and it stops working.

  • 401 unauthorized: the key is missing, wrong or revoked.
  • 403 pro_required: monitoring needs Pro, Team or Business.
  • 404 not_found: no such monitor or address.
  • 429 rate_limited: over 60 requests a minute.
  • 503 delayed: data is late, try again in a few minutes.

Errors come as JSON:

{ "error": "rate_limited", "message": "60 requests a minute per key." }