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);
});