Add Client

Use this API Call to query our Data Extraction API to extract data gathered by N-sight RMM.This section shows the service name and parameters needed in the API Call query, and provides examples of some queries and system responses. For more information, see Data Extraction API.

Service name: add_client

URL

https://SERVER/api/?apikey=yourAPIkey&service=add_client

&required_parameters=required_parameters

[&optional_parameters=optional_parameters]

Description

Creates a new client, must at least provide a name

Parameters

Post Variable

Description

Type

Required

Options

Default

describe

Optional. Returns a description of the service.

boolean

no

true

0

name

The name of the client

string

yes

timezone

Timezone if different to company, e.g. Europe/Madrid The following section contains a list of the currently available timezones

string

no

0

0

licenseconfig

Xml license config, see documentation for details.

xml

no

0

0

reportconfig

Xml report config, see documentation for details

xml

no

0

0

officehoursemail

Valid email address for office hours alert routing emails

email

no

0

0

officehourssms

Valid phone number for office hours alert routing sms

phone

no

0

0

outofofficehoursemail

Valid email address for out of office hours alert routing emails

email

no

0

0

outofofficehourssms

Valid phone number for out of office hours alert routing sms

phone

no

0

0

Example parameter configuration example for reportconfig

<reportconfig> 
<report> 
        <type>server_daily</type> 
        <mailto>test@test.com</mailto> 
        <mailcc>testcc@test.com</mailcc> 
        <sendat>6:00</sendat> 
</report> 
<report> 
        <type>workstation_daily</type> 
        <mailto>test@test.com</mailto> 
        <mailcc>testcc@test.com</mailcc> 
        <sendat>6:00</sendat> 
        <daystorun>mon,wed,fri</daystorun>
</report>
</reportconfig> 
					

Example parameter configuration example for licenseconfig (groupid = license_group_id from list_license_group_items)

<licenseconfig> 
<license> 
        <groupid>1</groupid> 
        <count>1</count> 
</license> 
<license> 
        <groupid>2</groupid> 
        <count>22</count> 
</license> 
<license> 
        <groupid>3</groupid> 
        <count>22</count> </license> 
<license> 
        <groupid>4</groupid> 
        <count>5</count> 
</license> 
<license> 
        <groupid>5</groupid> 
        <count>51</count> 
</license> 
</licenseconfig>
					

 

Example Service Call =add_client

https://SERVER/api/?apikey=yourAPIkey&service=add_client&name=NEW CLIENT&

Example Response: Server

<?xml version="1.0"?>
<result> 
<data> 
        <success>1</success> 
        <clientid>1694</clientid> 
</data> 
</result> 
					

Example Response: Error

<result> 
<error> 
        <message>Duplicate name</message> 
</error> 
</result>
					

Field Descriptions

Field

Type

Can Be Empty

Description

success

integer

no

Creation of new client has succeeded (1) or not (0)

clientid

integer

no

Id of new client created