Skip to main content

Get Current Status

Returns the current uptime status for a monitor.
curl -X POST https://api.databuddy.cc/uptime/status \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "monitorId": "sched_abc123"
  }'

Response

status
string
Current status: up, down, or degraded
lastCheckAt
string
ISO 8601 timestamp of last check
nextCheckAt
string
ISO 8601 timestamp of next scheduled check
uptime
object
Uptime percentages for different time periods
lastCheck
object
Details of the most recent check

Example Response

{
  "status": "up",
  "lastCheckAt": "2024-03-01T17:45:00Z",
  "nextCheckAt": "2024-03-01T17:50:00Z",
  "uptime": {
    "24h": 100.0,
    "7d": 99.95,
    "30d": 99.87,
    "90d": 99.92
  },
  "lastCheck": {
    "timestamp": "2024-03-01T17:45:00Z",
    "status": "up",
    "httpCode": 200,
    "ttfbMs": 245,
    "totalMs": 312,
    "responseBytes": 4567,
    "sslValid": true,
    "sslExpiry": "2024-12-15T23:59:59Z",
    "probeRegion": "us-west",
    "error": null
  }
}

Status Values

up
string
Monitor is responding successfully (HTTP 200-299)
down
string
Monitor is not responding or returning errors
degraded
string
Monitor is responding but with elevated response times or intermittent failures

Recent Checks

Get the last N check results:
curl -X POST https://api.databuddy.cc/uptime/checks/recent \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "monitorId": "sched_abc123",
    "limit": 20
  }'

Response

Returns an array of check objects with details:
{
  "checks": [
    {
      "timestamp": "2024-03-01T17:45:00Z",
      "status": "up",
      "httpCode": 200,
      "ttfbMs": 245,
      "totalMs": 312,
      "responseBytes": 4567,
      "sslValid": true,
      "probeRegion": "us-west"
    }
  ]
}

Build docs developers (and LLMs) love