View Uptime Monitor State Change History
This API endpoint gets logs of state changes for a given resource. Query parameters such as start_date, end_date, and limit allow controlling the time range and number of logs retrieved.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the resource for which state change logs are being retrieved. Example: '6fb4e64f-ad18-46e3-920c-92639adb137c'
Query Parameters
  • start_date (optional) string
    Specifies the start date for retrieving state change logs if needed. Example: '2022-04-01T21:00:00Z'
  • end_date (optional) string
  • limit (optional) positive integer
JavaScript
Response codes
const axios = require('axios');

const url = "https://statistic-query.api.pinghome.io/v1/resource/6fb4e64f-ad18-46e3-920c-92639adb137c/state-changed-logs?start_date=2022-04-01T21:00:00Z&end_date=2022-04-07T22:04:00Z&limit=4";

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