Monitoring
Monitoring encompasses three essential types to ensure comprehensive system health and performance: Heartbeat monitoring verifies systems are operational by sending periodic signals, alerting you if they fail to respond. Uptime monitoring continuously tracks the availability and reliability of your services, ensuring minimal downtime and quick issue detection. Server monitoring provides in-depth insights into system performance, including metrics such as CPU usage, memory consumption, disk I/O, network activity, and load averages, helping you optimize resources and identify potential issues.
Uptime Monitoring
This service delivers a robust suite of monitoring capabilities designed to maintain the reliability and performance of your resources. Users can seamlessly monitor various aspects of their systems and ensure continuous tracking of different resource types. This includes:

  • Reachability monitoring (Ping) to check if resources are online
  • Keyword monitoring to detect specified terms in response content
  • API & JSON response monitoring to verify expected JSON data and status codes
  • Port monitoring (SMTP, POP3, IMAP, TCP and etc.)
  • SSL & Domain monitoring to track actively SSL certificate and domain expiration dates, providing timely alerts to prevent interruptions.

This service integrates comprehensive monitoring solutions, offering users real-time, actionable insights to uphold resource reliability and performance.
ENDPOINTS
Expand all
  • Uptime monitoring operations
    POST/v1/resource
    DELETE/v1/resource
    PUT/v1/resource/{id}/status
    DELETE/v1/resource/{id}
    PUT/v1/resource/{id}
    POST/v1/resource/{id}/tld/reminder
    PUT/v1/resource/{id}/tld/reminder
    DELETE/v1/resource/{id}/tld/reminder
    POST/v1/resource/{id}/ssl/reminder
    PUT/v1/resource/{id}/ssl/reminder
    DELETE/v1/resource/{id}/ssl/reminder
  • Uptime monitoring records
  • Uptime monitor statistics overview
  • Integration management
Create Uptime Monitor
This API allows the creation of a new uptime monitoring resource. It includes key details like name, type, service ID, and conditions. Uptime monitors help track the availability of services and notify users when downtime occurs.

You can configure various options, such as conditions for evaluating the service's health, skipping SSL errors, and following redirects. This enables continuous monitoring and proactive detection of issues.

Common use cases:

  • Website monitoring: Set up an uptime monitor to track a website’s availability and receive alerts if it becomes unreachable.
  • API monitoring: Track API availability, including checking specific response conditions like HTTP status codes or JSON data.


Authorization: Bearer YOUR_TOKEN



Expected Behavior:


  • On success, a new uptime resource will be created, and a confirmation message will be returned.
  • If the request is unauthorized or invalid, an error message will be returned.
Request Body Parameters
  • name string
    The name of the resource (e.g., Pinghome).
  • type string
  • port string
  • data (optional) optional string
  • grace_period positive integer or zero
  • recovery_period positive integer or zero
  • maintenance_cron_expression (optional) string
  • maintenance_duration (optional) positive integer or zero
  • skip_ssl_error boolean
  • not_follow_redirect boolean
  • method string
  • body (optional) string
  • is_advanced boolean
  • headers (optional) string
  • service_id string
  • url or host string
  • conditions (when type is 'http') array of objects
  • regions array of strings
JavaScript
Response codes
const axios = require('axios');

const url = "https://resource-cmd.api.pinghome.io/v1/resource";
const data = {
    "name": "Pinghome",
    "type": "http",
    "port": "",
    "data": "",
    "grace_period": 0,
    "recovery_period": 0,
    "maintenance_cron_expression": "*/8 * * * *",
    "maintenance_duration": 5,
    "skip_ssl_error": false,
    "not_follow_redirect": false,
    "method": "POST",
    "body": "param1=value1&param2=value2",
    "is_advanced": true,
    "headers": { "Authorization": "Bearer sometoken" },
    "service_id": "14ab74bf-87a0-4565-a291-ad5c9733c53f",
    "url": "https://website-stage.ping-home.com",
    "conditions": [{
        "values": ["pinghome"],
        "operator": "equal",
        "type": "response-json-check",
        "key": "groups.user[0].name"
    }],
    "regions": ["eu-central-1"]
};

