Skip to Content
API ReferenceCheck Stats

Check Stats

Retrieve uptime statistics for a specific check.

Endpoint

GET /v1/public/checks/{id}/stats

Path Parameters

ParameterTypeDescription
idstringThe unique check identifier

Query Parameters

ParameterTypeDefaultDescription
fromstring (ISO 8601)24 hours agoStart date for statistics
tostring (ISO 8601)nowEnd date for statistics

Response

{ "data": { "checkId": "abc123", "period": { "from": "2025-01-14T14:30:00Z", "to": "2025-01-15T14:30:00Z" }, "uptime": { "percentage": 99.95, "totalChecks": 720, "successfulChecks": 719, "failedChecks": 1 }, "responseTime": { "average": 245, "min": 120, "max": 890, "p50": 230, "p90": 410, "p95": 550, "p99": 820 }, "timing": { "dns": { "average": 12, "p95": 25 }, "connect": { "average": 25, "p95": 45 }, "tls": { "average": 45, "p95": 80 }, "ttfb": { "average": 150, "p95": 350 } }, "incidents": { "count": 1, "totalDowntime": 300, "mtbf": 86100, "mttr": 300 } } }

Response Fields

Uptime

FieldDescription
percentageUptime percentage over the period
totalChecksTotal number of check executions
successfulChecksNumber of successful checks
failedChecksNumber of failed checks

Response Time (in milliseconds)

FieldDescription
averageMean response time
minFastest response
maxSlowest response
p5050th percentile (median)
p9090th percentile
p9595th percentile
p9999th percentile

Timing Breakdown (in milliseconds)

FieldDescription
dnsDNS resolution time
connectTCP connection time
tlsTLS handshake time
ttfbTime to first byte

Incidents

FieldDescription
countNumber of downtime incidents
totalDowntimeTotal downtime in seconds
mtbfMean time between failures in seconds
mttrMean time to recovery in seconds

Code Examples

cURL

curl -H "X-Api-Key: ek_live_your_key_here" \ "https://us-central1-exit1-dev.cloudfunctions.net/publicApi/v1/public/checks/abc123/stats?from=2025-01-01T00:00:00Z&to=2025-01-31T23:59:59Z"

JavaScript

const params = new URLSearchParams({ from: "2025-01-01T00:00:00Z", to: "2025-01-31T23:59:59Z", }); const response = await fetch( `https://us-central1-exit1-dev.cloudfunctions.net/publicApi/v1/public/checks/abc123/stats?${params}`, { headers: { "X-Api-Key": "ek_live_your_key_here", }, } ); const stats = await response.json(); console.log(stats.data);

Python

import requests response = requests.get( "https://us-central1-exit1-dev.cloudfunctions.net/publicApi/v1/public/checks/abc123/stats", headers={"X-Api-Key": "ek_live_your_key_here"}, params={ "from": "2025-01-01T00:00:00Z", "to": "2025-01-31T23:59:59Z" } ) stats = response.json() print(stats["data"])
Last updated on