Add Site
Service name: add_site
Base URL
https://{SERVER}/api/?apikey={yourAPIkey}&service=add_site
Description
Creates a new site, under the entered Client (clientid) with the required sitename.
This call includes the option to select the default workstation and / or server monitoring template along with the Data Overdue Cross Check routers.
Parameters
Required parameters
Add required parameters immediately after the base URL.
https://{SERVER}/api/?apikey={yourAPIkey}&service=add_site&required_parameters={parameter-value}
Parameter | Description | Type | Options | Default |
---|---|---|---|---|
clientid | The Id of the client. | integer | 0 | 0 |
sitename | The site name. | string | 0 | 0 |
Optional parameters
Add optional parameters after the required parameters in the base URL.
https://{SERVER}/api/?apikey={yourAPIkey}&service=add_site&required_parameters={parameter-value}&optional_parameters={parameter-value}
Parameter | Description | Type | Options | Default |
---|---|---|---|---|
router1 | Primary router IP address | string | 0 | 0 |
router2 | Secondary router IP address | string | 0 | 0 |
workstationtemplate | Template ID of default workstation template | string | template id | inherit |
servertemplate | Template ID of default server template | string | template id | inherit |
Determine parameter values
Use the following associated service calls to determine parameter values.
Parameter | Call | URL Format |
---|---|---|
clientid | list_clients | https://{SERVER}/api/?apikey={yourAPIkey}&service=list_clients |
Examples
Add a site
https://{SERVER}/api/?apikey={yourAPIkey}&service=add_site&clientid=CLIENTID&sitename=NEW SITE&router1=ROUTER&workstationtemplate=TEMPLATEID&servertemplate=off
Example response: Success
<?xml version="1.0"?>
<result>
<data>
<success>1</success>
<siteid>123</siteid>
</data>
</result>
Example response: Error
<?xml version="1.0"?>
<result>
<error>
<message>Duplicate name - Site name already exists for Client!</message>
</error>
</result>
Returned fields
Field | Type | Can Be Empty | Description |
---|---|---|---|
success | integer | no | Creation of new site has succeeded (1) or not (0). |
siteid | integer | no | Id of the new site created. |
Updated about 1 month ago