axios.post(url, data, {
    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).
Delete Multiple Uptime Monitors
This API allows users to delete multiple uptime monitoring resources in a single request. The IDs of the resources must be provided as query parameters. This feature is particularly useful for bulk operations, such as removing services that have been decommissioned or are no longer needed, making the deletion process more efficient by avoiding individual resource deletions.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the specified uptime monitoring resources will be deleted, and a confirmation message will be returned.
  • If the request is unauthorized or the IDs are invalid, an appropriate error message will be returned.
Query Parameters
  • id string
    A list of resource IDs to delete.
    Example: ['6766163a-568d-47b4-a1fa-91a0957e06d4', 'c03b02ec-244f-4d2c-8f68-3910071ed5c8']
JavaScript
Response codes
const axios = require('axios');

const url = "https://resource-cmd.api.pinghome.io/v1/resource?id=6766163a-568d-47b4-a1fa-91a0957e06d4&id=c03b02ec-244f-4d2c-8f68-3910071ed5c8";

axios.delete(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).
Change Uptime Monitor Status
This API allows authenticated users to change the status of an existing uptime monitoring resource. The ID of the resource must be included in the path, and the desired status (enable or disable) is provided in the request body. This API is useful for managing the operational status of a monitor based on current needs, such as temporarily disabling a monitor during maintenance periods or re-enabling it once the service is operational again.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the status of the uptime resource will be updated, and a confirmation message will be returned.
  • If the request is unauthorized or the provided ID is invalid, an error message will be returned, specifying the issue.
Path Parameters
  • id string
    The unique ID of the uptime resource whose status is being updated.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
Request Body Parameters
  • enabled boolean
    A boolean value that determines the status of the uptime monitoring resource. Set to true to enable the resource or false to disable it.
    Example: true
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/resource/c03b02ec-244f-4d2c-8f68-3910071ed5c8/status';
const data = { enabled: true };

axios.put(url, data, {
    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).
Delete Uptime Monitor
This API endpoint allows an authenticated user to delete a specific uptime monitoring resource by providing its unique ID in the path. Once deleted, the resource is permanently removed, and no further monitoring or alerts will occur for it.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the specified uptime resource will be deleted, and a confirmation message will be returned.
  • If the request is unauthorized or the provided ID is invalid, an error message will be returned specifying the issue.
Path Parameters
  • id string
    The unique ID of the uptime resource to be deleted.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/resource/c03b02ec-244f-4d2c-8f68-3910071ed5c8';

axios.delete(url, {
    headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
    }
})
.then(response => {
    console.log('Resource deleted successfully');
})
.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).
Update Uptime Monitor
This API endpoint enables authenticated users to update the details of an uptime resource. The resource is identified by its unique ID, which must be provided in the URL path. The updated details should be sent in the request body as a JSON object.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the specified uptime resource will be updated, and a JSON object containing the updated resource details will be returned.
  • If the request is unauthorized, or details are invalid, an error message will be returned specifying the issue.
Path Parameters
  • id string
    The unique ID of the uptime resource to be updated. Example: '906a3444-15ce-4410-8041-89a238e9e91f'
Request Body Parameters
  • name string
    The name of the uptime resource. Example: 'My website'
  • is_advanced boolean
  • method string
  • grace_period positive integer or zero
  • recovery_period positive integer or zero
  • maintenance_cron_expression (optional) string
  • maintenance_duration (optional) positive integer or zero
  • skip_ssl_error boolean
  • body (optional) string
  • headers (optional) string
  • data (optional) string
  • service_id string
  • conditions array of objects
  • regions array of strings
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/resource/906a3444-15ce-4410-8041-89a238e9e91f';
const data = {
  name: 'My website',
  is_advanced: true,
  method: 'POST',
  grace_period: 1,
  recovery_period: 1,
  maintenance_cron_expression: '*/8 * * * *',
  maintenance_duration: 5,
  skip_ssl_error: false,
  body: 'param1=value1&param2=value2',
  headers: '{"Authorization": "Bearer sometoken"}',
  data: 'pinghome',
  service_id: 'cc7e4e8b-417d-4be0-9bde-85e353a20fa4',
  conditions: [{ values: ['pinghome'], operator: 'contains', key: 'groups.user[0].name', type: 'response-json-check' }],
  regions: ['eu-central-1']
};

