Add Client

Service name: add_client

Base URL

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

Description

Creates a new client, if you at least provide a name.

Parameters

Required parameters

Add required parameters immediately after the base URL.

https://{SERVER}/api/?apikey={yourAPIkey}&service=add_client&required_parameters={parameter-value}
ParameterDescriptionTypeOptionsDefault
nameThe name of the client.string

Optional parameters

Add optional parameters after the required parameters in the base URL.

https://{SERVER}/api/?apikey={yourAPIkey}&service=add_client&required_parameters={parameter-value}&optional_parameters={parameter-value}
ParameterDescriptionTypeOptionsDefault
describeOptional. Returns a description of the service.booleantrue0
timezoneTimezone if different to company. For example, Europe/Madrid. For a full list of the available timezones, see the N-sight User Guide.string00
licenseconfigXml license config, see documentation for details.xml00
reportconfigXml report config, see documentation for detailsxml00
officehoursemailValid email address for office hours alert routing emails.email00
officehourssmsValid phone number for office hours alert routing sms.phone00
outofofficehoursemailValid email address for out of office hours alert routing emails.email00
outofofficehourssmsValid phone number for out of office hours alert routing sms.phone00

Example parameter configurations

reportconfig

<reportconfig> 
<report> 
        <type>server_daily</type> 
        <mailto>[email protected]</mailto> 
        <mailcc>[email protected]</mailcc> 
        <sendat>6:00</sendat> 
</report> 
<report> 
        <type>workstation_daily</type> 
        <mailto>[email protected]</mailto> 
        <mailcc>[email protected]</mailcc> 
        <sendat>6:00</sendat> 
        <daystorun>mon,wed,fri</daystorun>
</report>
</reportconfig> 

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>

Examples

Add a client

https://{SERVER}/api/?apikey={yourAPIkey}&service=add_client&name=New client name

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>

Returned fields

FieldTypeCan Be EmptyDescription
successintegernoCreation of new client has succeeded (1) or not (0).
clientidintegernoId of new client created.