Add Site: add_site
Service name: add_site |
|
URL |
https://SERVER/api/?apikey=yourAPItoken&service=add_site &required_parameters=required_parameters [&optional_parameters=optional_parameters] |
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 |
|||||
Post Variable |
Description |
Type |
Required |
Options |
Default |
clientid |
The ID of the client |
integer |
yes |
0 |
0 |
sitename |
Site name |
string |
yes |
0 |
0 |
router1 |
Primary router IP address |
string |
no |
0 |
0 |
router2 |
Secondary router IP address |
string |
no |
0 |
0 |
workstationtemplate |
Template ID of default workstation template |
string |
no |
template id off inherit |
inherit |
servertemplate |
Template ID of default server template |
string |
no |
template id off inherit |
inherit |
Example Service Call =add_site |
https://SERVER/api/?apikey=yourAPItoken&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> |
Field Descriptions |
|||
Field |
Type |
Can Be Empty |
Description |
success |
integer |
no |
Creation of new site has succeeded (1) or not (0) |
siteid |
integer |
no |
Id of new site created |
Example Associated Service Calls | ||
Parameter | Call | URL Format |
ClientID | list_clients | https://SERVER/api/?apikey=yourAPItoken&service=list_clients |