axios.put(url, data, {
  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).
Set TLD Expiration Reminder
This API endpoint enables the creation of a TLD (Top-Level Domain) reminder by providing its ID as a path parameter and setting up the reminder details in the request body. This is used to trigger notifications for events like domain expirations or renewal deadlines.
This endpoint helps users manage important events related to their TLDs by setting up reminders for upcoming domain expirations or renewals. By configuring when reminders should be triggered (e.g., 1 day or 7 days before the event), users can avoid missing deadlines and ensure uninterrupted service.

Common use cases:

  • Domain expiration reminders: Set up reminders to notify users before a TLD is about to expire, giving them time to renew the domain.
  • Renewal reminders: Trigger reminders for domain renewal deadlines, preventing service interruptions.
  • Custom event reminders: Set reminders for other important events related to the TLD, such as DNS changes or legal obligations.


Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique service ID for which the TLD reminder will be created.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
Request Body Parameters
  • days_before array of integers
    An array of integers representing how many days before the event the reminder should be triggered.
    Example: [1]
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/{id}/tld/reminder';
const data = { days_before: [1] };

axios.post(url, data, {
  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).
Update TLD Reminder
This API endpoint enables updating an existing TLD (Top-Level Domain) reminder by providing its ID as a path parameter and updating the reminder details in the request body.

Expected Behavior:

  • On success, the TLD reminder will be updated, and a confirmation message will be returned.
  • If the request is unauthorized or the provided ID is invalid, an error message will be returned, specifying the issue.


Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique service ID for which the TLD reminder will be updated.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
Request Body Parameters
  • days_before array of integers
    An array of integers representing how many days before the event the reminder should be triggered.
    Example: [1, 3, 7]
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/{id}/tld/reminder';
const data = { days_before: [1, 3, 7] };

axios.put(url, data, {
  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).
Delete TLD Reminder
This API endpoint allows you to delete a TLD reminder by providing its ID as a path parameter.

Expected Behavior:

  • On success, the TLD reminder will be deleted, and a confirmation message will be returned.
  • If the request is unauthorized or the provided ID is invalid, an error message will be returned, specifying the issue.


Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique service ID for which the TLD reminder will be deleted.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/tld/reminder/c03b02ec-244f-4d2c-8f68-3910071ed5c8';

axios.delete(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).
Set SSL Expiration Reminder
This API endpoint enables the creation of an SSL certificate expiration reminder by providing the service ID as a path parameter and defining the reminder details in the request body.

This endpoint is useful for organizations that want to avoid SSL certificate expiration by setting up automated reminders.

Common use cases:

  • SSL certificate expiration reminder: Set up reminders to notify the team before an SSL certificate expires. You can specify how many days before expiration the reminder should be sent, ensuring enough time for renewal.


Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique service ID for which the SSL reminder will be created.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
Request Body Parameters
  • days_before array of integers
    An array of integers representing how many days before the SSL certificate expiration the reminder should be triggered.
    Example: [1]
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/ssl/reminder/c03b02ec-244f-4d2c-8f68-3910071ed5c8';
const data = { days_before: [1] };

axios.post(url, data, {
  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).
Update SSL Reminder
This API endpoint enables updating an SSL reminder by providing its service ID as a path parameter and updating the reminder details in the request body.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the SSL reminder will be updated, and a confirmation message will be returned.
  • If the request is unauthorized or the provided service ID is invalid, an error message will be returned, specifying the issue.
Path Parameters
  • id string
    The unique service ID for which the SSL reminder will be updated.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
Request Body Parameters
  • days_before array of integers
    An array of integers representing how many days before the SSL certificate expiration the reminder should be triggered.
    Example: [1]
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/ssl/reminder/c03b02ec-244f-4d2c-8f68-3910071ed5c8';
const data = { days_before: [1] };

axios.put(url, data, {
  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).
Delete SSL Reminder
This API endpoint enables deleting an SSL reminder by providing its service ID as a path parameter.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the SSL reminder will be deleted, and a confirmation message will be returned.
  • If the request is unauthorized or the provided service ID is invalid, an error message will be returned, specifying the issue.
Path Parameters
  • id string
    The unique service ID for which the SSL reminder will be deleted.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/ssl/reminder/c03b02ec-244f-4d2c-8f68-3910071ed5c8';

axios.delete(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).
Uptime Monitoring Records Collection
This API endpoint allows you to retrieve all uptime monitoring resources 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/resources?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).
Get Specific Uptime Monitor
This API endpoint allows the retrieval of a specific uptime monitor by providing its ID as a path parameter.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique resource ID to retrieve.
    Example: '906a3444-15ce-4410-8041-89a238e9e91f'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/resource/906a3444-15ce-4410-8041-89a238e9e91f';

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).
Get Uptime Monitor Regions
This API endpoint allows the retrieval of the regions associated with a specific uptime monitor by providing its ID as a path parameter.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique resource ID for which regions will be retrieved.
    Example: '906a3444-15ce-4410-8041-89a238e9e91f'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/resource/906a3444-15ce-4410-8041-89a238e9e91f/regions';

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).
View Uptime Monitor SSL Information
This API endpoint allows you to retrieve the SSL data of an uptime monitoring resource by providing its ID in the path.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the uptime resource whose SSL data will be retrieved.
    Example: '906a3444-15ce-4410-8041-89a238e9e91f'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/resource/906a3444-15ce-4410-8041-89a238e9e91f/ssl';

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).
View Uptime Monitor TLD Information
This API endpoint allows you retrieve the TLD (Top-Level Domain) data of a specific resource by providing its ID in the path.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the resource whose TLD data will be retrieved.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/resource/c03b02ec-244f-4d2c-8f68-3910071ed5c8/tld';

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).
View SSL Certificate Reminder Settings
This API endpoint allows you to retrieve the SSL reminder details for a specific resource by providing its ID.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the resource whose SSL reminder will be retrieved.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/resource/c03b02ec-244f-4d2c-8f68-3910071ed5c8/ssl/reminder';

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).
View TLD Reminder Settings
This API endpoint retrieves the TLD reminder details for a specific resource by providing its ID in the path.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the resource whose TLD reminder will be retrieved.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/resource/c03b02ec-244f-4d2c-8f68-3910071ed5c8/tld/reminder';

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).
View Uptime Monitor Performance Report
You can access a comprehensive overview of uptime and performance for a specified monitor. Query parameters such as start_date, end_date, interval, and limit allow you to tailor the data retrieval.

