# ninja-rmm-api

> connect Node to NinjaRMM

Latest version **2.0.1** (published 2018-06-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install ninja-rmm-api
pnpm add ninja-rmm-api
yarn add ninja-rmm-api
bun add ninja-rmm-api
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2018-06-21 |
| First published | 2017-02-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Peter Squicciarini |
| Maintainers | twoseventythree |
| Keywords | ninjarmm, api |

## Links

- npm: https://www.npmjs.com/package/ninja-rmm-api
- Repository: https://github.com/stripedpajamas/ninja-rmm-api
- Homepage: https://github.com/stripedpajamas/ninja-rmm-api#readme
- Issues: https://github.com/stripedpajamas/ninja-rmm-api/issues
- npm.io page: https://npm.io/package/ninja-rmm-api

## Recent versions

- 2.0.1 (latest) — 2018-06-21
- 2.0.0 — 2018-03-29
- 1.0.3 — 2017-03-07
- 1.0.2 — 2017-02-20
- 1.0.1 — 2017-02-20
- 1.0.0 — 2017-02-20

## README

# ninja-rmm-api :: UNMAINTAINED
a node wrapper for the NinjaRMM API

*this package is not being maintained at all. if you find it useful, feel free to take over*

* [NinjaRMM](http://ninjarmm.com)

* [Ninja API documentation](https://ninjarmm.com/dev-api/)

ninja-rmm-api exposes a **generateOptions** method that outputs an options Object to be used with [request](https://github.com/request/request).

## Usage

Pass in the API details as an object with at least:
* accessKeyID
* secret 
* host (http://api.ninjarmm.com)

The accessKeyID and secret are provided from the Ninja interface (see documentation).

When generating options for request, pass in an object with at least:
* method (e.g. GET/PUT/POST/DELETE)
* resource (e.g. /v1/alerts)

The generateOptions method also supports passing in:
* contentMd5
* contentType
* date

These are optional. The module will take care of the date property automatically if left blank.


## Example

```js
const NinjaClient = require('ninja-rmm-api')
const request = require('request')

const ninjaClient = new NinjaClient({
  accessKeyID: 'TF4STGMDR4H7AEXAMPLE',
  secret: 'eh14c4ngchhu6283he03j6o7ar2fcuca0example',
  host: 'http://api.ninjarmm.com',
})

const ninjaReq = ninjaClient.generateOptions({
  method: 'GET',
  resource: '/v1/alerts'
})

request(ninjaReq, (err, response, data) => {
  // ...
})
```

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