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