Authorization: Bearer YOUR_TOKEN

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

const url = "https://statistic-query.api.pinghome.io/v1/resource/47f84f9f-a742-4ef9-be40-e7d7a6fa4039/statistic?start_date=2022-04-03T21:00:00Z&end_date=2022-04-03T22:04:00Z&interval=minute&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).
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).
Uptime Monitor Integrations Retrieval
This API endpoint allows you to get the integrations of a specific uptime monitor by providing its ID in the path.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the uptime resource to retrieve the integrations for.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/resource/c03b02ec-244f-4d2c-8f68-3910071ed5c8/integrations';

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).
Configure Integration for Uptime Monitor
This API endpoint allows you to create a resource integration by providing the service ID as a path parameter and defining the integration details in the request body. Resource integrations are used to establish a connection between internal services and external platforms, enabling seamless communication and synchronization.

Common use cases:

  • Incident reporting integration: Automatically report service issues or incidents to external platforms, like StatusPage, to keep stakeholders informed.
  • Monitoring integration: Connect internal resources to monitoring tools, ensuring real-time alerts and data synchronization when key conditions are met.
  • Status synchronization: Maintain real-time status updates between your service and external systems, ensuring that all platforms reflect the current state of the service.


Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique service ID for which the integration will be created.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
Request Body Parameters
  • name string
    The name of the incident.
    Example: 'Incident name'
  • status string
  • integration string
  • type string
  • items array of strings
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/resource/{id}/integration';
const data = { name: 'Incident name', status: 'Incident status', integration: 'r276xxt51c23', type: 'statuspageIo', items: ['ggs24084vt79'] };

