Endpoint reference

GET /api/v1/monitors/:monitor/history

Returns check history for a specific monitor that belongs to the authenticated API key owner. This route is designed for Grafana and other external dashboards that need time-series data.

Request

GET/api/v1/monitors/:monitor/history

The :monitor path value is the monitor ID. The API key only reads monitors owned by its account.

Query paramTypeRequiredDescription
rangestringNo Time window in m, h, or d format. Examples: 30m, 24h, 7d. Default: 24h.
locationstringNo Region filter. Use all (default) to fetch all monitor regions.
limitintegerNo Max number of returned points after merge/sort. Range: 50 to 20000. Default: 2000.

Response

The payload includes monitor metadata, query details, aggregate summary values, and a points array.

{
  "success": true,
  "monitor": {
    "id": "8b0a86d1-3f5b-4a0e-8e61-3c2c50d24711",
    "name": "Primary site",
    "url": "https://status.example.com",
    "method": "GET",
    "status": "up",
    "regions": ["Ohio", "Finland"]
  },
  "query": {
    "range": "24h",
    "from": "2026-03-12T10:00:00.000Z",
    "to": "2026-03-13T10:00:00.000Z",
    "location": null,
    "locationsQueried": ["Ohio", "Finland"],
    "limit": 2000
  },
  "summary": {
    "checks": 1438,
    "upChecks": 1431,
    "uptimePercent": 99.513,
    "averageLatencyMs": 283.4,
    "latestStatus": "up",
    "latestCheckAt": "2026-03-13T09:59:00.000Z",
    "truncated": false
  },
  "points": [
    {
      "timestamp": "2026-03-12T10:00:00.000Z",
      "location": "Ohio",
      "status": "up",
      "isUp": true,
      "latencyMs": 196,
      "responseCode": 200
    }
  ]
}

Examples

Last 24 hours across all regions

curl "https://xuptimemonitor.com/api/v1/monitors/8b0a86d1-3f5b-4a0e-8e61-3c2c50d24711/history?range=24h" \
  -H "Authorization: Bearer <API_KEY>"

Last 7 days for one region

curl "https://xuptimemonitor.com/api/v1/monitors/8b0a86d1-3f5b-4a0e-8e61-3c2c50d24711/history?range=7d&location=Ohio&limit=5000" \
  -H "X-API-Key: <API_KEY>"