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}
Parameter | Description | Type | Options | Default |
---|---|---|---|---|
name | The 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}
Parameter | Description | Type | Options | Default |
---|---|---|---|---|
describe | Optional. Returns a description of the service. | boolean | true | 0 |
timezone | Timezone if different to company. For example, Europe/Madrid. For a full list of the available timezones, see the N-sight User Guide. | string | 0 | 0 |
licenseconfig | Xml license config, see documentation for details. | xml | 0 | 0 |
reportconfig | Xml report config, see documentation for details | xml | 0 | 0 |
officehoursemail | Valid email address for office hours alert routing emails. | 0 | 0 | |
officehourssms | Valid phone number for office hours alert routing sms. | phone | 0 | 0 |
outofofficehoursemail | Valid email address for out of office hours alert routing emails. | 0 | 0 | |
outofofficehourssms | Valid phone number for out of office hours alert routing sms. | phone | 0 | 0 |
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
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. |
Updated about 1 month ago