Home / API Specifications / Request Format

Request Format


All API requests should to be placed as HTTP request. The request consists of the following components:
  • URI (Universal Resource Identifier. Also commonly known as URL)
  • Common Mandatory Parameters sent as Query String in the URL
  • Parameters(if any) sent via the body of the POST request. 
URI
The URI points to the resource inside Site24x7 over which the action is to be performed.

For example,

http://site24x7.com/api/xml/addMonitor?apikey=[APIKEY]  - for adding monitor.

or

http://site24x7.com/api/xml/downtimeslist?apikey=[APIKEY] - for viewing downtimes of all monitors.



It consists of the following parts:
  • The base URL "http://site24x7.com/api/xml"
  • <methodname>: The method that needs to be called for executing the action (eg: - downtimeslist)
Parameters to be passed in the query string

The APIKEY needs to be passed in the url as part of the query string:

http://site24x7.com/api/xml/addMonitor?apikey=[APIKEY]

for example,

http://site24x7.comapi/xml/addMonitor?apikey=0cf24306ca4a51cafb824a679d989a11

Parameters to be passed via the body of the POST Request

Apart from the parameters passed in the Query string, additional information needed for specific actions (such as the display name of a monitor in an Add Monitor operation etc.,) needs to be passed as POST parameters.

<param>1=<value>1&<param2>=<value2>....

The parameters should be encoded in application/x-www-form-urlencoded format (This the default format used by any simple html form).

Sample

The below URL adds a website monitor in an account.

http://site24x7.com/api/xml/addMonitor?apikey=[APIKEY]

Data Sent as POST parameters

&displayname=web&url=http://site24x7.com&groupname=mygroup&pollinterval=10......



     RSS of this page