UNPKG

opsgenie-sdk-revived

Version:

Reviving the opsgenie-sdk, Giving Node.js access to the OpsGenie Web API

22 lines (18 loc) 496 B
require('../configure'); const opsgenie = require('../..'); opsgenie.configure({ host: 'https://api.opsgenie.com', api_key: 'yourApiKey', }); const delete_alert_identifier = { identifier: '0f91e341-db66-4e8f-a49c-359f1cc0cf9b', // should be custom to your alert identifierType: 'id', }; opsgenie.alertV2.delete(delete_alert_identifier, (error, result) => { if (error) { console.error(error); } else { console.log('Delete Alert Response:'); console.log(result); } });