Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
samples
test
.gitignore
.jshintrc
.npmignore
.travis.yml
Gruntfile.js
LICENSE.md
README.md
index.js
package.json

README.md

OpsGenie Node.js SDK

npm version Dependency Status

This is the repository for Node.js SDK of OpsGenie.

Aim and Scope

OpsGenie Node.js SDK aims to access OpsGenie Web API through HTTP calls from Node.js applications.

OpsGenie Node.js SDK covers:

  • Alert API v2
  • Alert API
  • User API
  • Group API
  • Team API
  • Escalation API (TODO: will be available soon)
  • Schedule API (TODO: will be available soon)
  • Schedule Override API (TODO: will be available soon)
  • Forwarding Rule API (TODO: will be available soon)
  • Heartbeat API (TODO: will be available soon)
  • Integration API (TODO: will be available soon)
  • Policy API (TODO: will be available soon)

Future releases are subject to be delivered for packing more APIs soon.

Installation

Node.js version >=0.6.x is required.

npm install opsgenie-sdk

Getting Started

var opsgenie = require('opsgenie-sdk');

opsgenie.configure({
    'api_key': 'your_api_key'
});
var get_alert_identifier = {
    identifier : "alert_id",
    identifierType : "id"
};

opsgenie.alertV2.get(get_alert_identifier, function (error, alert) {
    if (error) {
        // handle error
    } else {
        console.log("Alert data received", alert);
    }
});

Samples

More samples can be found under /samples directory

Also, checkout "Node.js SDK page" for detailed documentation