Project

ninjaone

0.0
The project is in a healthy, maintained state
A Ruby wrapper for the Skykick backup Portal REST APIs (readonly)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

>= 0.4.0
 Project Readme

NinjaOne RMM API

Version

This is a wrapper for the ninjaone API. You can see the API endpoints

Currently only the GET requests to endpoints are implemented (readonly).

Installation

Add this line to your application's Gemfile:

gem 'ninjaone'

And then execute:

> bundle install

Or install it yourself as:

> gem install ninjaone

Usage

Authentication

Before you start making the requests to API provide the client id and client secret and email/password using the configuration wrapping.

require 'ninjaone'

NinjaOne.configure do |config|
  config.client_id = ENV['NINJA1_CLIENT_ID']
  config.client_secret = ENV['NINJA1_CLIENT_SECRET']
  config.endpoint = ENV['NINJA1_ENDPOINT']
end
client = NinjaOne.client()
client.login

o = client.organizations

o.each do |organization|
  puts "#{organization.name}"
end

Resources

Authentication

# setup configuration
#
client.login
Resource API endpoint
.auth_token or .login https://app.ninjarmm.com/apidocs/?links.active=authorization

System

Core system Entities and Resources

subscriptions = client.subscriptions
Resource API endpoint
contacts, contact(id) List contact and get contact details
organizations list organizations
policies list policies
jobs list active jobs
activities list activities
alerts List active alerts (triggered conditions)
automation_scripts List available automation scripts
device_custom_fields List device custom fields
devices List devices
devices_detailed List devices(deatiled)
enabled_notification_channels List enabled notification channels
notification_channels List all notification channels
notification_channels_detailed List all notification channels detailed
groups List all groups (saved searches)
locations List all locations
roles List device roles
tasks List scheduled tasks
software_products List supported 3rd party software
users List users
search_devices(query_string) Find devices
user_end_users End user list
user_technicians Technicians list
user_roles Get user roles

Organizations

All apis related to organizations

org = client.organizations.first
org_devices = client.organization_devices(org.id)
Resource API endpoint
.organizations,.organization(id) List organizations or get one by id
.organization_locations(id) Organization locations
.organization_end_users(id) List users
.organization_custom_fields(id) Organization custom fields
.organization_devices(id) Organization devices
.organization_locations_backup_usage(id) Organization location backup usage
.organization_backup_usage_by_location(id, location_id) Organization locations backup usage

Contributing

Bug reports and pull requests are welcome on GitHub.

License

The gem is available as open source under the terms of the MIT License.