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.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.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);
});