const axios = require('axios');
const requestBody = {
name: "John",
surname: "Smith",
email: "example@gmail.com",
password: "examplePassw0rd!"
};
axios.post('https://auth.api.pinghome.io/v1/account', requestBody)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://auth.api.pinghome.io/v1/account';
const requestBody = {
email: 'pinghome@gmail.com',
confirmation_code: '876112',
}
};
axios.patch(url, requestBody)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://auth.api.pinghome.io/v1/account/confirmation-code';
const requestBody = {
email: 'user@example.com'
};
axios.post(url, requestBody)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://auth.api.pinghome.io/v1/auth';
const requestBody = {
email: 'pinghome@gmail.com',
password: 'TestPassw0rd!'
};
axios.post(url, requestBody)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://auth.api.pinghome.io/v1/auth';
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
if (response.status === 204) {
console.log('Session deleted successfully');
}
})
.catch(error => {
console.error(error.response.data);
});
const axios = require('axios');
const url = 'https://auth.api.pinghome.io/v1/account/password';
const requestBody = {
email: 'pinghome@gmail.com'
};
axios.post(url, requestBody)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://auth.api.pinghome.io/v1/account/password';
const requestBody = {
email: 'pinghome@gmail.com',
code: '285009',
password: 'UpdatedPassw0rd!'
};
axios.patch(url, requestBody)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://auth.api.pinghome.io/v1/account/password';
const requestBody = {
previous_password: 'UpdatedPassw0rd!',
proposed_password: 'TestPassw0rd!'
};
axios.put(url, requestBody, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/v1/customer";
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://customer-cmd.api.pinghome.io/v1/customer";
const data = {
"name": "John",
"surname": "Smith"
};
axios.patch(url, data, {
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://customer-cmd.api.pinghome.io/v1/customer";
const data = {
"reason": "poor-features"
};
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
data
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/customer/username";
const data = {
"email": "pinghome@gmail.com"
};
axios.put(url, data, {
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://customer-cmd.api.pinghome.io/v1/customer/username";
const data = {
"code": "293479"
};
axios.patch(url, data, {
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://customer-cmd.api.pinghome.io/v1/customer/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel";
const data = {
"value": "+994551234567",
"type": "sms"
};
axios.post(url, data, {
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://customer-query.api.pinghome.io/v1/customer/{id}/notification-channels?include_types=sms,email&exclude_types=push-notification";
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://customer-cmd.api.pinghome.io/v1/customer/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel";
const data = {
"value": "new.email@ping-home.org",
"priority": 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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/customer/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel/verification";
const data = {
"code": "087608",
"priority": 1
};
axios.patch(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
priority
parameter is required to identify which channel to deleteconst axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/customer/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel?priority=3,4";
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/customer/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel/test";
const data = {
"priority": 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);
});
enabled
field (boolean) and the priority
of the channelenabled: false
deactivates delivery, while true
reactivates itconst axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/customer/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel/enabled";
const data = {
"enabled": true,
"priority": 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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team";
const data = {
"name": "TeamName"
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
team_id
– Unique identifier for the teamname
– Name of the teammember_count
– Total number of users in the teamcreated_at
– Timestamp of when the team was createdconst axios = require('axios');
const url = "https://customer-query.api.pinghome.io/v1/teams";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
name
for the teamteam_id
is used to identify which team to updateconst axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8";
const data = {
"name": "TeamName"
};
axios.put(url, data, {
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://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8";
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
channel
– The name of the invitation channelchannel_type
– Delivery method used (e.g., email)sender_full_name
– Name of the person who sent the invitationcreated_at
– When the invitation was createdreminded_at
– Timestamp of the last reminder sentstatus
– Invitation status (Pending, Accepted, or Declined)const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/v1/team/6fb4e64f-ad18-46e3-920c-92639adb137c/invitations";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
channel_value
– The destination address (e.g., email address)channel_type
– The method used to send the invitation (e.g., email)const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/invitation";
const data = {
"channel_value": "test@pinghome.eu",
"channel_type": "email"
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
channel_value
– The address (e.g., email) to which the invitation was sentconst axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/invitation";
const data = {
"channel_value": "test@pinghome.eu"
};
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
data: data
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
customer_id
– Unique identifier of the team memberemail
– Member’s contact emailname
– Full name of the team memberrole
– Role assigned within the team (e.g., root, manager)const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/v1/team/6fb4e64f-ad18-46e3-920c-92639adb137c/members";
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://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/member/a43b87f6-9012-4f1e-bf5f-7c2f5b6e4f29";
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
new_team_id
field.new_team_id
unchangedconst axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/member/a43b87f6-9012-4f1e-bf5f-7c2f5b6e4f29";
const data = {
"role": "user",
"new_team_id": "c03b02ec-244f-4d2c-8f68-3910071ed5c8"
};
axios.patch(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
channel_value
– The destination address where the original invitation was sent (e.g., email)const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/invitation/reminder";
const data = {
"channel_value": "test@pinghome.eu"
};
axios.post(url, data, {
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://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel";
const data = {
"value": "https://webhook.site/3f4db7ad-ca7f-4080-ab06-6056ea9eed3a",
"type": "webhook"
};
axios.post(url, data, {
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://customer-query.api.pinghome.io/v1/team/{id}/notification-channels?include_types=sms,email&exclude_types=push-notification";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
value
– The new destination for notifications (e.g., email address or URL)priority
– Identifies the specific channel to be updatedconst axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel";
const data = {
"value": "https://webhook.site/3f4db7ad-ca7f-4080-ab06-6056ea9eed3a",
"priority": 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);
});
code
– The verification code sent to the notification destinationpriority
– Identifies the channel being verifiedconst axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel/verification";
const data = {
"code": "087608",
"priority": 1
};
axios.patch(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
priority
value passed as a query parameter.const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel?priority=3,4";
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel/test";
const data = {
"priority": 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);
});
priority
of the channel and set the enabled
flag to either true
(to activate) or false
(to deactivate).const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/notification-channel/enabled";
const data = {
"enabled": true,
"priority": 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);
});
name
of the service and the team_id
it belongs to in the request body. This association ensures that each team is responsible for monitoring and responding to events tied to its own services.const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/v1/service';
const data = {
name: 'ServiceName',
team_id: '39ed7fbd-200b-41eb-8467-a91f0809e802'
};
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
) as a path parameter and the new name
in the request body. This change is reflected across all related views, including dashboards, incident logs, and monitor assignments.const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/v1/service/c03b02ec-244f-4d2c-8f68-3910071ed5c8';
const data = { name: 'ServiceName' };
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
as a path parameter. The service will be removed from the associated team’s structure, ensuring the system remains clean, organized, and free from unused entries.const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/v1/service/c03b02ec-244f-4d2c-8f68-3910071ed5c8';
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log('Service deleted successfully');
})
.catch(error => {
console.error(error);
});
service_id
. This endpoint provides key information such as the service name, its unique identifier, and usage statistics — helping teams monitor and manage their assigned services more effectively.name
– The name of the serviceservice_id
– The unique identifier assigned to the serviceresource_count
– Number of resources (e.g., servers, APIs) connected to the serviceheartbeat_count
– Number of heartbeat monitors associated with the serviceconst axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/v1/team-service/b39c7ff9-2ead-4a0d-a095-320b77d8bbdb';
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
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);
});
service_id
, name
, description
, and timezone
. This endpoint creates a server monitoring resource, allowing you to visualize essential system metrics like CPU, memory, and disk usage through charts.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);
});
monitor_ids
as query parameters. This bulk operation is ideal for cleaning up inactive, deprecated, or test servers from your monitoring environment.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);
});
monitor_id
in the path and submitting the new configuration values in the request body. You can modify properties such as the name
, description
, or timezone
to keep the server's metadata up to date.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);
});
service_id
in the path. This endpoint returns metadata for each registered server, allowing teams to see which servers are actively being monitored under a given service.limit
and page
query parameters, making it easier to manage large infrastructures and avoid overloading responses.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);
});
monitor_id
in the path. The response includes metadata such as the server name, description, timezone, and service association, allowing you to review its current configuration.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);
});
monitor_id
in the path. This endpoint allows you to query server resource usage — such as CPU, memory, disk, or network — across a specified time window.type
(e.g., cpu, memory), start_date
, end_date
, interval
(e.g., on-demand, hourly), and limit
to control the resolution and size of the returned dataset.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);
});
service_id
and name
in the request body. This resource acts as a check-in point for recurring jobs or processes that are expected to send heartbeat signals at defined intervals.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);
});
heartbeat_ids
as query parameters. This bulk operation is useful when cleaning up unused, test, or deprecated heartbeat monitors from your monitoring system.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);
});
heartbeat_id
as a path parameter. Once deleted, the associated check-in URL becomes inactive, and no further heartbeat pings will be accepted for that resource.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);
});
service_id
in the path. This endpoint returns a paginated list of heartbeats, helping you understand which recurring jobs, scripts, or processes are currently being tracked under that service.limit
and page
to control pagination and manage large sets of heartbeat monitors efficiently.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);
});
heartbeat_id
in the path and submitting the updated values in the request body. You can modify fields such as the name
or the interval
that determines when a missed heartbeat should be treated as a failure.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);
});
heartbeat_id
in the path. The response includes key details such as the monitor’s name, associated service, interval setting.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);
});
heartbeat_id
in the path. Use query parameters such as start_date
, end_date
, and interval
to define the time range and level of detail for the data.tick_count
— Number of expected heartbeat intervals during that period.run_count
— Number of actual check-ins (pings) received.fail_count
— Number of intervals that were missed and counted as failures.complete_count
— Number of successful intervals (with timely pings).received_at
— Timestamp of the recorded data point.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);
});
heartbeat_id
in the path. This endpoint returns a list of recorded heartbeat events, allowing you to track when check-ins were received and whether they were successful or missed.limit
to control the number of results and last_received_at
to fetch events after a specific timestamp, which is useful for pagination or incremental analysis.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);
});
heartbeat_id
in the path. You can also include an optional result
(e.g., success, fail) and a custom message
in the request body to describe the event outcome.fail
result to indicate that a job ran but encountered an issue.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);
});
This category facilitates the automation of incident responses through rulesets and webhook integrations, allowing for timely and efficient handling of incidents based on predefined criteria.
Learn more
Focused on monitoring incidents throughout their lifecycle, this category provides tools for tracking incident statuses, actions taken, and overall performance, ensuring effective resolution and accountability.
Learn more
This category enables the organization and management of on-call schedules for incident response teams, ensuring that appropriate personnel are available to respond to incidents at all times.
Learn more
rule type
, name
, description
, urgency level
, and assigned responders (e.g., teams).team
and organisation
, showing rules defined at different levels of your environment.const axios = require('axios');
const url = "https://incident-query.api.pinghome.io/v1/rulesets";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
type
of rule (e.g., state-change
), an array of conditions
, the target team_id
or assignees
, urgency
level, and a descriptive name
and description
for context.const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/ruleset';
const data = {
rule_type: 'state-change',
conditions: [{ values: ['10'], operator: 'equal', type: 'json-check', key: 'products[0].count' }],
level: 'team',
team_id: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8',
name: 'Name',
description: 'Description',
urgency: 'medium',
assignees: [{ type: 'team', id: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed' }]
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
ruleset_id
in the path and submitting the updated rule configuration in the request body. You can modify fields such as the type
of the rule (e.g., state-change
), the list of conditions
, urgency
, description
, name
, and assigned assignees
(e.g., team IDs).const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/ruleset/c03b02ec-244f-4d2c-8f68-3910071ed5c8';
const data = {
rule_type: 'state-change',
conditions: [{ values: ['10'], operator: 'equal', type: 'json-check', key: 'products[0].count' }],
level: 'team',
team_id: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8',
name: 'Name',
description: 'Description',
urgency: 'medium',
assignees: [{ type: 'team', id: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed' }]
};
axios.put(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
ruleset_id
in the path. Once removed, the ruleset will no longer trigger incidents based on its defined conditions.const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/ruleset/c03b02ec-244f-4d2c-8f68-3910071ed5c8';
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
ruleset_id
in the path. Each action defines what automated task should be executed when the ruleset conditions are met — such as updating a status page component or triggering a downstream system.action type
(e.g., trigger-statuspage-update
) and nested settings
that specify the source
(e.g., a resource ID being monitored), the target
(such as a status page component), and the parent
entity (e.g., the linked status page).const axios = require('axios');
const url = "https://incident-query.api.pinghome.io/v1/ruleset/c03b02ec-244f-4d2c-8f68-3910071ed5c8/actions";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
ruleset_id
in the path and submitting the updated actions
array in the request body. Each action includes a type
(such as trigger-statuspage-update
) and corresponding settings
.const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/ruleset/445a5c1f-c0eb-403a-96d7-3976e5dc74ed/actions';
const data = {
actions: [
{
type: 'trigger-alerts',
settings: [
{
status_page_id: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed',
component_id: '445a5c1f-c0eb-403a-96d7-3976e5dc74ed'
}
]
}
]
};
axios.put(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
name
, description
, enabled
status, the URL
to which events should be sent, and the created_at
timestamp.const axios = require('axios');
const url = "https://incident-query.api.pinghome.io/v1/webhooks";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
webhook_id
in the path. Each event represents a payload submitted to the webhook endpoint — typically from an external system or alerting service.content_type
of the payload, the raw body
of the received request, the sender’s IP address
, and the received_at
timestamp.last_received_at
and limit
to paginate results and retrieve only the most recent entries.const axios = require('axios');
const url = "https://incident-query.api.pinghome.io/v1/webhook/c03b02ec-244f-4d2c-8f68-3910071ed5c8/events?limit=10&last_received_at=2024-03-15T19:09:39Z";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
name
, description
. After creation, the webhook’s unique id
will be returned in the response. This ID can be used to programmatically submit event payloads to the webhook via the Submit Webhook Event endpointconst axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/webhook';
const data = {
name: "Webhook name",
description: "Webhook description"
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
webhook_id
in the path. This ID is returned when a webhook is created via the Create Webhook endpoint.const axios = require('axios');
const url = 'https://data-gateway.api.pinghome.io/v1/incident/webhook/{id}';
const data = {
example_key: 'example_value'
};
axios.post(url, data, {
headers: {
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://incident-query.api.pinghome.io/v1/health-check";
axios.get(url)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
team_id
in the path. The response includes incidents created manually or triggered through automated rulesets, allowing teams to track their current and historical incident activity.id
, status
, urgency
, created_at
, and description
, providing full visibility into the lifecycle and context of reported issues.const axios = require('axios');
const url = 'https://incident-query.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/incidents';
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
incident_id
in the path. These actions reflect both manual and automated responses triggered during the incident’s lifecycle — such as notifications, escalations, or status page updates.type
of action, the target
(e.g., service or component), and timestamps indicating when the action was executed. This gives teams clear visibility into how incidents were handled in real time.const axios = require('axios');
const url = 'https://incident-query.api.pinghome.io/v1/incident/c03b02ec-244f-4d2c-8f68-3910071ed5c8/actions';
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
team_id
in the path and submitting incident details in the request body. Required fields include the name
of the incident, a brief description
, and its urgency
level (e.g., low, medium, high).const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/team/445a5c1f-c0eb-403a-96d7-3976e5dc74ed/incident';
const data = {
name: "Incident name",
description: "Incident description",
urgency: "medium",
assignees: [
{
type: "team",
id: "445a5c1f-c0eb-403a-96d7-3976e5dc74ed"
}
],
actions: [
{
type: "trigger-alerts",
settings: [
{
status_page_id: "445a5c1f-c0eb-403a-96d7-3976e5dc74ed",
component_id: "445a5c1f-c0eb-403a-96d7-3976e5dc74ed"
}
]
}
]
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
incident_id
in the path and submitting the updated values in the request body. You can modify fields such as the name
, description
, and urgency
to reflect changes in incident context, severity, or resolution progress.const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/incident/445a5c1f-c0eb-403a-96d7-3976e5dc74ed';
const data = {
name: "Incident name",
description: "Incident description",
urgency: "medium",
assignees: [
{
type: "team",
id: "445a5c1f-c0eb-403a-96d7-3976e5dc74ed"
}
],
actions: [
{
id: "",
type: "trigger-alerts",
settings: [
{
id: "",
status_page_id: "445a5c1f-c0eb-403a-96d7-3976e5dc74ed",
component_id: "445a5c1f-c0eb-403a-96d7-3976e5dc74ed"
}
]
}
]
};
axios.put(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
customer_id
in the path. The response includes schedule entries that define which team members are responsible for incident response during specific time intervals.const axios = require('axios');
const url = "https://incident-query.api.pinghome.io/v1/customer/c03b02ec-244f-4d2c-8f68-3910071ed5c8/schedule";
axios.get(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
team_member_id
, start_date
, end_date
, and the time recurrence parameters including months_of_year
, weeks_of_month
, week_days
, and time_range
. These options provide flexible scheduling across daily, weekly, or monthly cycles.const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/team/445a5c1f-c0eb-403a-96d7-3976e5dc74ed/schedule';
const data = {
team_member_id: "445a5c1f-c0eb-403a-96d7-3976e5dc74ed",
start_date: "2024-01-01T00:00:00Z",
end_date: "2024-01-31T23:59:59Z",
months_of_year: [1],
weeks_of_month: [1],
week_days: [1],
start_time: "00:00:00",
end_time: "23:59:59"
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
team_id
in the path and submitting the updated configuration in the request body. This allows you to modify both the timing and recurrence rules that define when a team member is expected to be on-call.team_member_id
, start_date
, end_date
, and recurrence settings including months_of_year
, weeks_of_month
, week_days
, and the time_range
.team_member_id
to reflect staffing or rotation changes.const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/team/445a5c1f-c0eb-403a-96d7-3976e5dc74ed/schedule';
const data = {
team_member_id: "445a5c1f-c0eb-403a-96d7-3976e5dc74ed",
created_at: "2024-01-01T00:00:00Z",
start_date: "2024-01-01T00:00:00Z",
end_date: "2024-01-31T23:59:59Z",
months_of_year: [1],
weeks_of_month: [1],
week_days: [1],
start_time: "00:00:00",
end_time: "23:59:59"
};
axios.put(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
team_member_id
and the created_at
timestamp as query parameters. These two values uniquely identify the schedule entry that should be removed.const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/v1/team/445a5c1f-c0eb-403a-96d7-3976e5dc74ed/schedule';
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
},
params: {
'team_member_id': '445a5c1f-c0eb-403a-96d7-3976e5dc74ed',
'created_at': '2024-01-01T00:00:00Z'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://statuspage-query.api.pinghome.io/v1/statuspages";
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://statuspage-query.api.pinghome.io/v1/statuspage/c03b02ec-244f-4d2c-8f68-3910071ed5c8";
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://statuspage-query.api.pinghome.io/v1/statuspage/c03b02ec-244f-4d2c-8f68-3910071ed5c8/components";
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://statuspage-query.api.pinghome.io/v1/component/c03b02ec-244f-4d2c-8f68-3910071ed5c8/statistics";
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://statuspage-query.api.pinghome.io/v1/statuspage/c03b02ec-244f-4d2c-8f68-3910071ed5c8/unified";
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://statuspage-query.api.pinghome.io/v1/domain/status.pinghome.dev/cname";
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://statuspage-cmd.api.pinghome.io/v1/statuspage";
const data = {
name: 'Statuspage name',
description: 'Statuspage description',
subdomain: 'status',
type: 'public',
password: 'TestPassw0rd!',
domain: 'status.pinghome.io',
page_name: 'Example',
dark_theme: false,
favicon: 'org/f14340fc-3321-42c7-a93b-9befeea8871e/images/img-1705147439.jpg',
logo: 'org/f14340fc-3321-42c7-a93b-9befeea8871e/images/img-1705147439.jpg',
redirect_to_https: true,
remove_branding: true,
robots_meta_contents: ['index'],
website_url: 'https://pinghome.io',
privacy_url: 'https://pinghome.io/privacy-policy',
support_url: 'https://pinghome.io/support',
ga_tracking: 'UA-123123-1',
ip_addresses: ['8.8.8.8'],
subscription_enabled: true,
components: [{
name: 'Component name',
description: 'Component description',
status: 'operational',
type: 'resource',
resource_id: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
}],
groups: [{
name: 'Group name',
components: [{
name: 'Component name',
description: 'Component description',
status: 'operational',
type: 'resource',
resource_id: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
}]
}]
};
axios.post(url, data, {
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://statuspage-cmd.api.pinghome.io/v1/statuspage/{id}";
const data = {
name: 'Statuspage name',
description: 'Statuspage description',
subdomain: 'status',
type: 'private',
password: 'TestPassw0rd!',
update_password: true,
domain: 'status.pinghome.io',
dark_theme: false,
page_name: 'Name',
favicon: 'org/f14340fc-3321-42c7-a93b-9befeea8871e/images/img-1705147439.jpg',
logo: 'org/f14340fc-3321-42c7-a93b-9befeea8871e/image/img-1705147439.jpg',
redirect_to_https: true,
remove_branding: true,
robots_meta_contents: ['index'],
ip_addresses: ['8.8.8.8'],
website_url: 'https://pinghome.io',
privacy_url: 'https://pinghome.io/privacy-policy',
support_url: 'https://pinghome.io/support',
ga_tracking: 'UA-123123-1',
subscription_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);
});
const axios = require('axios');
const url = "https://statuspage-cmd.api.pinghome.io/v1/statuspage/445a5c1f-c0eb-403a-96d7-3976e5dc74ed";
axios.delete(url, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://statuspage-cmd.api.pinghome.io/v1/statuspage/445a5c1f-c0eb-403a-96d7-3976e5dc74ed/status";
const data = { enabled: false };
axios.put(url, data, {
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://statuspage-query.api.pinghome.io/v1/statuspage/c03b02ec-244f-4d2c-8f68-3910071ed5c8/subscriptions';
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://statuspage-cmd.api.pinghome.io/v1/subscriptions";
const data = { channel_type: 'email', channel_value: 'info@pinghome.dev' };
axios.post(url, data, {
headers: {
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://statuspage-cmd.api.pinghome.io/v1/subscription/{token}/verification";
axios.put(url)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = "https://statuspage-cmd.api.pinghome.io/v1/subscription/{token}";
axios.delete(url)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
Manage various aspects of subscriptions, including retrieving payment histories, handling proration details during plan changes, and performing actions such as deleting, reactivating, and updating subscriptions. This ensures users maintain complete control over their subscription lifecycles.
Access and manage payment methods associated with customer accounts, ensuring users can easily view and maintain their payment information for smooth billing operations.
Retrieve details of available coupons and apply them to customer accounts, allowing for promotional discounts and effective management of customer incentives.
const axios = require('axios');
const url = 'https://payment-query.api.pinghome.io/v1/subscription/{id}/payments';
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://payment-query.api.pinghome.io/v1/subscription/{id}/proration/{product_id}';
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://customer-query.api.pinghome.io/v1/plan/team/v1/limits";
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://payment-cmd.api.pinghome.io/v1/subscription/{id}';
axios.delete(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://payment-cmd.api.pinghome.io/v1/subscription/{id}';
axios.put(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://payment-cmd.api.pinghome.io/v1/subscription/{id}';
const data = {
price_id: 'price_1MU7isEyoIQbyvYhiIpiQlw2'
};
axios.patch(url, data, {
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://customer-cmd.api.pinghome.io/v1/organisation/plan";
axios.put(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://customer-query.api.pinghome.io/v1/org/usage';
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://payment-query.api.pinghome.io/v1/payment-methods';
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://payment-query.api.pinghome.io/v1/coupon/{code}';
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://customer-cmd.api.pinghome.io/v1/customer/applied-voucher";
const data = {
"code": "AAACCCBBDD-CSSSS1"
};
axios.post(url, data, {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});