HTTP
, TCP
, ICMP (ping)
, SMTP
, UDP
, POP
, or IMAP
— giving you flexibility to monitor everything from APIs to mail servers and network ports.name
, select a type
from the supported protocols, specify the associated service_id
, and define conditions
(such as response time thresholds, port availability, or expected response codes). You can also customize options like whether to follow redirects or ignore SSL certificate errors for applicable types.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¶m2=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);
});
ids
as a query parameter array. This bulk deletion feature is ideal for large-scale cleanup tasks, such as retiring services, restructuring environments, or clearing out test monitors after staging deployments.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);
});
monitor_id
in the path and provide the enabled
flag in the request body, set to true
to activate the monitor or false
to deactivate it.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);
});
monitor_id
in the request path. Once deleted, the monitor will no longer perform health checks, collect availability data, or trigger alerts for the associated service.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);
});
monitor_id
in the URL path and the updated settings in the request body. This endpoint allows you to adjust the monitor’s name, type, conditions, or other parameters without needing to delete and recreate it.service_id
.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¶m2=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);
});
resource_id
in the path and specifying reminder settings in the request body. This endpoint helps ensure critical events like domain expirations or renewals are not missed by triggering notifications in advance based on your configured timeline.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);
});
resource_id
in the path and submitting the updated reminder details in the request body. This allows you to fine-tune when reminder notifications are sent to better align with current domain management timelines.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);
});
resource_id
in the path. Once deleted, the system will no longer trigger notifications for the associated domain expiration or event.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);
});
resource_id
in the path and specifying reminder settings in the request body. This ensures your team is notified before the certificate expires, helping prevent service disruptions and trust issues caused by lapsed security credentials.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);
});
resource_id
in the path and submitting new reminder details in the request body. This allows you to adjust how far in advance your team is alerted about upcoming certificate expirations.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);
});
service_id
in the path. Once deleted, no future alerts will be sent for the SSL certificate tied to that service, giving you full control over which reminders remain active.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);
});
service_id
in the URL path. This endpoint returns all monitors configured to track the service's availability, offering a centralized view of its monitoring coverage.limit
and page
query parameters. This makes it easy to retrieve monitors in manageable chunks, especially in environments where dozens or hundreds of monitors may exist across different protocols and endpoints.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);
});
monitor_id
in the URL path. This endpoint returns essential information about the monitor, such as its type (e.g., HTTP, TCP, ICMP), target URL or IP, check frequency, response validation rules, and current operational state.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);
});
monitor_id
in the URL path. Each region represents a geographic location from which health checks are performed, allowing teams to track service availability across different parts of the world.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);
});
monitor_id
in the URL path. This endpoint returns information such as certificate validity dates, issuer, and expiration status — helping ensure that HTTPS-enabled services are not only available but also securely configured.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);
});
monitor_id
in the URL path. This endpoint returns information such as the domain name, registrar details, and expiration dates — offering visibility into the domain’s lifecycle and administrative metadata.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);
});
service_id
in the URL path. This endpoint returns the settings associated with SSL expiration alerts — including how many days before expiration the reminder is set to trigger.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);
});
resource_id
in the path. This endpoint returns the reminder settings that are used to notify teams about upcoming domain expirations or other critical TLD-related events.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);
});
monitor_id
in the path. The report includes time-series data reflecting each health check, along with aggregated uptime and response statistics.start_date
, end_date
, interval
, and limit
allow you to customize the data range and granularity to suit your analysis needs. Whether you're reviewing a short outage window or generating monthly performance reports, this endpoint provides the visibility you need.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);
});
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);
});
monitor_id
in the path. This endpoint returns the alerting and automation tools that are actively linked to the monitor — such as email, Slack, webhook URLs, or other third-party services.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);
});
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);
});
service_id
and integration_id
in the path. The request body should include fields such as name
, status
, message
, and a list of affected items
(e.g., resource IDs or related entities).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);
});
resource_id
and integration_id
in the URL path. This action permanently deletes the association, meaning the monitor will no longer send incident data or notifications through that integration channel.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);
});