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