View Heartbeat Statistics
Retrieve time-based execution statistics for a specific heartbeat monitor by providing its heartbeat_id in the path. Use query parameters such as start_date, end_date, and interval to define the time range and level of detail for the data.

The response includes a list of records showing heartbeat activity over time. Each record may contain values such as:
  • tick_count — Number of expected heartbeat intervals during that period.
  • run_count — Number of actual check-ins (pings) received.
  • fail_count — Number of intervals that were missed and counted as failures.
  • complete_count — Number of successful intervals (with timely pings).
  • received_at — Timestamp of the recorded data point.

Use cases:
  • Heartbeat reliability tracking — Identify how consistently a job or service sends heartbeat pings.
  • Failure pattern detection — Analyze missed or delayed check-ins across time intervals.
  • Monitoring dashboards — Feed data into charts for visualizing heartbeat health over time.


Authorization: Bearer YOUR_TOKEN


Path Parameters
  • id string
    The unique ID of the resource for which heartbeat statistics are being retrieved. Example: '47f84f9f-a742-4ef9-be40-e7d7a6fa4039'
Query Parameters
  • interval (optional) string
    Defines the interval for retrieving statistics. This can be included based on your preference.
    Accepted values: 1h, 3h, 12h, 1d, 3d, 7d, 30d
  • start_date (optional) string
  • end_date (optional) string
JavaScript
Response codes
const axios = require('axios');

const url = "https://statistic-query.api.pinghome.io/v1/heartbeat/47f84f9f-a742-4ef9-be40-e7d7a6fa4039/statistic?interval=7d&start_date=2022-04-03T21:00:00Z&end_date=2022-04-03T22:04:00Z";

axios.get(url, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).