Get Heartbeat Event History
This API endpoint retrieves events related to a specified heartbeat. Query parameters such as limit and last_received_at allow controlling the number of events retrieved and filtering by the last received event time.

Authorization: Bearer YOUR_TOKEN


Path Parameters
  • id string
    The unique ID of the heartbeat for which events are being retrieved. Example: '47f84f9f-a742-4ef9-be40-e7d7a6fa4039'
Query Parameters
  • limit (optional) positive integer
    Specifies the maximum number of events to return, such as '10'. You can choose to include this parameter as needed.
  • last_received_at (optional) string
JavaScript
Response codes
const axios = require('axios');

const url = "https://statistic-query.api.pinghome.io/v1/heartbeat/47f84f9f-a742-4ef9-be40-e7d7a6fa4039/events?limit=10&last_received_at=2023-03-27T09:57:54Z";

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