Listing Sites

Service name: list_sites

Base URL

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

Description

Lists all sites for a client (GET).

Parameters

Required parameters

Add required parameters immediately after the base URL.

https://{SERVER}/api/?apikey={yourAPIkey}&service=list_sites&required_parameters={parameter-value}
ParameterDescriptionTypeOptionsDefault
clientidThe clientid must be a valid id.integer00

Optional parameters

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

https://{SERVER}/api/?apikey={yourAPIkey}&service=list_sites&required_parameters={parameter-value}&optional_parameters={parameter-value}
ParameterDescriptionTypeOptionsDefault
describeOptional. Returns a description of the entered call, the available parameters, an example of its output, and returned fields with descriptions.booleantrue0

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

List sites

https://{SERVER}/api/?apikey={yourAPIkey}&service=list_sites&clientid=123

Example response

<?xml version="1.0" ?> 
 <result created="2015-07-20T14:02:22+01:00" host="SERVER" status="OK">
  <items>
   <site>
    <siteid>21251</siteid> 
    <name>DESIO</name> 
    <connection_ok>1</connection_ok> 
    <creation_date>2009-06-01</creation_date> 
    <primary_router>www.prime.com</primary_router> 
    <secondary_router>www.second.com<secondary_router> 
   </site>
   ..... more <site> nodes
  </items>
</result>

Returned fields

FieldTypeCan Be EmptyDescription
siteidintegernoUnique identifier of site
namestringnoname of site
primary_routerstringyesIP address or hostname of primary router at site
secondary_routerstringyesIP address or hostname of secondary router at site (if dual routing used)
connection_okinteger (1 or 0)noIn the event that one or more servers at that site have stopped sending data, have we been able to reach the site (ping): 0=site unreachable; 1=site reachable
creation_datedateyesCreation date of site.