UNPKG

opsgenie-sdk-revived

Version:

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

17 lines (14 loc) 336 B
const opsgenie = require('../..'); require('../configure'); const create_alert_json = { message: 'Some Message', serviceId: 'Server_ID', }; opsgenie.incident.create(create_alert_json, (error, alert) => { if (error) { console.error(error); } else { console.log('Create Alert Response'); console.log(alert); } });