PHPackages                             spinen/n-central-php-rest-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. spinen/n-central-php-rest-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

spinen/n-central-php-rest-client
================================

SPINEN's PHP REST Client for N-Able's N-Central.

0.7.0(1mo ago)2642MITPHPPHP ^8.3CI passing

Since Feb 23Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/spinen/n-central-php-rest-client)[ Packagist](https://packagist.org/packages/spinen/n-central-php-rest-client)[ RSS](/packages/spinen-n-central-php-rest-client/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (20)Versions (13)Used By (0)

> NOTE: This is VERY early. This is changing as N-central updates their API &amp; as we get a better understanding of the API. There are broken tests &amp; some missing code, but we will firm this up over the next few weeks.

SPINEN's N-central PHP Client
=============================

[](#spinens-n-central-php-client)

[![Latest Stable Version](https://camo.githubusercontent.com/3b27966ceec2a8931fe0b1c7726628dfd659ca4713e572df346af34f9d9cfc46/68747470733a2f2f706f7365722e707567782e6f72672f7370696e656e2f6e2d63656e7472616c2d7068702d726573742d636c69656e742f762f737461626c65)](https://packagist.org/packages/spinen/n-central-php-rest-client)[![Latest Unstable Version](https://camo.githubusercontent.com/189b3993fc3be782bcc9ef71bd0b8ef921f3ae38d3c97f4a427a9b44471b4fb5/68747470733a2f2f706f7365722e707567782e6f72672f7370696e656e2f6e2d63656e7472616c2d7068702d726573742d636c69656e742f762f756e737461626c65)](https://packagist.org/packages/spinen/n-central-php-rest-client)[![Total Downloads](https://camo.githubusercontent.com/75ce7fa67f7ddf99636a7b112260e4ee9a3cd6db091acd0fd0f1d7a21be5276c/68747470733a2f2f706f7365722e707567782e6f72672f7370696e656e2f6e2d63656e7472616c2d7068702d726573742d636c69656e742f646f776e6c6f616473)](https://packagist.org/packages/spinen/n-central-php-rest-client)[![License](https://camo.githubusercontent.com/beacbfff378673695a38fa0ef91ca205dc55a9e47514be6a323a8c9c7147f50a/68747470733a2f2f706f7365722e707567782e6f72672f7370696e656e2f6e2d63656e7472616c2d7068702d726573742d636c69656e742f6c6963656e7365)](https://packagist.org/packages/spinen/n-central-php-rest-client)

PHP package to interface with [N-able's N-central Server](https://www.n-able.com/products/n-central-rmm). We strongly encourage you to review N-central's API docs to get a feel for what this package can do, as we are just wrapping their API. We have based the majority of this code from our [Halo PHP Client](https://github.com/spinen/halo-php-client).

We solely use [Laravel](https://www.laravel.com) for our applications, so this package is written with Laravel in mind. We have tried to make it work outside of Laravel. If there is a request from the community to split this package into 2 parts, then we will consider doing that work.

Build Status
------------

[](#build-status)

BranchStatusCoverageCode QualityDevelop[![Build Status](https://github.com/spinen/n-central-php-rest-client/workflows/CI/badge.svg?branch=develop)](https://github.com/spinen/n-central-php-rest-client/workflows/CI/badge.svg?branch=develop)[![Code Coverage](https://camo.githubusercontent.com/90936f07cc6617a1cb6d30484a1a8d12c8082d60d899094ac1476f015476c5a4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7370696e656e2f6e2d63656e7472616c2d7068702d726573742d636c69656e742f6261646765732f636f7665726167652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/spinen/n-central-php-rest-client/?branch=develop)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ba611ca79892eb5eef4df94784f1ccf89f4b7b74d7d0672044cafbab9293f06e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7370696e656e2f6e2d63656e7472616c2d7068702d726573742d636c69656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/spinen/n-central-php-rest-client/?branch=develop)Master[![Build Status](https://github.com/spinen/n-central-php-rest-client/workflows/CI/badge.svg?branch=master)](https://github.com/spinen/n-central-php-rest-client/workflows/CI/badge.svg?branch=master)[![Code Coverage](https://camo.githubusercontent.com/ff46fe17a5018705c76b3b8f0d6fe620b1cb10da0fdf697a8670e450a2d10964/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7370696e656e2f6e2d63656e7472616c2d7068702d726573742d636c69656e742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/spinen/n-central-php-rest-client/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d85283951551b4acc28ff742815ef606d5411e0e5201bbfcc553c48756a7b001/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7370696e656e2f6e2d63656e7472616c2d7068702d726573742d636c69656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/spinen/n-central-php-rest-client/?branch=master)Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Laravel Setup](#laravel-setup)
    - [Configuration](#configuration)
- [Generic PHP Setup](#generic-php-setup)
    - [Examples](#examples)
- [Authentication](#authentication)
    - [JWT](#jwt)
- [Usage](#usage)
    - [Supported Actions](#supported-actions)
    - [Using the Client](#using-the-client)
        - [Getting the Client object](#getting-the-client-object)
        - [Models](#models)
        - [Relationships](#relationships)
        - [Collections](#collections)
        - [Filtering using "where"](#filtering-using-where)
        - [Search](#search)
        - [Limit records returned](#limit-records-returned)
        - [Order By](#order-by)
        - [Pagination](#pagination)
    - [More Examples](#more-examples)
- [Known Issues](#known-issues)

Installation
------------

[](#installation)

Install N-central PHP Package via Composer:

```
$ composer require spinen/n-central-php-rest-client
```

Laravel Setup
-------------

[](#laravel-setup)

1. Add the appropriate values to your `.env` file

    #### Keys

    [](#keys)

    ```
    NCENTRAL_ACCESS_OVERRIDE=
    NCENTRAL_JWT=
    NCENTRAL_REFRESH_OVERRIDE=
    NCENTRAL_URL=
    ```
2. *\[Optional\]* If you would like to use the client with API calls per user in your application, you will need to make your `User` object implement includes the `Spinen\Ncentral\Concerns\HasNcentral` trait which will allow it to access the Client as an attribute like this: `$user->ncentral`

    ```
