# opsgenie-sdk

> OpsGenie Node.js SDK

Latest version **0.5.1** (published 2022-03-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install opsgenie-sdk
pnpm add opsgenie-sdk
yarn add opsgenie-sdk
bun add opsgenie-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.1 |
| Published | 2022-03-16 |
| First published | 2016-06-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= v0.6.0 |
| Dependencies | 1 |
| Unpacked size | 59.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Serhat Can |
| Maintainers | serhatcan, mustafanacar, brksfsrt, ayunt, prakhar_mudaiya, trabab |
| Keywords | opsgenie-sdk, opsgenie, rest, api, sdk |

## Links

- npm: https://www.npmjs.com/package/opsgenie-sdk
- Repository: https://github.com/opsgenie/opsgenie-nodejs-sdk
- Homepage: https://github.com/opsgenie/opsgenie-nodejs-sdk#readme
- Issues: https://github.com/opsgenie/opsgenie-nodejs-sdk/issues
- npm.io page: https://npm.io/package/opsgenie-sdk

## Dependencies (1)

- [requestretry](https://npm.io/package/requestretry.md) ^7.0.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.5.1 (latest) — 2022-03-16
- 0.5.0 — 2021-06-29
- 0.4.10 — 2021-06-29
- 0.4.5 — 2021-03-15
- 0.4.4 — 2021-01-12
- 0.4.3 — 2018-04-17
- 0.4.2 — 2017-11-16
- 0.4.1 — 2017-09-25
- 0.4.0 — 2017-06-08
- 0.3.5 — 2016-08-04
- 0.3.4 — 2016-08-03
- 0.3.3 — 2016-08-01
- 0.3.2 — 2016-06-21
- 0.3.1 — 2016-06-21
- 0.3.0 — 2016-06-21

## README

# OpsGenie Node.js SDK

[![npm version](https://badge.fury.io/js/opsgenie-sdk.svg)](https://badge.fury.io/js/opsgenie-sdk)
[![Dependency Status](https://david-dm.org/opsgenie/opsgenie-nodejs-sdk.svg)](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

---
_Source: https://npm.io/package/opsgenie-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
