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