Get Service Heartbeats
This API endpoint allows you to retrieve all heartbeats associated with a service by providing its ID in the path. It supports pagination via query parameters limit and page.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the service.
    Example: 'cc7e4e8b-417d-4be0-9bde-85e353a20fa4'
Query Parameters
  • page (optional) positive integer
    The page of the result. Use this parameter to paginate through results when there are multiple pages of data.
    Example: 50.
  • limit (optional) positive integer
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/service/cc7e4e8b-417d-4be0-9bde-85e353a20fa4/heartbeats?page=1&limit=50';

axios.get(url, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
})
.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).