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);
});
This feature allows users to manage customer details, update personal information, configure notification channels, and address customer feedback. It provides a detailed interface for handling all customer-related operations.
Learn more
This feature enables the management of team structures and roles within the system. It includes the creation, updating, and deletion of teams, managing team memberships, and configuring team-specific notification channels. This ensures efficient team organization and communication.
Learn more
const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/default/v1/customer/6fb4e64f-ad18-46e3-920c-92639adb137c";
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-query.api.pinghome.io/default/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/default/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/default/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/default/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/default/v1/customer/feedback";
const data = {
"feedback": "Good experience"
};
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/default/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/default/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/default/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/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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/default/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);
});
const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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/default/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);
});
const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://customer-query.api.pinghome.io/default/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/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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/default/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/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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/default/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);
});
const axios = require('axios');
const url = "https://customer-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://statistic-query.api.pinghome.io/default/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/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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'
};
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://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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',
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://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://statistic-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/v1/heartbeat';
const data = {
service_id: '6766163a-568d-47b4-a1fa-91a0957e06d4',
name: 'Pinghome'
};
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://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://resource-cmd.api.pinghome.io/default/v1/heartbeat/906a3444-15ce-4410-8041-89a238e9e91f';
const data = {
name: 'My heartbeat',
service_id: 'cc7e4e8b-417d-4be0-9bde-85e353a20fa4',
methods: ['GET']
};
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://resource-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://statistic-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://statistic-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://data-gateway.api.pinghome.io/default/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
const axios = require('axios');
const url = "https://incident-query.api.pinghome.io/default/v1/rulesets";
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://incident-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://incident-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://incident-query.api.pinghome.io/default/v1/webhooks";
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://incident-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://data-gateway.api.pinghome.io/default/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/default/v1/health-check";
axios.get(url)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = "https://incident-query.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/default/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);
});
const axios = require('axios');
const url = 'https://incident-cmd.api.pinghome.io/default/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-cmd.api.pinghome.io/default/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-cmd.api.pinghome.io/default/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-cmd.api.pinghome.io/default/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-cmd.api.pinghome.io/default/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-cmd.api.pinghome.io/default/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-cmd.api.pinghome.io/default/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/default/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/default/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/default/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/default/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-cmd.api.pinghome.io/default/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/default/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/default/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-cmd.api.pinghome.io/default/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-cmd.api.pinghome.io/default/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/default/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/default/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/default/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/default/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/default/v1/organisation/purchase-info";
axios.post(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/default/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://payment-cmd.api.pinghome.io/default/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-cmd.api.pinghome.io/default/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/default/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);
});