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}
ParameterDescriptionTypeOptionsDefault
clientidThe Id of the client.integer00
sitenameThe site name.string00

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
off
inherit

inherit

servertemplate

Template ID of default server template

string

template id
off
inherit

inherit

Determine parameter values

Use the following associated service calls to determine parameter values.

ParameterCallURL Format
clientidlist_clientshttps://{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

FieldTypeCan Be EmptyDescription
successintegernoCreation of new site has succeeded (1) or not (0).
siteidintegernoId of the new site created.