https://github.com/opsgenie/opsgenie-nodejs-sdk
OpsGenie Node.js SDK
https://github.com/opsgenie/opsgenie-nodejs-sdk
node-sdk nodejs opsgenie
Last synced: about 1 month ago
JSON representation
OpsGenie Node.js SDK
- Host: GitHub
- URL: https://github.com/opsgenie/opsgenie-nodejs-sdk
- Owner: opsgenie
- License: apache-2.0
- Created: 2016-06-05T07:33:34.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-07T10:05:14.000Z (about 2 years ago)
- Last Synced: 2025-04-12T02:39:22.481Z (about 1 month ago)
- Topics: node-sdk, nodejs, opsgenie
- Language: JavaScript
- Homepage: https://www.opsgenie.com/docs/api-and-client-libraries/opsgenie-nodejs-api
- Size: 504 KB
- Stars: 24
- Watchers: 22
- Forks: 19
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# OpsGenie Node.js SDK
[](https://badge.fury.io/js/opsgenie-sdk)
[](https://david-dm.org/opsgenie/opsgenie-nodejs-sdk)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
- User API
- User API v2
- Group API
- Team API
- Heartbeat API
- Incident 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)
- 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
```js
var opsgenie = require("opsgenie-sdk");opsgenie.configure({
api_key: "your_api_key",
});
```Those using the European Service Region should set the EU endpooint in the configuration along with the API key.
```js
opsgenie.configure({
'api_key': 'your_api_key',
'host': 'https://api.eu.opsgenie.com',
});
``````js
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](https://www.opsgenie.com/docs/api-and-client-libraries/opsgenie-nodejs-api)" for detailed documentation