Check diagnostics
All four operations require checks:history and an owned check ID.
Paths are relative to /api/v1. MCP uses the same parameters in a tool
argument object.
days: daily history and uptime accept 7, 14, 30, 90 or 365, up to the plan’slimits.history_days. Runs and metrics accept 7, 14, 30 or 90, up tolimits.run_history_days. Without it you get 30 days, or the plan’s longest period if that’s shorter. Asking for more than the plan keeps returnsquota_exceeded(409) with the limit and billing guidance; see capabilities.time_zone: an IANA name such asAmerica/Chicago. Calendar days and timestamps use it, and the default is UTC. Every response names its zone intime_zone; capabilities returns the user’s own. An unknown name returnsinvalid_arguments.
Daily history
Section titled “Daily history”GET /checks/:id/history / get_check_history.
Returns id, time_zone, start_at, end_at, retention_days, and
days, an array of:
| Daily field | Meaning |
|---|---|
date |
Calendar date in time_zone |
run_count |
Recorded activity count |
average_duration_ms |
Mean measured duration or null |
incident_count |
Incidents starting on that date |
The window starts at midnight in time_zone, days-1 calendar days before
today, and ends now. An empty day is still represented; absence of measurements is
not zero latency.
Retained runs
Section titled “Retained runs”GET /checks/:id/runs / list_check_runs.
Accepts days, limit, cursor.
Returns id, time_zone, start_at, end_at, items, next_cursor. Each
run has:
id, received_at, nullable duration_ms, nullable probe_id, and nullable
resolver_id. Runs are paged by underlying ID, not by descending time.
No payloads, sender IPs or credentials are returned. Retention limits samples even if the requested window is longer.
Latency statistics
Section titled “Latency statistics”GET /checks/:id/metrics / get_check_metrics.
Website, DNS and TCP only; other kinds return invalid_kind.
Accepts days and at most one of probe_id or resolver_id.
Use IDs from this check’s run results; foreign sources are not accepted.
| Result | Meaning |
|---|---|
id, time_zone, start_at, end_at |
Check and calendar window in time_zone |
run_count |
All selected recorded runs |
measurement_count |
Runs with nonnegative measured duration |
probe_id, resolver_id |
Selected source or null |
min_duration_ms, average_duration_ms |
Minimum and arithmetic mean, or null |
p50_duration_ms, p95_duration_ms |
Percentiles of available durations, or null |
max_duration_ms |
Maximum measured duration or null |
Statistics pool selected samples, not per-location averages. They are not availability estimates. A run can exist without a latency measurement.
Uptime
Section titled “Uptime”GET /checks/:id/uptime / get_check_uptime.
Accepts days.
Returns id, time_zone, start_at, end_at, window_seconds, downtime_seconds,
nullable uptime_percentage, basis: "incident_free_time" and
paused_and_pending_history_available: false.
This is a rolling days-long interval ending now, clipped to check creation.
Downtime merges/clips overlapping incidents, including ongoing episodes.
Degraded and down both contribute incident time.
No recorded activity or incident evidence means the API percentage is null. Historical paused/pending periods cannot be reconstructed; do not label this as continuously verified uptime through those periods.
curl --fail-with-body --silent --show-error \ --header "Authorization: Bearer $PINGSTACK_TOKEN" \ "$PINGSTACK_BASE_URL/api/v1/checks/$PINGSTACK_CHECK_ID/uptime?days=7"Set PINGSTACK_CHECK_ID from a check response. A daily count, latency
distribution and incident-free percentage answer different questions.