axios.post(url, data, {
  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).
Update Uptime Monitor Integration
This API endpoint allows an authenticated user to update an integration by providing its service ID and integration ID as path parameters, along with the updated details in the request body. This functionality is essential for keeping integrations up-to-date and aligned with changing requirements.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the integration will be updated, and a confirmation message will be returned.
  • If authorization fails, an error message will indicate this. If the service or integration ID is not found, a message specifying the issue will be provided.
Path Parameters
  • id string
    The unique service ID for which the integration will be updated.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
  • integration string
Request Body Parameters
  • name string
    The name of the incident.
    Example: 'Incident name'
  • status string
  • message string
  • items array of strings
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/resource/{id}/integration/{integration}';
const data = { name: 'Incident name', status: 'Incident status', message: 'Integration message', items: ['ggs24084vt79'] };

axios.put(url, data, {
  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).
Delete Uptime Monitor Integration
This API endpoint allows an authenticated user to delete an integration by providing its service ID and integration ID as path parameters. This action is crucial for maintaining an organized system by removing integrations that are no longer needed.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the integration will be deleted, and a confirmation message will be returned.
  • If authorization fails, an error message will indicate the issue. If the specified integration does not exist, a message stating this will be provided.
Path Parameters
  • id string
    The unique service ID for which the integration will be deleted.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
  • integration string
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/resource/c03b02ec-244f-4d2c-8f68-3910071ed5c8/integration/nh29bqqsj2fv';

axios.delete(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).
Server Monitoring
Efficiently monitor the performance and health of your servers in real-time. This feature allows you to track critical metrics such as CPU usage, memory consumption, disk activity, and more, helping you ensure optimal server operation. With proactive monitoring, you can quickly identify and address potential issues before they lead to downtime, enhancing the reliability of your services.
ENDPOINTS
Expand all
  • Server monitoring operations
    POST/v1/server-resource
    DELETE/v1/server-resource
    PUT/v1/server-resource/{id}
  • Server monitoring records
  • Server performance metrics overview
Setup Server for Monitoring
This API endpoint allows you to set up a new server for monitoring within your organization's infrastructure. By creating a new server monitoring resource, you can track the performance and availability of specific servers. To set up the server, provide essential details such as the service_id, name, description, and timezone.

Utilizing this endpoint helps organizations ensure their infrastructure operates optimally, with real-time insights into performance metrics through data visualizations.

Common use cases:

  • Infrastructure setup and management: Easily register and monitor multiple servers across various regions or time zones, ensuring comprehensive tracking of performance and availability with relevant data visualizations.
  • Historical performance analysis: Track and visualize performance metrics over time to identify trends, recurring issues, or periods of underperformance, facilitating better resource allocation and proactive problem resolution.


Authorization: Bearer YOUR_TOKEN

Request Body Parameters
  • service_id string
    The unique service ID associated with the server resource. Example: 'ed45b14d-e3ea-4f40-9a4e-16c175afad98'
  • name string
  • description string
  • timezone string
  • chart_type_default string
  • os string
  • metric_types_basic array
  • metric_types_advanced array
  • metric_types_complex array
  • interval integer
  • enabled boolean
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/server-resource';
const data = {
  service_id: 'ed45b14d-e3ea-4f40-9a4e-16c175afad98',
  name: 'Resource name',
  description: 'Resource description',
  timezone: 'Europe/Berlin',
  chart_type_default: 'line',
  os: 'ubuntu',
  metric_types_basic: ['cpu-total-usage'],
  metric_types_advanced: ['disk-io-unified'],
  metric_types_complex: ['processes-unified'],
  interval: 60,
  enabled: true
};

axios.post(url, data, {
  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).
Delete Multiple Server Monitors
This API endpoint enables you to delete multiple server monitoring resources by providing their IDs as query parameters.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the specified server monitoring resources will be deleted, and a confirmation message along with the IDs of the deleted resources will be returned.
  • If the request is unauthorized or the provided IDs are invalid, an error message will be returned, specifying the issue.
Query Parameters
  • id string
    A list of server resource IDs to delete.
    Example: ['6766163a-568d-47b4-a1fa-91a0957e06d4', 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'].
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/server-resource?id=6766163a-568d-47b4-a1fa-91a0957e06d4&id=c03b02ec-244f-4d2c-8f68-3910071ed5c8';

axios.delete(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).
Update Server Monitor
This API endpoint allows you to update a server resource by providing its unique ID in the path and specifying the updated details in the request body.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the server resource will be updated, and a confirmation message along with the updated resource ID will be returned.
  • If the request is unauthorized or the provided ID is invalid, an error message will be returned, specifying the issue.
Path Parameters
  • id string
    The unique ID of the server resource to be updated. Example: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
Request Body Parameters
  • service_id string
    The unique service ID associated with the server resource.
    Example: 'ed45b14d-e3ea-4f40-9a4e-16c175afad98'
  • name string
  • description string
  • timezone string
  • chart_type_default string
  • os string
  • metric_types_basic array
  • metric_types_advanced array
  • metric_types_complex array
  • interval integer
  • enabled boolean
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/server-resource/445a5c1f-c0eb-403a-96d7-3976e5dc74ed';
const data = {
  service_id: 'ed45b14d-e3ea-4f40-9a4e-16c175afad98',
  name: 'Resource name',
  description: 'Resource description',
  timezone: 'Europe/Berlin',
  chart_type_default: 'line',
  os: 'ubuntu',
  metric_types_basic: ['cpu-total-usage'],
  metric_types_advanced: ['disk-io-unified'],
  metric_types_complex: ['processes-unified'],
  interval: 60,
  enabled: true,
};

axios.put(url, data, {
  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).
Full List of Server Monitoring Records
This API endpoint allows an authenticated user to retrieve all server records by providing service 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: '906a3444-15ce-4410-8041-89a238e9e91f'
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/906a3444-15ce-4410-8041-89a238e9e91f/server-resources?limit=50&page=1';

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).
Get Specific Server Monitor
This API endpoint allows you to retrieve a server monitor details by providing its ID in the path.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the server resource.
    Example: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/server-resource/445a5c1f-c0eb-403a-96d7-3976e5dc74ed';

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).
View Server Performance Metrics
This API endpoint retrieves server metrics for a specific server over a specified time range. Query parameters such as type, start_date, end_date, interval, and limit can be used to control the time range and quantity of metrics retrieved.

Authorization: Bearer YOUR_TOKEN


Path Parameters
  • id string
    The unique ID of the server resource for which metrics are being retrieved. Example: '9bb4505f-6073-4a9b-abd3-cc698f695c7b'
Query Parameters
  • type string
    The type of metric being retrieved. The accepted values are: 'cpu-total-usage', 'memory-usage', 'disk-io-unified', 'disk-usage-unified', 'system-load-unified', 'swap-usage', and 'network-usage-unified'.
    Example: 'cpu-total-usage'
  • start_date (optional) string
  • end_date (optional) string
  • interval (optional) string
  • limit (optional) positive integer
JavaScript
Response codes
const axios = require('axios');

const url = 'https://statistic-query.api.pinghome.io/v1/server-resource/9bb4505f-6073-4a9b-abd3-cc698f695c7b/metrics?type=cpu-total-usage&start_date=2023-04-03T21:00:00Z&end_date=2023-04-03T22:04:00Z&interval=on-demand&limit=100';

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).
Heartbeat Monitoring
Heartbeat Monitoring is a crucial service designed to ensure the operational status of your critical systems by sending continuous requests, known as heartbeats. This proactive monitoring approach allows you to detect any potential issues or downtimes promptly, ensuring that all systems are functioning optimally and reliably. By setting up heartbeat monitors, you can receive real-time alerts and insights, helping you maintain the health of your services and quickly respond to any anomalies.
ENDPOINTS
Expand all
  • Heartbeat monitoring operations
    POST/v1/heartbeat
    DELETE/v1/heartbeat
    DELETE/v1/heartbeat/{id}
    PUT/v1/heartbeat/{id}
  • Heartbeat monitoring records
  • Heartbeat monitor statistics overview
Setup Heartbeat Monitor
This API endpoint allows you to create a new heartbeat resource.The user must provide the service_id and name for the heartbeat resource in the request body. This heartbeat will allow the monitoring of service uptime.

This endpoint helps users track the operational status of services by creating a heartbeat resource, which periodically checks the service’s status. If the service becomes unresponsive, the user will be alerted based on the heartbeat configuration.

Common use cases:

  • Service monitoring: Create a heartbeat resource to ensure that a critical service is regularly checked and downtime is quickly detected.
  • Operational health monitoring: Set up a heartbeat to receive alerts if the monitored service fails to respond at scheduled intervals.


Authorization: Bearer YOUR_TOKEN

Request Body Parameters
  • service_id string
    The unique service ID associated with the heartbeat resource.
    Example: '6766163a-568d-47b4-a1fa-91a0957e06d4'
  • name string
  • interval integer
  • enabled boolean
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/heartbeat';
const data = {
  service_id: '6766163a-568d-47b4-a1fa-91a0957e06d4',
  name: 'Pinghome',
  interval: 60,
  enabled: true
};

axios.post(url, data, {
  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).
Delete Multiple Heartbeat Monitors
This API endpoint allows you to delete multiple heartbeat resources by providing their IDs as query parameters.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the specified heartbeats will be deleted, and a confirmation message along with the IDs of the deleted heartbeats will be returned.
  • If the request is unauthorized or the provided IDs are invalid, an error message will be returned, specifying the issue.
Query Parameters
  • id string
    A list of heartbeat IDs to delete.
    Example: ['6766163a-568d-47b4-a1fa-91a0957e06d4', 'c03b02ec-244f-4d2c-8f68-3910071ed5c8']
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/heartbeat?id=6766163a-568d-47b4-a1fa-91a0957e06d4&id=c03b02ec-244f-4d2c-8f68-3910071ed5c8';

axios.delete(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).
Delete Single Heartbeat Monitor
This API endpoint allows you to delete a specific heartbeat resource by providing its ID as a path parameter.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the specified heartbeat will be deleted, and a confirmation message will be returned.
  • If the request is invalid or contains invalid parameters, an error message will indicate the issue.
Path Parameters
  • id string
    The unique ID of the heartbeat to delete.
    Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/heartbeat/c03b02ec-244f-4d2c-8f68-3910071ed5c8';

axios.delete(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).
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).
Update Heartbeat Monitor
This API endpoint allows an authenticated user to update a heartbeat resource by providing its ID as a path parameter and the updated details in the request body.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:

  • On success, the heartbeat resource will be updated, and a confirmation message will be returned.
  • If the request is invalid or cannot be processed, an error message will indicate the issue, such as an invalid URL; if the heartbeat resource is not found, an error will specify that the heartbeat does not exist.
Path Parameters
  • id string
    The unique ID of the heartbeat to update.
    Example: '906a3444-15ce-4410-8041-89a238e9e91f'
Request Body Parameters
  • name string
    The name of the heartbeat resource.
    Example: 'My heartbeat'
  • service_id string
  • interval integer
  • enabled boolean
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/heartbeat/906a3444-15ce-4410-8041-89a238e9e91f';
const data = {
  name: 'My heartbeat',
  service_id: 'cc7e4e8b-417d-4be0-9bde-85e353a20fa4',
  methods: ['GET'],
  interval: 60,
  enabled: true
};

axios.put(url, data, {
  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).
Get Specific Heartbeat Information
This API endpoint allows you to retrieve heartbeat data by providing its ID.

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the heartbeat resource.
    Example: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-query.api.pinghome.io/v1/heartbeat/445a5c1f-c0eb-403a-96d7-3976e5dc74ed';

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).
View Heartbeat Statistics
This API endpoint retrieves heartbeat statistics for a specified resource over a specified time range. Query parameters such as interval, start_date, and end_date allow controlling the time range and granularity of the statistics.

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).
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).
Submit Heartbeat Event
This API endpoint allows you to submit a heartbeat event by providing the heartbeat ID in the path.Result and message can be included in the request to submit event data.
Path Parameters
  • id string
    The ID of the heartbeat event.
Query Parameters
  • result (optional) string
    The result of the event. If not specified, it defaults to 'tick'. Other acceptable values include 'run', 'complete', and 'fail'.
    Example: 'tick'
  • message (optional) string
JavaScript
Response codes
const axios = require('axios');

const url = 'https://data-gateway.api.pinghome.io/v1/heartbeat/{id}';

axios.get(url, {
  params: {
    result: 'tick',
    message: 'Tick event sent'
  }
})
.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).