ninja-api
TypeScript icon, indicating that this package has built-in type declarations

0.0.17 • Public • Published

Ninja RMM API

Contents

Description

Easy to use JavaScript package for fetching data from the Ninja RMM API

Usage

Install the ninja-api package with NPM:

npm install ninja-api

You can then use the API by importing the package, creating a client and calling a function:

import { NinjaClient } from "ninja-api";

const { devices } = new NinjaClient({
  prefix: "eu",
  clientId: "[YOUR_CLIENT_ID]",
  clientSecret: "[YOUR_CLIENT_SECRET]",
  sessionToken: "[YOUR_SESSION_TOKEN]"
});

devices.get(1).then(device => {
  console.log(device)
})

Types

You can use types defined in the API by importing them:

import type { DeviceDetails } from "ninja-api";

const devices: DeviceDetails[] = [];

Documentation

You can find further documentation about authentication and API routes on the official documentation

Requirements

This package has no requirements and can be run on any Node.js server or JavaScript client.

License

The ninja-api script is released under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i ninja-api

Weekly Downloads

51

Version

0.0.17

License

ISC

Unpacked Size

200 kB

Total Files

10

Last publish

Collaborators

  • niels_krijnen