You are on page 1of 102

Neustar

Webmetrics

API Documentation | API User Guide May 18, 2011
www.webmetrics.com
+1-877-524-8299
sales@webmetrics.com
Webmetrics Support is available at +1-888-367-4820 or support@webmetrics.com.
How to use the Webmetrics APIs
The Webmetrics APIs are provided as RESTful web services. To perform an action using the Webmetrics API,
you need to send a GET or POST request to the API URL specifying a method, a valid signature and some
arguments, and you will receive a formatted response.
The Webmetrics API URL is: https://api.webmetrics.com/v2/ The trailing slash is important and all
parameters must follow that.
For each API, you must specify a "method" parameter with the name of the method you wish to call. For
example, if you wish to use the "maintenance.getServiceStatus" API, you would specify
"method=maintenance.getServiceStatus" as one of the parameters sent to the API URL. The full path would
resemble:
https://api.webmetrics.com/v2/?method=maintenance.getServiceStatus&username=demo&s
erviceid=4234234&sig=3f333e940cab610ef9c2e5d9872e77cb42a2fd87
API calls that pertain to a specific service require that you send the service ID as a request parameter. Some
APIs allow requests for multiple services. In such case you need to send the serviceid parameter for each
service that you need. In order to get the service IDs for your services, use the maintenance.getServices API.
How to compose a valid signature
The signature parameter (sig) is composed of a SHA1 hash of your username, your API key (found in the
Webmetrics' web console, under 'My Account'), and the current epoch time appended together in that order.
The SHA1 hash needs to be submitted as a base64 encoded string. The length of the returned string will be 27
and it will only contain characters from this set: 'A'..'Z', 'a'..'z', '0'..'9', '+', '=' and '/'. You must url encode the
signature when making a GET request.
The timestamp will be accepted for a period of 5 min. You can get the current epoch time in several languages
as follows:
Java long epoch = System.currentTimeMillis()/1000;
Perl time
PHP time()
Ruby Time.now (or Time.new).
Python import time first, then TIMESTAMP = str(time.time()).partition(".")[0]
C# int epoch = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
JavaScript Math.round(new Date().getTime()/1000.0) getTime() returns time in milliseconds.


2 / 102
Webmetrics API User Guide
May 18, 2011

For more information, please visit www.webmetrics.com

Examples of composing a valid signature
Note: These signatures must be url-encoded before you use them.
PHP
<?php
$method = "maintenance.getServices";
$api_key = "074e0c4b016258407bd9830112fd850973a96543";
$username = "demoaccount";
$timestamp = time();
$signature = base64_encode(sha1($username.$api_key.$timestamp, TRUE));
$signature = urlencode($signature);

$request =
"https://api.webmetrics.com/v2/?method=$method&username=$username&sig=$signature";
echo file_get_contents($request);
?>
Perl
#!/usr/bin/perl

use Digest::SHA1 qw(sha1_base64);
use URI::Escape;
use LWP::Simple;

my $method = "maintenance.getServices";
my $api_key = "074e0c4b016258407bd9830112fd850973a96543";
my $username = "demoaccount";
my $timestamp = time;
my $signature = sha1_base64($username.$api_key.$timestamp);
$signature = uri_escape($signature);

$request =
"https://api.webmetrics.com/v2/?method=$method&username=$username&sig=$signature";
print get($request);

3 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

C#
using System;
using System.Net;
using System.IO;
using System.Text;
using System.Web;

...
string method = "maintenance.getServices";
string api_key = "074e0c4b016258407bd9830112fd850973a96543";
string username = "demoaccount";
int epoch = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
string timestamp = epoch.ToString();
string signature = Convert.ToBase64String(new
System.Security.Cryptography.SHA1CryptoServiceProvider().ComputeHash(Encoding.ASCI
I.GetBytes(username+api_key+timestamp)));
signature = HttpUtility.UrlEncode(signature);

string request = "https://api.webmetrics.com/v2/?method=" + method +
"&username=" + username + "&sig=" + signature;
HttpWebRequest reqObj = (HttpWebRequest)WebRequest.Create(request);
HttpWebResponse resObj = (HttpWebResponse)reqObj.GetResponse();
StreamReader reader = new StreamReader(resObj.GetResponseStream());
string data = reader.ReadToEnd();
Console.WriteLine(data);

4 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

Ruby
#!/usr/bin/ruby

#################################
# Import all required libraries
require('rubygems')
require('digest/sha1')
require('base64')
require('cgi')
require('net/http')
require('net/https')
require('uri')
#################################

method = "maintenance.getServices"
api_key = "074e0c4b016258407bd9830112fd850973a96543"
username = "demoaccount"
timestamp = Time.new().to_i
sha1 = Digest::SHA1.digest("#{username}#{api_key}#{timestamp}")
b64 = Base64.encode64(sha1.to_s.strip()).gsub("\n",'')
signature = CGI.escape(b64)

request =
"https://api.webmetrics.com/v2/?method=#{method}&username=#{username}&sig=#{signat
ure}"
url = URI.parse(request)
path = "/v2/?method=#{method}&username=#{username}&sig=#{signature}"
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = (url.scheme == 'https')
reqObj = Net::HTTP::Get.new(path)
resObj = http.request(reqObj)
puts resObj.body
Output Format
There are two output formats to the APIs, XML and json. To specify and output format, add format=xml or
format=json to your query. If no format is specified, it will default to xml.
JSON, or JavaScript Object Notation, is a machine-readable data-interchange format, which makes
constructing API applications in JavaScript and other languages easy. For more information about JSON, visit
www.json.org.

5 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

List of Requests
maintenance.getServices ........................................................................................................................................ 8
maintenance.getNotepad ...................................................................................................................................... 10
maintenance.setNotepad ...................................................................................................................................... 11
maintenance.addNewService ............................................................................................................................... 12
maintenance.changePassword ............................................................................................................................. 14
maintenance.renameService ................................................................................................................................ 15
maintenance.resetService..................................................................................................................................... 16
maintenance.getAgentList..................................................................................................................................... 17
maintenance.setAgentList ..................................................................................................................................... 18
maintenance.getAvailableAgents .......................................................................................................................... 20
maintenance.getServiceStatus ............................................................................................................................. 21
maintenance.getServiceType ............................................................................................................................... 22
maintenance.turnServiceOff.................................................................................................................................. 23
maintenance.turnServiceOn.................................................................................................................................. 24
maintenance.getDescription.................................................................................................................................. 25
maintenance.setDescription .................................................................................................................................. 26
maintenance.getMonitoringURL ........................................................................................................................... 27
maintenance.setMonitoringURL ............................................................................................................................ 28
maintenance.getMonitoringInterval ....................................................................................................................... 29
maintenance.setMonitoringInterval ....................................................................................................................... 30
maintenance.getAvailableMonitoringIntervals ...................................................................................................... 31
maintenance.setPageTimeout .............................................................................................................................. 32
maintenance.getScript .......................................................................................................................................... 33
maintenance.addAlertingGroup ............................................................................................................................ 34

6 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getAlertingGroups ........................................................................................................................... 35
maintenance.removeAlertingGroup ...................................................................................................................... 36
maintenance.addContactsToAlertingGroup .......................................................................................................... 37
maintenance.getAlertingGroupContacts ............................................................................................................... 38
maintenance.removeContactsFromAlertingGroup ............................................................................................... 39
maintenance.addDiagnosticContacts ................................................................................................................... 40
maintenance.getDiagnosticContacts .................................................................................................................... 41
maintenance.setDiagnosticContacts ..................................................................................................................... 42
maintenance.removeDiagnosticContact ............................................................................................................... 43
maintenance.addEscalationLevelContacts ........................................................................................................... 44
maintenance.getEscalationLevelContacts ............................................................................................................ 45
maintenance.removeEscalationLevelContact ....................................................................................................... 46
maintenance.setEscalationLevelContacts ............................................................................................................ 47
maintenance.getAllAlertingContacts ..................................................................................................................... 48
maintenance.getEscalationLevelDelay ................................................................................................................. 49
maintenance.getEscalationLevelDelayOptions .................................................................................................... 50
maintenance.setEscalationLevelDelay ................................................................................................................. 51
maintenance.getMonitoringURL ........................................................................................................................... 52
maintenance.setMonitoringURL ............................................................................................................................ 53
maintenance.getPageTimeout .............................................................................................................................. 54
maintenance.setPageTimeout .............................................................................................................................. 55
maintenance.getReportList ................................................................................................................................... 56
maintenance.addReportingContacts ..................................................................................................................... 57
maintenance.getReportingContacts ...................................................................................................................... 58
maintenance.removeReportingContact ................................................................................................................ 59

7 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setReportingContacts ...................................................................................................................... 60
maintenance.addSMSVoiceContact ..................................................................................................................... 61
maintenance.getSMSVoiceContacts .................................................................................................................... 62
maintenance.removeSMSVoiceContact ............................................................................................................... 63
maintenance.getLoadtimeSLA .............................................................................................................................. 64
maintenance.getUptimeSLA ................................................................................................................................. 65
maintenance.setLoadtimeSLA .............................................................................................................................. 66
maintenance.setUptimeSLA.................................................................................................................................. 67
maintenance.getMaintenanceWindows ................................................................................................................ 68
maintenance.isInMaintenanceWindow ................................................................................................................. 71
maintenance.addOneTimeMaintenanceWindow .................................................................................................. 72
maintenance.addWeeklyMaintenanceWindow ..................................................................................................... 74
maintenance.addMonthlyMaintenanceWindow .................................................................................................... 76
maintenance.removemaintenanceWindow ........................................................................................................... 78
logdownload.getdata ............................................................................................................................................. 79
processeddata.getdata .......................................................................................................................................... 81
realtime.getdata .................................................................................................................................................... 96
snapshot.getdata ................................................................................................................................................. 101


8 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getServices
Description
Returns a list of the services that this user has control over as well as their Service IDs.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
expanded - int - optional
o Can be either 1 or 0. Default is 0. If expanded is set to 1, the API will also return the service
type and description.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<service>
<name>service1</name>
<id>A55E3F14-E86E-11DC-B5CB-9F6AA7912F41</id>
</service>
<service>
<name>marketing</name>
<id>A55EA04E-E86E-11DC-B5CB-9F6AA7912F41</id>
</service>
</rsp>
Example Response with Expanded Argument Set:
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<service>
<name>service1</name>
<description>New Website Monitor</description>
<id>A55E3F14-E86E-11DC-B5CB-9F6AA7912F41</id>
<type>Site Monitoring Rich Internet Platinum</type>
</service>
<service>
<name>marketing</name>
<description>Only for marketing</description>
<id>A55EA04E-E86E-11DC-B5CB-9F6AA7912F41</id>
<type>Stream Monitoring Gold</type>
</service>
</rsp>

9 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

10 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getNotepad
Description
Returns the notepad of a given account.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
Restrictions
You may only hit this API once per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<notepad>This is the notepad contents.</notepad>
</rsp>
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid


11 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setNotepad
Description
Sets the notepad of an account.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
notepad - string - required
o The notepad contents you wish to set for the account
Restrictions
You may only hit this API once per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - UUID must be supplied
4 - UUID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
36 - Notepad contents must be supplied
59 - The signature is not supplied or is invalid

12 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.addNewService
Description
This will add a new monitoring service to you Webmetrics account; customers not on metered billing will get a
new trial service via this API.
Note: The service will be turned off upon creation (see the turnServiceOn API for turning your service on).
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
servicename - string - required
o The name you would like to give your new service. Service names can be made up of alpha-
numeric, hyphen, and underscore characters.
servicetype - string - required
o This parameter determines the type of service you are creating. You can use any of the
following service types:
application
dns
ftp
ping
pop
port
smtp
stream
webservice
website
wstrans
Restrictions
You may only hit this API 20 times per hour. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
On success, the API will return the ID of your new service.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<newserviceid>105648</newserviceid>
</rsp>

13 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
41 - Required parameters not present
56 - Service name is already taken, choose another
57 - Service name is invalid (service names can contain only alpha-numeric, hyphen, and underscore
characters)
58 - Service type is not valid
59 - The signature is not supplied or is invalid

14 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.changePassword
Description
Sets the password for a given username
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
newpassword - string - required
o The new password for this user
Restrictions
You may only hit this API once every 10 seconds. As well, your username has a limit of 1000 requests/min for
all APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
20 - New password must be supplied
59 - The signature is not supplied or is invalid

15 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.renameService
Description
Renames the service specified by the Service ID to a new name.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
newname - string - required
o The new name of the service. The new name must contain only alpha-numeric characters,
underscores and dashes. Spaces are not allowed. The service name must be different from
your username. The service name cannot be a duplicate of another service you already have.
The service name cannot be longer than 50 characters.
serviceid - string - required
o The id of the service you wish to rename
Restrictions
You may only hit this API once per minute. As well, your username has a limit of 1000 requests/min for all APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
17 - The rename failed, the service name is invalid
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

16 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.resetService
Description
Warning: This will remove all data collected for this service. This is not reversible. The following items will be
cleared: historical log data, uptime information, service description, URL(s), script(s), search and error strings.
Contact information for alerting purposes (alert contacts as well as error notification settings), monitoring agent
locations, maintenance windows, performance
SLA objectives, interval and strikes before error are unaffected.
The service will be turned off once reset.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you wish to reset
keepscripts - int - optional
o Valid options are 1 and 0. Defaults to 0. If 1, monitoring scripts and URL(s) will not be deleted.
keepdescription - int - optional
o Valid options are 1 and 0. Defaults to 0. If 1, the service description will not be deleted.
keeplogs - int - optional
o Valid options are 1 and 0. Defaults to 0. If 1, log data will not be deleted.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

17 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getAgentList
Description
Returns a list of agents that a service is currently configured to run from. Will return the baseline, non-baseline
and excluded agents that it is running from. The agents are not returned in any particular order.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the agents for
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<agent>San Diego, CA</agent>
<agent>Hong Kong</agent>
<agent>Manchester, England</agent>
<baseline>Vancouver, Canada</baseline>
<baseline>Calgary, Canada</baseline>
<baseline>Ottawa, Canada</baseline>
<excluded>IntramonAgent:Internal Agent1</excluded>
<excluded>Tokyo, Japan</excluded>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

18 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setAgentList
Description
Sets the list of agents that this service will run from. To get a list of agents that a particular service can run from,
use maintenance.getAgentInfo.
You must set the list of non-baseline agents. You can optionally set baseline agents if you wish. You cannot set
the same agent as both a baseline and non-baseline agent.
If you wish to use baselines, you must use 3 baseline agents unless the number of strikes for your service is set
to 4, in which case you must specify 4 baseline agents.
Agent names are case sensitive.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
agent - string - required
o Specify one or more agents that will be the non-baseline agents for this service
baseline - string - optional
o Specify one or more baseline agents
serviceid - string - required
o The id of the service you want to set the agent list for
Restrictions
You may only hit this API once per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Request:
?agent=Chicago, Il&agent=Calgary,
Canada&agent=IntramonAgent:InternalAgent1&baseline=New York, NY&baseline=Seattle,
WA&baseline=Miami, FL
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />

19 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
33 - Agent is not valid, check that it is one of the allowed agents for this service
34 - Agents must be supplied
59 - The signature is not supplied or is invalid

20 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getAvailableAgents
Description
Returns a list of agents available to use for a given service. Includes the IP addresses of those agents to assist
in filtering out Webmetrics traffic. They are not returned in any particular order.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the available agents for.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<agent>
<name>Chicago, Il</name>
<ip>42.32.42.1</ip>
</agent>
<agent>
<name>Dallas, TX</name>
<ip>54.3.3.3</ip>
</agent>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

21 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getServiceStatus
Description
Gets the status of a service, either off or on
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the status of.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<status>on</status>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

22 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getServiceType
Description
Given a service id, returns the monitoring type of that service.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the type of.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<type>sitegold</type>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again.
19 - Username is invalid. Please try again. You will be temporarily locked out after 3 consecutive failures.
59 - The signature is not supplied or is invalid, please see the documentation for more details

23 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.turnServiceOff
Description
Turns a given service off.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required Multiple allowed
o The id(s) of the service(s) you want to turn off
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

24 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.turnServiceOn
Description
Turns a given service on
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required Multiple allowed
o The id(s) of the service(s) you want to turn on
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

25 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getDescription
Description
Returns the description of a particular service.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the description of.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<description>This is the description</description>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

26 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setDescription
Description
Sets the description of a service.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to set the description of
description - string - required
o The description you wish to set for the service.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
35 - Description must be supplied
59 - The signature is not supplied or is invalid

27 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getMonitoringURL
Description
Gets the URL that we are currently monitoring for Site Monitor, Streaming and Web Service service types.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the url for
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<url>http://www.webmetrics.com</url>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
30 - This API does not support that service type
59 - The signature is not supplied or is invalid

28 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setMonitoringURL
Description
Sets the URL to be monitored for Web Service, Site Monitor and Streaming service types. The url for a stream
must be start with one of 'http', 'https', 'mms', 'rtmp' and must end in .flv if it is a flash video. The following
extensions are not supported: qt, rm, ra, ram, mov, mp4.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to set the monitoring url of.
url - string - required
o The url you want this service to monitor
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
31 - URL must be supplied
32 - URL is not valid, or service type is not supported, please check the documentation
59 - The signature is not supplied or is invalid

29 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getMonitoringInterval
Description
Gets the monitoring interval of the specified service (in minutes).
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the interval for
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<interval>10</interval>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

30 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setMonitoringInterval
Description
Sets the frequency at which a service will be monitored. A list of valid frequencies can be obtained by making a
call to maintenance.getAvailableMonitoringIntervals.
If the monitoring interval you are trying to set interferes with your timeout settings, your timeout settings will be
changed automatically to compensate. If for example you have a 1 min timeout set, with 3 strikes, and you
change the monitoring interval to 1 min, the timeout changes to 20 seconds so the service can still run every
minute.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to set the monitoring interval of.
interval - int - required
o The frequency in minutes that you want this service to be monitored at.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
43 - Monitoring Interval must be supplied
44 - Monitoring Interval is not valid, use getAvailableMonitoringIntervals to get valid intervals for this service
59 - The signature is not supplied or is invalid

31 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getAvailableMonitoringIntervals
Description
Returns a list of possible monitoring intervals (in minutes) that this service is allowed to use.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the available monitoring intervals for.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<interval>5</interval>
<interval>10</interval>
<interval>15</interval>
<interval>20</interval>
<interval>30</interval>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

32 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setPageTimeout
Description:
Sets the page timeout of a service.
Arguments:
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to set the description of
timeout - string - required
o The timeout you wish to set for this service.
Restrictions:
You may only hit this API 10 times per second. As well, your username has a limit of 100 requests/min for all
APIs.
Example Response:
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes:
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again.
19 - Username is invalid. Please try again. You will be temporarily locked out after 3 consecutive failures.
59 - The signature is not supplied or is invalid, please see the documentation for more details
67 - Timeout not specified.
68 - Timeout value not allowed.

33 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getScript
Description
Gets the script that we are currently monitoring for Application Monitor or Web Service Transaction service
types.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want the script for
Restrictions
You may only hit this API once per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<script>PAGE 1 http://www.webmetrics.com
method get fullpage
searchstring Webmetrics
END
</script>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
30 - This API does not support that service type
59 - The signature is not supplied or is invalid

34 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.addAlertingGroup
Description
Creates a new, blank alerting group which can then be populated by
maintenance.addContactsToAlertingGroup.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
group - string - required
o The name of the alerting group you wish to create
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
6 - Username must be supplied
8 - A group name must be supplied
9 - Group already exists
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

35 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getAlertingGroups
Description
Gets the alerting groups for a particular user. These are user created groups for alerting several contacts at
once.
Groups are given in the format: {USERNAME} GROUPNAME.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<rsp stat="ok">
<group>{testUsername} Development</group>
<group>{testUsername} QualityAssurance</group>
</rsp>
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

36 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.removeAlertingGroup
Description
Removes an alerting group from a specified user.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
group - string - required
o The name of the alerting group you want to remove
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
6 - Username must be supplied
8 - A group name must be supplied
10 - Group does not exist
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

37 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.addContactsToAlertingGroup
Description
Adds email address to a certain alerting contact group.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
group - string - required
o The name of the alerting group you want to add contacts to
contact - string - required - multiple allowed
o The email address you wish to add to the group. You can specify multiple contact parameters
to add several contacts at once.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
6 - Username must be supplied
8 - A group name must be supplied
10 - Group does not exist
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
27 - Contact must be an email address
59 - The signature is not supplied or is invalid

38 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getAlertingGroupContacts
Description
Returns a list of contacts for the particular group specified. The return format is 'NAME <email>', where NAME
is optional.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
group - string - required
o The name of the alerting group you want the contacts for
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<contact>tester &lt;tester@wm.com&gt;</contact>
<contact>devel &lt;devel@wm.com&gt;</contact>
<contact>&lt;qa@web.com&gt;</contact>
</rsp>
Error Codes
2 - API method must be supplied
6 - Username must be supplied
8 - A group name must be supplied
10 - Group does not exist
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

39 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.removeContactsFromAlertingGroup
Description
Removes a contact from a certain alerting group.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
group - string - required
o The name of the alerting group you want to remove contacts from
contact - string - required
o The email address you wish to remove from the group. You can specify multiple contact
parameters to remove several contacts at once.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
6 - Username must be supplied
8 - A group name must be supplied
10 - Group does not exist
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
27 - Contact must be an email address
59 - The signature is not supplied or is invalid

40 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.addDiagnosticContacts
Description
Adds one or more email contacts to the list of diagnostic contacts for a service. You can also add groups of
contacts by specifying an existing group name in the form: {USERNAME} GROUPNAME.
You can get a list of valid groups by using maintenance.getAlertingGroups.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to add the diagnostic contact to.
contact - string - required
o The email/group/sms/voice contact you wish to add
Example Request:
?contact={Username} group1&contact=wm@webmetrics.com&contact=suser@test.com
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
45 - Contact must be a valid email address/sms/voice or group
59 - The signature is not supplied or is invalid

41 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getDiagnosticContacts
Description
Gets the diagnostic contacts for a particular service, including any alerting groups. Groups are given in the
format: {USERNAME} GROUPNAME.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to add the diagnostic contact to.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<contact>test@wm.com</contact>
<contact>test3@wm.com</contact>
<contact>{testUser} group2</contact>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

42 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setDiagnosticContacts
Description
Sets the diagnostic contacts of a service. This will replace any diagnostic contacts that were previously set. To
add diagnostic contacts to the list that currently exists use
maintenance.addDiagnosticContacts.
You can add contacts as either an email address or by group name if you have a group of contacts already set.
You specify the group in the form: {USERNAME} GROUPNAME.
You can get a list of currently enabled groups by using maintenance.getAlertingGroups.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required Multiple allowed
o The id(s) of the service(s) you want to add the diagnostic contact to.
contact - string - required
o The email/group/sms/voice contact you wish to add
Example Request:
?contact={testUser} group1&contact=test@webmetrics.com
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
45 - Contact must be a valid email address/sms/voice or group
59 - The signature is not supplied or is invalid

43 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.removeDiagnosticContact
Description
Removes a diagnostic contact from a particular service which can be either an email address or a group name
in the format: {USERNAME} GROUPNAME.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to add the diagnostic contact to.
contact - string - required
o The email/group/sms/voice contact you wish to add
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
23 - Contact not found
59 - The signature is not supplied or is invalid

44 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.addEscalationLevelContacts
Description
Adds one or more escalation level contacts (either an email or a group or a sms/voice contact) to a service to a
particular escalation level.
To get a list of available groups use maintenance.getalertinggroups.
To get a list of available sms/voice contacts use maintenance.getsmsvoicecontacts. Valid escalation levels are
1-3.
SMS/Voice Contacts are given in the form: [USERNAME] UID
where USERNAME is the username of the account and UID is the unique ID for a certain SMS/Voice contact.
Alerting groups are given in the format: {USERNAME} GROUPNAME.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to add the diagnostic contact to.
contact - string - required
o The email/group/sms/voice contact you wish to add
level - int - required
o The escalation level you wish to add the contact to. Can be 1-3.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
24 - Escalation level not given
25 - Invalid escalation level
45 - Contact must be a valid email address/sms/voice or group
59 - The signature is not supplied or is invalid

45 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getEscalationLevelContacts
Description
Gets the contacts (email/group/sms/voice) for the specified escalation level and specified service.
SMS/Voice Contacts are given in the form: [USERNAME] UID where USERNAME is the username of the
account and UID is the unique ID for a certain SMS/Voice contact.
To see which specific voice/sms phone number is associated with that UID, use
maintenance.getSMSVoiceContacts.
Groups are given in the format: {USERNAME} GROUPNAME.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to add the diagnostic contact to.
level - int - required
o The escalation level you wish to add the contact to. Can be 1-3.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<contact>fe@fe.com</contact>
<contact>fe@fef.com</contact>
<contact>[apis:TestUsername] 9587382983</contact>
<contact>{TestUsername} Group1</contact>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
24 - Escalation level not given
59 - The signature is not supplied or is invalid

46 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.removeEscalationLevelContact
Description
Removes an escalation level contact from a service.
SMS/Voice Contacts are given in the form: [USERNAME] UID where USERNAME is the username of the
account and UID is the unique ID for a certain SMS/Voice contact.
To see which specific voice/sms phone number is associated with that UID, use
maintenance.getSMSVoiceContacts.
Alerting groups are given in the format: {USERNAME} GROUPNAME.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to add the diagnostic contact to.
contact - string - required
o The email/group/sms/voice contact you wish to add
level - int - required
o The escalation level you wish to add the contact to. Can be 1-3.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
23 - Contact not found
24 - Escalation level not given
46 - Only one contact may be specified
59 - The signature is not supplied or is invalid

47 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setEscalationLevelContacts
Description
Sets the escalation level contacts of a service. This will replace any previously set contacts at that escalation
level. You can set multiple contacts by sending multiple contact arguments.
SMS/Voice Contacts are given in the form: [USERNAME] UID where USERNAME is the username of the
account and UID is the unique ID for a certain SMS/Voice contact.
To see which specific voice/sms phone number is associated with that UID, use
maintenance.getSMSVoiceContacts.
Alerting groups are given in the format: {USERNAME} GROUPNAME.
You can use maintenance.getAlertingGroups to get all enabled alerting groups.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required Multiple allowed
o The id(s) of the service(s) you want to add the diagnostic contact to.
contact - string - required
o The email/group/sms/voice contact you wish to add
level - int - required
o The escalation level you wish to add the contact to. Can be 1-3.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
24 - Escalation level not given
25 - Invalid escalation level
45 - Contact must be a valid email address/sms/voice or group
59 - The signature is not supplied or is invalid

48 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getAllAlertingContacts
Description
Gets all the contacts (diagnostic and all escalation levels) for a service.
SMS/Voice Contacts are given in the form: [USERNAME] UID where USERNAME is the username of the
account and UID is the unique ID for a certain SMS/Voice contact.
To see which specific voice/sms phone number is associated with that UID, use
maintenance.getSMSVoiceContacts.
Alerting groups are given in the format: {USERNAME} GROUPNAME.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to add the diagnostic contact to.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<diagnostic>
<contact>test@wm.com</contact>
<contact>test2@wm.com</contact>
</diagnostic>
<level1>
<contact>devel@wm.com</contact>
</level1>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

49 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getEscalationLevelDelay
Description
Gets the escalation level delay of a service for a particular level
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to add the diagnostic contact to.
level - int - required
o The escalation level you wish to add the contact to. Can be 1-3.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<delay>10</delay>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
24 - Escalation level not given
59 - The signature is not supplied or is invalid

50 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getEscalationLevelDelayOptions
Description
Gets the available options for setting the escalation delay time.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<option>10</option>
<option>15</option>
<option>20</option>
<option>25</option>
<option>30</option>
<option>35</option>
</rsp>
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

51 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setEscalationLevelDelay
Description
Sets the escalation level delay of a service for a particular level. This is the amount of time after an error is first
detected to notify the next level of alert contacts.
To get the available delay time options use maintenance.getescalationleveldelayoptions.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required Multiple allowed
o The id(s) of the service(s) you want to set the escalation level delay time of
level - int - required
o The escalation level you wish to add the contact to. Can be 2 or 3.
delay - int - required
o The time delay in minutes that you want to set this escalation level to
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific responseit returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
24 - Escalation level not given
25 - Invalid escalation level
26 - Delay time not valid
59 - The signature is not supplied or is invalid

52 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getMonitoringURL
Description:
Gets the URL that we are currently monitoring for Site Monitor, Streaming and Web Service service types. For
Site Monitor's, also returns the errorstring and keyword if they are set.
Arguments:
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the url for
Restrictions:
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Response:
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<url>http://www.webmetrics.com</url>
<keyword>Webmetrics</keyword>
<errorstring>404</errorstring>
</rsp>
Error Codes:
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again.
19 - Username is invalid. Please try again. You will be temporarily locked out after 3 consecutive failures.
30 - This API does not support that service type
59 - The signature is not supplied or is invalid, please see the documentation for more details

53 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setMonitoringURL
Description:
Sets the URL to be monitored for Web Service, Site Monitor and Streaming service types.
For Site Monitor services, you can also specify a keyword or an errorstring to set that will be used to validate
the url.
The url for a stream must be start with one of 'http', 'https', 'mms', 'rtmp' and must end in .flv if it is a flash video.
The following extensions are not supported: qt, rm, ra, ram, mov, mp4.
Arguments:
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to set the monitoring url of.
url - string - required
o The url you want this service to monitor
searchstring - string - optional
o The searchstring used to validate this url, will alert if it's not found
errorstring - string - required
o The errorstring used to validate this url, will alert if it's found
Restrictions:
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all APIs.
Example Response:
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes:
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again.
19 - Username is invalid. Please try again. You will be temporarily locked out after 3 consecutive failures.
31 - URL must be supplied
32 - URL is not valid, or service type is not supported, please check the documentation
59 - The signature is not supplied or is invalid, please see the documentation for more details

54 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getPageTimeout
Description:
Returns the page timeout of a given service.
Arguments:
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the agents for
Restrictions:
You may only hit this API once per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Response:
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<timeout>10</timeout>
</rsp>
Error Codes:
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again.
19 - Username is invalid. Please try again. You will be temporarily locked out after 3 consecutive failures.
59 - The signature is not supplied or is invalid, please see the documentation for more details

55 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setPageTimeout
Description:
Sets the page timeout of a service.
Arguments:
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to set the description of
timeout - string - required
o The timeout you wish to set for this service.
Restrictions:
You may only hit this API 10 times per second. As well, your username has a limit of 100 requests/min for all
APIs.
Example Response:
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes:
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again.
19 - Username is invalid. Please try again. You will be temporarily locked out after 3 consecutive failures.
59 - The signature is not supplied or is invalid, please see the documentation for more details
67 - Timeout not specified.
68 - Timeout value not allowed.

56 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getReportList
Description
Returns a list of all reports in the specified account. For each report, the report ID, report name, and report
description are returned.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<report name="My Report" description="Performance & availability report for
Webmetrics monitoring services" reportid="REPORT-ID-1"/>
<report name="IT Report" description="Performance & availability report for
Webmetrics monitoring services" reportid="REPORT-ID-2"/>
</rsp>
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

57 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.addReportingContacts
Description
Adds one or more reporting contacts (email or group) to a particular account.
Alerting groups are set in the format: {USERNAME} GROUPNAME.
You can use maintenance.getAlertingGroups to get all enabled alerting groups.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
contact - string - required
o The email/group contact you wish to remove
reportid - string - required
o The ID for the report from which you would like to remove a contact
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
45 - Contact must be a valid email address or group
49 - Contact already exists or is a duplicate
59 - The signature is not supplied or is invalid

58 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getReportingContacts
Description
Gets the reporting contacts for a particular user.
Alerting groups are given in the format: {USERNAME} GROUPNAME.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
reportid - string - required
o The ID for the report from which you would like to remove a contact
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<contact>test@wm.com</contact>
<contact>test3@wm.com</contact>
</rsp>
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

59 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.removeReportingContact
Description
Removes a reporting contact from a particular user.
Alerting groups are given in the format: {USERNAME} GROUPNAME.
You can use maintenance.getAlertingGroups to get all enabled alerting groups.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
contact - string - required
o The email/group contact you wish to remove
reportid - string - required
o The ID for the report from which you would like to remove a contact
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
23 - Contact not found
59 - The signature is not supplied or is invalid

60 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setReportingContacts
Description
Sets the reporting contacts for a particular user. Accepts multiple contacts arguments to set multiple contacts at
once.
This will replace any previously set reporting contacts. To add contacts, instead use
maintenance.addReportingContacts.
Alerting groups are set in the format: {USERNAME} GROUPNAME.
You can use maintenance.getAlertingGroups to get all enabled alerting groups.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
contact - string - required
o The email/group contact you wish to add
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
22 - Contact must be supplied
45 - Contact must be a valid email address or group
49 - Contact already exists or is a duplicate
59 - The signature is not supplied or is invalid

61 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.addSMSVoiceContact
Description
Adds a new SMS/Voice contact. Contact name, type and phone number must be specified.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
type - string - required
o Must be either SMS or PHONE.
name - string - required
o The name of the contact you wish to add
number - int - required
o The phone number you wish to add. Do not include dashes, spaces or brackets in the phone
number. Must be between 10 and 30 digits.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />>
Error Codes
2 - API method must be supplied
6 - Username must be supplied
11 - Contact already exists
12 - The contact type is invalid, see the documentation for valid contact types
13 - The number for the contact was not supplied
14 - The max number of contacts for this user has been reached, to add more please contact
sales@webmetrics.com
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
21 - Contact name must be supplied
50 - No contact type supplied
51 - Contact number not valid. Please see the documentation for valid contact numbers
59 - The signature is not supplied or is invalid

62 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getSMSVoiceContacts
Description
Returns a list of sms/voice contacts. These are contacts which can be used to receive voice alerts or text
messages sent to a phone number rather than a phones email address.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<contact>
<date_added>6/9/2006</date_added>
<name>jimtest</name>
<number>2856452151</number>
<type>sms</type>
<uid>3423423423</uid>
</contact>
<contact>
<date_added>6/10/2006</date_added>
<name>devel</name>
<number>2432342342</number>
<type>phone</type>
<uid>9837423423</uid>
</contact>
</rsp>
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

63 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.removeSMSVoiceContact
Description
Removes an SMS/Voice contact from the list of contacts for a user. You must specify the unique id of the
contact you wish to remove. To find the unique id, use maintenance.getSMSVoiceContacts.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
uid - int - required
o The unique id of the contact you wish to remove.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
6 - Username must be supplied
16 - UID is not valid
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

64 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getLoadtimeSLA
Description
Returns the load time sla in seconds for a particular service. Only applies to Application Monitor, Site Monitor,
Web Service, Streaming and Rich Internet Application service types.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the load time SLA for.
sla - float - required
o The load time sla you wish to set in seconds.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<sla>4.3</sla>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

65 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getUptimeSLA
Description
Returns the uptime sla as a percentage for a particular service.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to get the uptime SLA for.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<uptime>99.5</uptime>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

66 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setLoadtimeSLA
Description
Sets the load time SLA (service level agreement) in seconds for a service. The value must be greater than 0.
Only applies to Application Monitor, Site Monitor, Web Serivce, Streaming and Rich Internet Application service
types.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required Multiple allowed
o The id(s) of the service(s) you want to set the load time sla for.
sla - float - required
o The load time sla you wish to set in seconds.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
28 - No SLA given
29 - SLA Invalid
59 - The signature is not supplied or is invalid

67 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.setUptimeSLA
Description
Sets the uptime SLA (service level agreement) for a service as a percentage. Valid input is a number: 0 <
number <= 100. Do not include the percentage sign. Decimal places are allowed.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required Multiple allowed
o The id(s) of the service(s) you want to set the uptime for
sla - float - required
o The uptime sla you wish to set.
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
28 - No SLA given
29 - SLA Invalid
59 - The signature is not supplied or is invalid

68 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.getMaintenanceWindows
Description
Returns a list of maintenance windows. There are 5 types of maintenance windows - onetime, block, span,
monthlyblock, monthlyspan.
onetime - A span of time from any date and time to any other date and time in the future.
block - A block of time from one time to another (within a single day) that occurs every week on certain
days.
span - A span of time from one day of the week at a certain time to another day of the week at a certain
time, which occurs every week.
monthlyblock - A block of time from one time to another (within a single day) that occurs every month
on certain days.
monthlyspan - A span of time from one day of the month at a certain time to another day of the month
at a certain time, which occurs every month.
Also returns the ID of each maintenance window. This is used to delete maintenance windows.
Also returned is whether the maintenance window is set to continue monitoring during the window (without
alerting) or not. This is the <monitor> tag.
If the window type is block, numbered day tags are returned, where the values for tags of weekly blocks could
be 0-6, for monthly they could be 0-30.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The service ID of the service you want to get the maintenance windows for
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<window>
<id>WINDOW_1211246005</id>
<end_date>End of month</end_date>
<end_time>02:00</end_time>
<monitor>0</monitor>
<start_date>4</start_date>
<start_time>01:00</start_time>
<type>monthlyspan</type>

69 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

</window>

<window>
<id>WINDOW_1212104751</id>
<day0>1</day0>
<day1>6</day1>
<end_time>16:00</end_time>
<monitor>0</monitor>
<start_time>1:00</start_time>
<type>block</type>
</window>
<window>
<id>WINDOW_1211271763</id>
<end_date>01/01/2008</end_date>
<end_time>02:00</end_time>
<monitor>1</monitor>
<start_date>01/01/2008</start_date>
<start_time>01:00</start_time>
<type>onetime</type>
</window>
<window>
<id>WINDOW_1211271763</id>
<end_date>01/01/2008</end_date>
<end_time>02:00</end_time>
<monitor>1</monitor>
<start_date>01/01/2008</start_date>
<start_time>01:00</start_time>
<type>onetime</type>
</window>
<window>
<id>WINDOW_1211271834</id>
<end_date>1/1/2008</end_date>
<end_time>9:00</end_time>
<monitor>1</monitor>
<start_date>1/1/2007</start_date>
<start_time>8:00</start_time>
<type>onetime</type>
</window>
<window>
<id>WINDOW_1211271834</id>
<end_date>1/1/2008</end_date>
<end_time>9:00</end_time>
<monitor>1</monitor>
<start_date>1/1/2007</start_date>
<start_time>8:00</start_time>
<type>onetime</type>
</window>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied

70 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

71 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.isInMaintenanceWindow
Description:
Given one or more serviceid's, returns whether or not they are currently in a maintenance window.
Arguments:
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required (multiple allowed, serviceid=123456&serviceid=23452)
o The service ID(s) of the service(s) you want to know whether are in a maintenance window
currently or not
Restrictions:
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Response:
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<service>
<id>123456</id>
<inMaintWindow>1</inMaintWindow>
</service>
<service>
<id>12344</id>
<inMaintWindow>0</inMaintWindow>
</service>
</rsp>
Error Codes:
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again.
19 - Username is invalid. Please try again. You will be temporarily locked out after 3 consecutive failures.
59 - The signature is not supplied or is invalid, please see the documentation for more details

72 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.addOneTimeMaintenanceWindow
Description
Adds a onetime maintenance window. A onetime maintenance window is a span of time from any date and time
to any other date and time in the future.
During the maintenance window you will not be alerted about errors. There is an option to continue to be
monitored during the maintenance window or not, but either way you will not be alerted.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required Multiple allowed
o The ID(s) of the service(s) you want to add the maintenance window for
stime - int - required
o Must be in 24 hour format. The starting time of day for the maintenance window
sday - int - required
o Valid options are 1-31. The starting day of the month for the maintenance window
smonth - int - required
o Valid options are 1-12. The starting month of the maintenance window
syear - int - required
o Must be a 4 digit year. The starting year of the maintenance window
etime - int - required
o Must be in 24 hour format. The ending time of day for the maintenance window
eday - int - required
o Valid options are 1-31. The ending day of the month for the maintenance window
emonth - int - required
o Valid options are 1-12. The ending month of the maintenance window
eyear - int - required
o Must be 4 digit year. The ending year of the maintenance window
monitor - int - optional
o Valid options are 1 and 0. Defaults to 0. If 1, Webmetrics will continue to monitor the service
during the maintenance window.
Example Request:
To set a maintenance window for 14:01 Feb 2, 2008 to 15:01 Feb 3, 2008:
?method=maintenance.addOneTimeMaintenanceWindow&stime=14:01&sday=2&eday=3&etime=15
:01&syear=2008&eyear=2008&smonth=2&emonth=2&username=[apis:username]&serviceid=[ap
is:serviceid]&sig=[apis:sig]
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.

73 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
41 - One or more required parameters are missing/invalid, please check the documentation and try again
59 - The signature is not supplied or is invalid

74 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.addWeeklyMaintenanceWindow
Description
Adds a weekly maintenance window. There are two types of weekly maintenance windows:
block - A block of time from one time to another (within a single day) that occurs every week on certain
days.
span - A span of time from one day of the week at a certain time to another day of the week at a certain
time, which occurs every week.
To add a block type of maintenance window, you must specify which days of the week the block of time will be
active. Days of the week are specified as the numbers 0-6 with Sunday being 0 and Saturday being 6.
During the maintenance window you will not be alerted about errors. There is an option to continue to be
monitored during the maintenance window or not, but either way you will not be alerted.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required Multiple allowed
o The ID(s) of the service(s) you want to add the maintenance window for
wintype - required
o Valid options are 'block' or 'span'.
stime - int - required
o Specified in 24 hour time - The starting time of day for the maintenance window
etime - int - required
o Specified in 24 hour time - The ending time of day for the maintenance window
sday - int - optional
o Valid options are 0-6. Required if wintype is 'span'. The starting day of the week for the
maintenance window
eday - int - optional
o Valid options are 0-6. Required if wintype is 'span'. The ending day of the week for the
maintenance window
day - int - optional - multiple allowed
o Valid options are 0-6. Required if wintype is 'block'.
monitor - int - optional
o Valid options are 1 and 0. Defaults to 0. If 1, Webmetrics will continue to monitor the service
during the maintenance window.
Example Request:
For example, if you want to block out the time 3-4am during Monday and Tuesday, you specify two 'day'
parameters of 1 and 2 and stime as 3:00 and etime as 4:00:
?method=maintenance.addWeeklyMaintenanceWindow&wintype=block&stime=3:00&etime=4:00
&day=1&day=2&sig=[sig]&serviceid=[serviceid]&username=[username]

75 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

To add a span of time from, for example, Fridays at 11pm to Saturdays at 2am, you would specify sday as 5
and eday as 6 and stime as 23:00 and etime as 2:00:
?method=maintenance.addWeeklyMaintenanceWindow&wintype=span&stime=23:00&etime=2:00
&sday=5&eday=6&sig=[sig]&serviceid=[serviceid]&username=[username]
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
41 - One or more required parameters are missing/invalid, please check the documentation and try again
59 - The signature is not supplied or is invalid

76 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.addMonthlyMaintenanceWindow
Description
Adds a monthly maintenance window. There are two types of monthly maintenance windows:
monthlyblock - A block of time from one time to another (within a single day) that occurs every month
on certain days.
monthlyspan - A span of time from one day of the month at a certain time to another day of the month
at a certain time, which occurs every month.
To add a monthlyblock type of maintenance window, you must specify which days of the week the block of time
will be active. Days of the month are specified as the numbers 0-30.
You can also specify 'End of month' as the end day, which means the maintenance window will last until the
end of the month regardless of how many days are in a month.
During the maintenance window you will not be alerted about errors. There is an option to continue to be
monitored during the maintenance window or not, but either way you will not be alerted.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required Multiple allowed
o The ID(s) of the service(s) you want to add the maintenance window for
wintype - required
o Valid options are 'monthlyblock' or 'monthlyspan'.
stime - int - required
o Specified in 24 hour time - The starting time of day for the maintenance window
etime - int - required
o Specified in 24 hour time - The ending time of day for the maintenance window
sday - int - optional
o Valid options are 0-30 and 'End of month'. Required if wintype is 'span'. The starting day of the
month for the maintenance window
eday - int - optional
o Valid options are 0-30 and 'End of month'. Required if wintype is 'span'. The ending day of the
month for the maintenance window
day - int - optional - multiple allowed
o Valid options are 0-30 and 'End of month'. Required if wintype is 'block'.
monitor - int - optional
o Valid options are 1 and 0. Defaults to 0. If 1, Webmetrics will continue to monitor the service
during the maintenance window.
Example Request:
For example, if you want to block out from 1-2pm on the 5th, 9th and 27th of each month, you specify three
'day' parameters of 4, 8 and 26 and stime as 13:00 and etime as 14:00:

77 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

?method=maintenance.addMonthlyMaintenanceWindow&day=4&day=8&day=26&stime=13:00&eti
me=14:00&wintype=monthlyblock&sig=[sig]&username=[username]&serviceid=[serviceid]
To add a span of time from, for example, the 25th at 11pm to the end of the month at 2am, you would specify
sday as 24 and eday as 'End of month' and stime as 23:00 and etime as 2:00:'
?method=maintenance.addMonthlyMaintenanceWindow&sday=24&eday=End%20of%20month&stim
e=23:00&etime=2:00&wintype=monthlyspan&sig=[sig]&username=[username]&serviceid=[se
rviceid]
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
41 - One or more required parameters are missing/invalid, please check the documentation and try again
59 - The signature is not supplied or is invalid

78 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

maintenance.removemaintenanceWindow
Description
Removes a maintenance window from the list of maintenance windows for a service. You must specify the
unique id of the maintenance window you wish to remove. To find the unique id, use
maintenance.getmaintenancewindows.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
id - int - required
o The unique id of the maintenance window you wish to remove.
serviceid - string required
o The service id of the service you wish to remove the maintenance window from
Restrictions
You may only hit this API 10 times per second. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Reponse
This method has no specific response - It returns an empty success response if it completes without error.
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok" />
Error Codes
2 - API method must be supplied
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
47 - ID of the maintenance window must be specified
48 - ID of the maintenance window is invalid. Use getMaintenanceWindows to get valid maintenance windows
for this service
59 - The signature is not supplied or is invalid

79 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

logdownload.getdata
Description
Gets the raw log file for a particular day. You must specify the day of the month, the month, and a four digit
year.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - required
o The id of the service you want to download the log for.
day - int - required
o The day of the month (1-31)
month - int - required
o The number of the month you want (1-12)
year - int - required
o A four digit year
username - string - required
o The username used to log in to the account
Example Request:
To get the log for Feb 2, 2008, you would make the following request:
?method=logdownload.getdata&serviceid=serviceid&day=2&month=2&year=2008&sig=sig&us
ername=username
Restrictions
You may only hit this API once every ten seconds. As well, your username has a limit of 1000 requests/min for
all APIs.
Example Reponse
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<logs>
Server: London, England
Sun 9/30 00:03:52.80 NOTE: 0.55 seconds to load step 1:
http://s3.amazonaws.com/?Signature=OCMjqwTZt2bqkqfloOPIWZQY%2BOc%3D&amp;Expires=11
91135952&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (2235 bytes)
Sun 9/30 00:03:52.89 NOTE: 0.45 secs to load item 1:
http://s3.amazonaws.com/?Signature=OCMjqwTZt2bqkqfloOPIWZQY%2BOc%3D&amp;Expires=11
91135952&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (0.24 DNS, 0.20 first packet,
2235 bytes, 72.21.207.193)
Sun 9/30 00:03:53.35 SUCCESS: verification of search string 'rares_LT7'

80 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

Sun 9/30 00:03:53.35 NOTE: 0.27 seconds to load step 2:
http://s3.amazonaws.com/rares_LT7?Signature=mKYplD27rfOj8%2BKnvWkJN1Lp0zE%3D&amp;E
xpires=1191135952&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (17469 bytes)
Sun 9/30 00:03:53.35 NOTE: 0.26 secs to load item 1:
http://s3.amazonaws.com/rares_LT7?Signature=mKYplD27rfOj8%2BKnvWkJN1Lp0zE%3D&amp;E
xpires=1191135952&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (0.00 DNS, 0.11 first
packet, 17469 bytes, 72.21.207.193)
Sun 9/30 00:03:53.63 SUCCESS: verification of search string 'image.manifest'
Sun 9/30 00:03:53.63 NOTE: 0.18 seconds to load step 3:
http://s3.amazonaws.com/rares_LT7/image.manifest?Signature=37EOn2r9zGFKMxeFG4XUHmj
RQUg%3D&amp;Expires=1191135952&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (8131
bytes)
Sun 9/30 00:03:53.63 NOTE: 0.17 secs to load item 1:
http://s3.amazonaws.com/rares_LT7/image.manifest?Signature=37EOn2r9zGFKMxeFG4XUHmj
RQUg%3D&amp;Expires=1191135952&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (0.00 DNS,
0.10 first packet, 8131 bytes, 72.21.207.193)

Server: Newark, NJ
Sun 9/30 00:08:42.02 NOTE: 0.14 seconds to load step 1:
http://s3.amazonaws.com/?Signature=17D06xH0aWbI2lRUKgBOPyIiAlo%3D&amp;Expires=1191
136241&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (2235 bytes)
Sun 9/30 00:08:42.08 NOTE: 0.07 secs to load item 1:
http://s3.amazonaws.com/?Signature=17D06xH0aWbI2lRUKgBOPyIiAlo%3D&amp;Expires=1191
136241&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (0.01 DNS, 0.06 first packet, 2235
bytes, 72.21.207.193)
Sun 9/30 00:08:42.16 SUCCESS: verification of search string 'rares_LT7'
Sun 9/30 00:08:42.16 NOTE: 0.10 seconds to load step 2:
http://s3.amazonaws.com/rares_LT7?Signature=x3fIaHfplM3k%2FWndLmcZgSu3zu8%3D&amp;E
xpires=1191136241&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (17469 bytes)
Sun 9/30 00:08:42.16 NOTE: 0.08 secs to load item 1:
http://s3.amazonaws.com/rares_LT7?Signature=x3fIaHfplM3k%2FWndLmcZgSu3zu8%3D&amp;E
xpires=1191136241&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (0.00 DNS, 0.05 first
packet, 17469 bytes, 72.21.207.193)
Sun 9/30 00:08:42.26 SUCCESS: verification of search string 'image.manifest'
Sun 9/30 00:08:42.26 NOTE: 0.05 seconds to load step 3:
http://s3.amazonaws.com/rares_LT7/image.manifest?Signature=%2FGuO4rG7Xh4DtJnIRLG2Q
mVa%2F7E%3D&amp;Expires=1191136241&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (8131
bytes)
Sun 9/30 00:08:42.26 NOTE: 0.04 secs to load item 1:
http://s3.amazonaws.com/rares_LT7/image.manifest?Signature=%2FGuO4rG7Xh4DtJnIRLG2Q
mVa%2F7E%3D&amp;Expires=1191136241&amp;AWSAccessKeyId=0J56RT02KQP0NEKC84G2 (0.00
DNS, 0.03 first packet, 8131 bytes, 72.21.207.193)
</logs>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
59 - The signature is not supplied or is invalid

81 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

processeddata.getdata
Description
With comprehensive measurements and summary data, the Processed Data API allows customers to download
GlobalWatch monitoring data in a concise summary format. This data is excellent for reporting purposes. It does
not contain all monitoring data; for more granular data use the Real Time API or the Raw Log API.
The Processed Data API is intended to be used in a batch format and therefore is not suitable for real-time
access. Webmetrics has enforced this by limiting access to account data (using this API) to only data prior to
today. Requests made to this API for the current day's data will not be fulfilled.
The Processed Data API is available for the following GlobalWatch services: Application Monitor, Site Monitor,
Streaming Monitor, Web Services Monitor, and System Monitor (POP/SMTP, DNS, FTP, and Custom Port).
The maximum date range that you can request data for is 31 days.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
serviceid - string - required multiple allowed
o The Service ID(s) to get the requested data for.
username - string - required
o The username used to log in to the account
sday - int - required
o Start date: day of month (must be 1-31)
smonth - int - required
o Start date: month of year (must be 1-12)
syear - int - required
o Start date: year (must be 4 digits)
eday - int - required
o End date: day of month (must be 1-31)
emonth - int - required
o End date: month of year (must be 1-12)
eyear - int - required
o End date: year (must be 4 digits)
Restrictions
You may only hit this API once every 5 minutes. As well, your username has a limit of 1000 requests/min for all
APIs.
Example Requests:
To request data for a single day (Feb 20, 2007):
?method=processeddata.getdata&username=MyUsername&sig=XXX&serviceid=MyServiceID&sd
ay=20&smonth=2&syear=2007&eday=20&emonth=2&eyear=2007

82 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

To request data for a date range (Feb 20, 200Feb 26, 2007):
?method=processeddata.getdata&username=MyUsername&sig=XXX&serviceid=MyServiceID&sd
ay=20&smonth=2&syear=2007&eday=26&emonth=2&eyear=2007
To request data for 3 services for a single day (June 20, 2010):
?method=processeddata.getdata&username=MyUsername&sig=XXX&serviceid=123400&service
id=123401&serviceid=123402&sday=20&smonth=6&syear=2010&eday=20&emonth=6&eyear=2010
Output Format (DTD):
The output format is in the form of an XML document. The Document Type Definition (DTD) for the XML output
is the same for all account types. In addition, many of the account types share XML attributes.
The Document Type Definition is:
<!ELEMENT rsp ( #PCDATA | summary | wmversion | error )* >
<!ATTLIST rsp stat NMTOKEN #REQUIRED >

<!ELEMENT error EMPTY>
<!ATTLIST error code CDATA #REQUIRED>
<!ATTLIST error msg CDATA #REQUIRED>

<!ELEMENT summary ( #PCDATA | item )* >
<!ATTLIST summary day NMTOKEN #REQUIRED >
<!ATTLIST summary serviceid NMTOKEN #REQUIRED >

<!ELEMENT item ( #PCDATA | item )* >
<!ATTLIST item defined NMTOKEN #IMPLIED >
<!ATTLIST item key NMTOKEN #REQUIRED >

<!ELEMENT wmversion ( #PCDATA ) >
Output Format (Common to services):
Element Descriptions
Element Description
Status Element containing processed data for multiple days.
Summary Element containing the processed data for one day.
Item Element containing either a specific data item or other item elements
Attribute Descriptions
Attribute Content Description
Day (<item> ...</item>)+ Element containing data for the specified day of the year (1 -
365/366).

83 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

Key Specific value or (<item>
...</item>)+
Describes the data contained in this element.
Possible Attribute Values (Attribute: day)
Value Content Description
1 ... 365/366 [1-9][0-9]* The day of the year the data applies to.
Possible Attribute Values (Attribute: key)
Value Content Description
hour00 ... hour23 Numeric, Comma
Separated
Numeric
Data referring to a particular hour of the day
page1 ... pageN Numeric, Text Data referring to a particular step of the transaction.
Monitoring Agent Name
(Amsterdam, ... , Toronto)
Numeric Data from a particular monitoring agent.
BaselineData (<item>
...</item>)+
Element containing data from baseline agents only. Only
applies if baseline agents are defined.
TotalErrors [0-9]+ The total number of errors.
TotalLoadTime [0-9]+.[0-9][0-9] The sum of all individual page load times (in seconds) for
the day
TotalSuccesses [0-9]+ The number of successful transaction attempts for the
day.
Violations [0-9]+ The number of unsuccessful transaction attempts for the
day
ErrorsByAgent (<item>
...</item>)+
Element containing number of errors, grouped by
monitoring agent.
ErrorsByHour (<item>
...</item>)+
Element containing number of errors per hour, grouped
by hour.
ErrorsByPage (<item>
...</item>)+
Element containing number of errors, grouped by
individual page number.
ErrorsByType (<item>
...</item>)+
Element containing number of errors, grouped by error
type
Connectivity [1-9][0-9]* The number of connectivity errors for the current day.
Content [1-9][0-9]* The number of content errors for the current day.

84 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

Timeout [1-9][0-9]* The number of timeout errors for the current day.
HitsByAgent (<item>
...</item>)+
Element containing number of transaction attempts,
grouped by monitoring agent
Legend (<item>
...</item>)+
Element containing the URL for each individual page
(step) of the transaction
LoadTimeByAgent (<item>
...</item>)+
Element containing average page load time from each
monitoring agent.
LoadTimeByHour (<item>
...</item>)+
Average load time for each page of the transaction.
LoadTimeByPage (<item>
...</item>)+
Element containing average load time for each individual
page, grouped by page number. Calculated from baseline
data if baseline agents are defined, from all data
otherwise.
PageSize (<item>
...</item>)+
Element containing total size (in bytes) of each individual
page of the transaction, grouped by page.
SuccessesByHour (<item>
...</item>)+
Element containing number of successful page loads,
grouped by page number, then by hour.
SuccessesByPage (<item>
...</item>)+
Element containing number of successful page loads,
grouped by page number.
TotalLoadTime [0-9]+.[0-9][0-9] Total load time (in seconds) for all individual pages of all
transactions for the current day
TotalSize [0-9]+ Total downloaded size (in bytes) of a complete
transaction. Calculated by adding up the individual size of
each page.
WarningsByAgent (<item>
...</item>)+
Element containing total number of strikes, grouped by
monitoring agent.
Output Format (Common to Full-Page services):
Attribute Descriptions (Attribute: key)
Value Content Description
item1 ... itemN (<item>
...</item>)+
Element containing the load time statistics for a particular
item on the page.
bytes [0-9]+ The size of the downloaded item in bytes
dnstime [0-9]+.[0-9][0-
9]
The number of seconds to resolve the items DNS.

85 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

firstbyte [0-9]+.[0-9][0-
9]
Load time (in seconds) of the first byte of the item.
legend URL The URL of the item.
offsettime [0-9]+.[0-9][0-
9]
The time elapsed between the start of the page download
and the start of the current item download.
totaltime [0-9]+.[0-9][0-
9]
The time to download the current item.
BestFPLoadTime (<item>
...</item>)+
Element containing the best full page download time for
each individual page of the transaction, grouped by page
number.
FPLoadTimeByPage (<item>
...</item>)+
Element containing average full page load time, grouped by
page number.
SamplesByPage (<item>
...</item>)+
Element containing the representative full page breakdown
sample for the day. Grouped by page number, then by item
number
SuccessfulObjectsByPage (<item>
...</item>)+
Element containing the total number of successful individual
item load attempts.
UnsuccessfulObjectsByPage (<item>
...</item>)+
Element containing the total number of failed individual item
load attempts.
GlobalWatch Application Monitoring (Gold, Platinum, Silver):
Element Descriptions
Contains the elements common to services.
See section: Output Format (Common to services).
The attributes for the services (see section: Output Format (Common to services)) are available to these
services. Additionally, the following attribute is also available:
Attribute Content Description
defined true/false Currently reserved for use by Webmetrics.
Contains attribute values included in Common as well as:
Possible Attribute Values (Attribute: key)
Value Content Description
AvgTransLoadTime [0-9]+.[0-9][0- The average transaction load time, in seconds, for the current

86 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

9] day. Includes all steps of the transaction. Calculated from
baseline data if baseline agents are defined, from all data
otherwise.
TransLoadTimeByAgent (<item>
...</item>)+
Element containing average load time for completing a
transaction, grouped by monitoring agent.
TransLoadTimeByHour (<item>
...</item>)+
Element containing average load time for completing a
transaction, grouped by hour of day. Calculated from baseline
data if baseline agents are defined, from all data otherwise.
TransPerHour (<item>
...</item>)+
Element containing total number of successful transactions,
grouped by hour of day. Calculated from baseline data if baseline
agents are defined, from all data otherwise.
TotalFailedTransactions [0-9]+ The total number of failed transactions for the current day.
OffsetAvgByHour N/A May appear but is currently unused.
GlobalWatch Application Monitoring (Full-Page Gold, Full-Page Platinum, Full-Page Silver):
Element Descriptions
Contains the elements common to services.
See section: Output Format (Common to services).
Attribute Descriptions
Contains the attributes common to services.
See sections: Output Format (Common to services) and Output Format (Common to Full-Page services).
Possible Attribute Values
Contains the attributes values common to services and Full-Page services.
See sections: GlobalWatch Application Monitoring (Gold, Silver, Platinum) and Output Format (Common to
services).
GlobalWatch Site Monitoring (Gold, Platinum, Silver):
Element Descriptions
Contains the elements common to services.
See section: Output Format (Common to services).
Attribute Descriptions
Contains the attributes common to services.

87 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

See sections: Output Format (Common to services) and Output Format (Common to Full-Page services).
Contains attribute values included in the section Output Format (Common to services) as well as the following:
Possible Attribute Value (Attribute: key)
Value Content Description
AvgLoadTimePerPage <item> ...
</item>
Element Containing the average load time for the page being
monitored.
GlobalWatch Site Monitoring (Full-Page Silver, Full-Page Gold, Full-Page Platinum):
Element Descriptions
Contains the elements from the section: GlobalWatch Site Monitoring (Gold and Silver).
Attribute Descriptions
Contains the attributes from the section: GlobalWatch Site Monitoring (Gold and Silver).
Attribute Values
Contains the attribute values from the sections: GlobalWatch Site Monitoring (Gold and Silver), and Output
Format (Common to Full-Page services).
GlobalWatch Streaming Monitoring (Gold, Silver):
Element Descriptions
Contains the elements common to services.
See section: Output Format (Common to services).
Attribute Descriptions
Contains the attributes common to services.
See sections: Output Format (Common to services).
Contains attribute values included in the section Output Format (Common to services) as well as:
Attribute Values (Attribute: key)
Value Content Description
BufferTimeByDay [0-9]+.[0-9][0-9] Average stream buffer time for the current day.
BufferTimeByHour (<item> ... </item>)+ Element containing the average stream buffer

88 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

time, grouped by hour.
ConnectTimeByDay [0-9]+.[0-9][0-9] Average time spent waiting for the stream to begin
buffering.
ConnectTimeByHour [0-9]+.[0-9][0-9] Average time spent waiting for the stream to begin
buffering, grouped by hour.
FrustratedUsersPerHour [0-9]+.[0-9][0-9] Number of users whose stream quality dropped
below the "Tolerant Users" threshold, grouped by
hour.
TolerantUsersPerHour [0-9]+.[0-9][0-9] Number of users whose stream quality was above
the "Tolerant Users" threshold but below the
"Happy Users" threshold, grouped by hour.
HappyUsersPerHour [0-9]+.[0-9][0-9] Number of users whose stream quality was above
the "Happy Users" threshold, grouped by hour.
ThroughputByDay [0-9]+.[0-9][0-9] Average stream throughput in Kbps.
ThroughputByHour [[0-9]+.[0-9][0-9] Average
stream throughput in Kbps,
grouped by hour.

URL URL The URL of the stream being monitored.
Quality [0-9]+ Number of quality errors that have occurred.
Throughput [0-9]+ Number of throughput errors that have occurred.
GlobalWatch Web Service Monitoring (Silver, Gold, Platinum):
Element Descriptions
Contains the elements common to services.
See section: Output Format (Common to services).
Contains attributes from the Output Format (Common to services) section as well as:
Attribute Descriptions
Attribute Content
Description
Defined true/false May appear but is currently unused.
Contains attribute values from the Output Format (Common to services) section as well as:

89 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

Attribute Values (Attribute: key)
Value Content Description
AvgTransLoadTime [0-9]+.[0-
9][0-9]
Average transaction load time for the current day. Calculated from
baseline data if baseline agents are defined.
TotalFailedTransactions [0-9]+ The total number of failed transactions for the current day.
TransLoadTimeByAgent (<item> ...
</item>)+
Element containing average transaction load time, sorted by
monitoring agent.
TransLoadTimeByHour (<item> ...
</item>)+
Element containing average transaction load time, sorted by hour
of day. Calculated from baseline data if baseline agents are
defined, from all data otherwise.
TransPerHour (<item> ...
</item>)+
Element containing total number of transactions, sorted by hour.
Calculated from baseline data if baseline agents are defined, from
all data otherwise.
OffsetAvgByHour N/A May appear but is currently unused.
GlobalWatch Web Services Transaction (Silver, Gold, Platinum):
Element Descriptions
Contains elements included in Web Services.
See section: GlobalWatch Web Service Monitoring (Silver, Gold, Platinum).
Attribute Descriptions
Contains attributes included in Web Services.
See section: GlobalWatch Web Service Monitoring (Silver, Gold, Platinum).
Attribute Values
Contains the attribute values from the section: GlobalWatch Web Service Monitoring (Silver, Gold, and
Silver).
GlobalWatch System Monitoring (Silver, Gold, Platinum):
All System Monitoring services utilize the same elements, attributes, and attribute values except for FTP
Monitor. The FTP Monitor service utilizes the following elements, attributes, and attribute values:
Element Descriptions (FTP Monitor)
Contains the elements common to Application Monitoring.

90 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

See section: GlobalWatch Application Monitoring (Gold, Silver).
Attribute Descriptions (FTP Monitor)
Contains the attributes common to Application Monitoring.
See section: GlobalWatch Application Monitoring (Gold, Silver).
Attribute Values (FTP Monitor)
Contains the attribute values common to Application Monitoring.
See section: GlobalWatch Application Monitoring (Gold, Silver).
All other service types in the System Monitoring suite (Port, DNS, Ping, and POP, and SMTP) utilize the
following elements, attributes, and attribute values:
Element Descriptions
Contains the elements common to services.
See section: Output Format (Common to services).
Attribute Descriptions
Contains the attributes common to services.
See section: Output Format (Common to services).
Contains attribute values included in the section Output Format (Common to services) as well as the following:
Attribute Values (Attribute: key)
Value Content Description
AvgResponseLatency (<item>...</item>)+ Average response latency for the day, grouped by IP
address or domain name.
IP address / domain
name
Numeric / Text Data pertaining to a particular IP address or domain.
Domains (<item>...</item>)+ list of IP addresses or domain names for which monitoring
data has been collected.
ResponseLatencyByHour (<item>...</item>)+ Average response latency, grouped by IP/domain name,
and then by hour of day.
Error Handling:
The following errors may occur if the parameters to the CGI are not correct:

91 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

Error Type Description
Invalid Account Specified an HTML document describing the error will be returned
Invalid Service Specified an HTML document describing the error will be returned
Output Example
Application Monitoring, Full-Page Gold
<rsp stat="ok">
<summary day="54" serviceid="142424">
<item key="AvgTransLoadTime">0.53</item>
<item key="BaselineData">
<item key="TotalErrors">0</item>
<item key="TotalLoadTime">75.6000000000001</item>
<item key="TotalSuccesses">144</item>
</item>
<item key="BestFPLoadTime">
<item key="page1">0.23</item>
</item>
<item key="ErrorsByAgent">
</item>
<item key="ErrorsByHour">
</item>
<item key="ErrorsByPage">
</item>
<item key="ErrorsByType">
</item>
<item key="FPLoadTimeByPage">
<item key="page1">2.01</item>
</item>
<item key="HitsByAgent">
<item key="Amsterdam">3</item>
<item key="Atlanta">7</item>
<item key="Boston">6</item>
<item key="Brussels">6</item>
</item>
<item key="Legend">
<item key="page1">http://www.webmetrics.com/</item>
</item>
<item key="LoadTimeByAgent">
<item key="Amsterdam">2.40</item>
<item key="Atlanta">1.00</item>
<item key="Boston">0.61</item>
</item>
<item key="LoadTimeByAgentByHour">
<item key="Amsterdam">
<item key="hour14">2.37</item>
</item>
<item key="Atlanta">
<item key="hour00">1.11</item>
<item key="hour04">1.07</item>

92 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

</item>
<item key="New_York">
<item key="hour08">1.03</item>
<item key="hour13">0.76</item>
<item key="hour17">0.96</item>
<item key="hour22">1.21</item>
</item>
<item key="LoadTimeByHour">
<item key="page1">
<item key="hour00">0.53</item>
<item key="hour01">0.60</item>
<item key="hour02">0.50</item>
</item>
</item>
<item key="LoadTimeByPage">
<item key="page1">0.53</item>
</item>
<item key="OffsetAvgByHour" defined="false"></item>
<item key="PageSize">
<item key="page1">97108</item>
</item>
<item key="SamplesByPage">
<item key="page1">
<item key="item1">
<item key="bytes">17597</item>
<item key="dnstime">0.00</item>
<item key="firstbyte">0.17</item>
<item key="legend">http://www.webmetrics.com/</item>
<item key="offsettime">0.07</item>
<item key="totaltime">0.34</item>
</item>

<item key="item2">
<item key="bytes">10764</item>
<item key="dnstime">0.00</item>
<item key="firstbyte">0.17</item>
<item key="legend">
http://www.webmetrics.com/css/webmetrics.css</item>
<item key="offsettime">0.43</item>
<item key="totaltime">0.25</item>
</item>
<item key="item20">
<item key="bytes">72</item>
<item key="dnstime">0.00</item>
<item key="firstbyte">0.08</item>
<item key="legend">
http://www.webmetrics.com/images/arrow1.gif</item>
<item key="offsettime">1.49</item>
<item key="totaltime">0.08</item>
</item>
<item key="SuccessesByHour">
<item key="page1">
<item key="hour18">12</item>
<item key="hour19">12</item>
</item>

93 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

</item>
<item key="SuccessesByPage">
<item key="page1">288</item>
</item>
<item key="SuccessfulObjectsByPage">
<item key="page1">6349</item>
</item>
<item key="TotalErrors">0</item>
<item key="TotalFailedTransactions">0</item>
<item key="TotalLoadTime">567.15</item>
<item key="TotalSize">97108</item>
<item key="TotalSuccesses">288</item>
<item key="TransLoadTimeByAgent">
<item key="San_Jose">3.01</item>
<item key="Sydney">6.01</item>
<item key="Tokyo">4.83</item>
<item key="Toronto">0.75</item>
<item key="Vancouver">2.40</item>
</item>
<item key="TransLoadTimeByHour">
<item key="hour21">0.49</item>
<item key="hour22">0.51</item>
<item key="hour23">0.46</item>
</item>
<item key="TransPerHour">
<item key="hour21">6</item>
<item key="hour22">6</item>
<item key="hour23">6</item>
</item>
<item key="UnsuccessfulObjectsByPage">
</item>
<item key="Violations">0</item>
<item key="WarningsByAgent">
</item>
</summary>
</rsp>
Site Monitoring, Full-Page Gold
<rsp stat="ok">
<summary day="54">
<item key="AvgLoadTimePerPage">
<item key="page1">0.640801393728223</item>
</item>
<item key="BaselineData">
<item key="TotalErrors">0</item>
<item key="TotalLoadTime">183.91</item>
<item key="TotalSuccesses">287</item>
<item key="Violations">0</item>
</item>
<item key="BestFPLoadTime">
<item key="page1">0.09</item>
</item>
<item key="ErrorsByAgent">
</item>

94 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

<item key="ErrorsByHour">
</item>
<item key="ErrorsByPage">
</item>
<item key="ErrorsByType">
</item>
<item key="FPLoadTimeByPage">
<item key="page1">0.64</item>
</item>
<item key="HitsByAgent">
<item key="Amsterdam">6</item>
<item key="Atlanta">14</item>
<item key="Boston">14</item>
</item>
<item key="Legend">
<item key="page1">http://www.webmetrics.com/</item>
</item>
<item key="LoadTimeByAgent">
<item key="Amsterdam">1.29</item>
<item key="Atlanta">0.30</item>
<item key="Boston">0.25</item>
</item>
<item key="LoadTimeByAgentByHour">
<item key="Amsterdam">
<item key="hour13">0.80</item>
<item key="hour15">0.71</item>
<item key="hour17">0.62</item>
<item key="hour19">0.67</item>
<item key="hour20">0.62</item>
<item key="hour22">4.33</item>
</item>
<item key="Atlanta">
<item key="hour00">0.22</item>
<item key="hour02">0.18</item>
<item key="hour03">0.21</item>
<item key="hour05">0.35</item>
</item>
</item>
<item key="LoadTimeByHour">
<item key="page1">
<item key="hour00">0.61</item>
<item key="hour01">0.55</item>
<item key="hour02">0.79</item>
</item>
</item>
<item key="LoadTimeByPage">
<item key="page1">0.64</item>
</item>
<item key="PageSize">
<item key="page1">5</item>
</item>
<item key="SamplesByPage">
<item key="page1">
<item key="item1">
<item key="bytes">5</item>

95 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

<item key="dnstime">0.33</item>
<item key="firstbyte">0.25</item>
<item key="legend">
http://www2.webmetrics.com/sampleItem.jpg
</item>
<item key="offsettime">0.05</item>
<item key="totaltime">0.58</item>
</item>
</item>
</item>
<item key="SuccessesByHour">
<item key="page1">
<item key="hour00">12</item>
<item key="hour01">12</item>
</item>
</item>
<item key="SuccessesByPage">
<item key="page1">287</item>
</item>
<item key="SuccessfulObjectsByPage">
<item key="page1">287</item>
</item>
<item key="TotalErrors">0</item>
<item key="TotalLoadTime">
<item key="page1">183.91</item>
</item>
<item key="TotalSize">5</item>
<item key="TotalSuccesses">287</item>
<item key="UnsuccessfulObjectsByPage">
</item>
<item key="Violations">
<item key="page1">0</item>
</item>
<item key="WarningsByAgent">
</item>
</summary>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
37 - Date supplied is invalid
38 - Day of the month must be supplied
39 - Month must be supplied
40 - 4 digit year must be supplied
59 - The signature is not supplied or is invalid

96 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

realtime.getdata
Description
The Realtime API is provided to allow access to your data in real time. When you query the API, it will return the
last sample that was taken for either a given service, a number of services, or all services under an account. In
addition to getting the last sample, you can specify an optional parameter to return up to the last 20 samples for
each service. Note that the latest logs are returned first.
New versions of the Realtime xml API will be periodically released. Please look for the version number in the
output xml.
Currently, the API is only applicable to Application Monitoring, Site Monitoring, Web Services Monitoring, Web
Service Transaction Monitoring, and VitalStats accounts.
By default, if a service has baseline agents configured, the Realtime API will return only data from baseline
agents. If you don't want to use baselines only, set the parameter usebaselines to 0.
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time.
username - string - required
o The username used to log in to the account
serviceid - string - optional - Multiple allowed
o One or more Service IDs may be specified to return real time data for one or more services. If
no Service IDs are specified, the API will return data for all services.
servicestate - string optional
o Can be either "all", "on," or "off". Default is "all". If the value is different from "all", each service
state will be checked.
all: return data for services that are either On or Off
on: return data for services that are On
off: return data for services that are Off
lastsampletime - int - optional
o You may specify an epoch time which will be used to get only sample from that time to the
present. The epoch time is returned by a call to this API as well, so you can use that number
when making the next call to the API and it will only get samples from the last time you queried
the API (up to 20 samples).
samplenum - int - optional
o The number of samples to return per service. Default is 1. Maximum is 20.
status string optional
o Can be either "all", "nok" or "error". Default is "all". If the value is different from "all", the status
of the *last* sample of each service will be checked.
all: do not check status of last sample, all will be returned
nok: return data for services whose last sample status is either STRIKE or ERROR
error: return data for services whose last sample status is ERROR
shared - int optional
o Can be either 1 or 0. Default is 1. If the value is 0, and the service is shared by another user,
that service won't be returned.
usebaselines - int - optional

97 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

o Can be either 1 or 0. Default is 1. If useBaselines is 1, and the service has baseline agents
configured, only samples from baseline agents will be returned.
items - int - optional
o Can be either 1 or 0. Defaults to 0. If items is 1, and the service is a fullpage service, then
information regarding the items of the service are also returned.
Example Requests:
To get the last sample info for a given service:
?method=realtime.getdata&username=MyUsername&sig=XXX&serviceid=MyServiceID
To request data for all services since the last time the api was queried:
?method=realtime.getdata&username=MyUsername&sig=XXX&serviceid=MyServiceID&l
astsampletime=1132535335
To request data for services that are On and not shared by another user, and whose last sample has
either ERROR or STRIKE status:
?method=realtime.getdata&username=MyUsername&sig=XXX&servicestate=on&status=
nok&shared=0
Restrictions
You may only hit this API once every 60 seconds. As well, your username has a limit of 1000 requests/min for
all APIs.
Input Format (DTD):
<!DOCTYPE INPUT [apis:
<!ELEMENT INPUT (USERNAME, SERVICEID+?, SIG, SAMPLENUM?, LASTSAMPLETIME?,
USEBASELINES?, )>
<!ELEMENT USERNAME (#PCDATA)>
<!ELEMENT SERVICEID (#PCDATA)>
<!ELEMENT SIG (#PCDATA)>
<!ELEMENT SAMPLENUM (#PCDATA)>
<!ELEMENT LASTSAMPLETIME (#PCDATA)>
<!ELEMENT USEBASELINES (#PCDATA)>
<!ELEMENT ITEMS (#PCDATA)>
<!ELEMENT SERVICESTATE (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT SHARED (#PCDATA)>
]>
Output Format (DTD):
Active - Indicates the status of the service - 0 = OFF, 1 = ON, 2 = STARTING (has no data).
Status - The status of the sample, can be either 'OK', 'STRIKE' or 'ERROR'.

98 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

<!DOCTYPE OUTPUT [

<!ELEMENT OUTPUT (TIME, WMVERSION, SERVICE+) >
<!ATTLIST OUTPUT STAT CDATA #REQUIRED>
<!ELEMENT TIME (#PCDATA)>
<!ELEMENT WMVERSION (#PCDATA)>
<!ELEMENT SERVICE (ACTIVE, SAMPLE*)>
<!ATTLIST SERVICE NAME CDATA #REQUIRED>
<!ATTLIST SERVICE TYPE CDATA #REQUIRED>
<!ATTLIST SERVICE ACTIVE CDATA #REQUIRED>
<!ELEMENT SAMPLE ((STRIKE | ERROR)?, TRANSACTION)>
<!ATTLIST SAMPLE STATUS CDATA #REQUIRED>
<!ATTLIST SAMPLE DATE CDATA #REQUIRED>
<!ATTLIST SAMPLE TIME CDATA #REQUIRED>
<!ELEMENT STRIKE (#PCDATA)>
<!ELEMENT ERROR (#PCDATA)>
<!ELEMENT TRANSACTION (LOADTIME, PAGE+)>
<!ATTLIST TRANSACTION UNITS CDATA #REQUIRED>
<!ELEMENT LOADTIME (#PCDATA)>
<!ELEMENT PAGE (LOADTIME, URL, NUM, (ITEM+)?) )>
<!ELEMENT LOADTIME (#PCDATA)>
<!ELEMENT URL (#PCDATA)>
<!ELEMENT NUM (#PCDATA)>
<!ELEMENT ITEM (LOADTIME, URL, FIRSTPACKET, DNS, IP, SIZE, NUM)>
<!ELEMENT LOADTIME (#PCDATA)>
<!ELEMENT URL (#PCDATA)> <!ELEMENT FIRSTPACKET (#PCDATA)>
<!ELEMENT DNS (#PCDATA)>
<!ELEMENT IP (#PCDATA)>
<!ELEMENT SIZE (#PCDATA)>
<!ELEMENT NUM (#PCDATA)>
]>
Output Example:
<rsp stat="ok">
<time>1149179966</time>
<wmversion>2.0</wmversion>
<timezone>US/Eastern</timezone>
<service name="service1" type=App Monitor Fullpage Gold" active="1">
<sample date="6/1" status="OK" time="12:31:42.42">
<transaction units="Seconds">
<loadtime>5.3</loadtime>
<page>
<num>1</num>
<url>http://www.fake.com</url>
<loadtime>5.3</loadtime>
</page>
</transaction>
</sample>
<sample date="6/1" status="STRIKE" time="12:30:42.42">
<STRIKE>Strike: could not connect</STRIKE>
<transaction units="Seconds">
<loadtime></loadtime>:
<page>
<num>1</num>

99 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

<url>http://www.fake.com</url>
<loadtime></loadtime>
</page>
</transaction>
<sample date="6/1" status="OK" time="12:29:42.42">
<transaction units="Seconds">
<loadtime>5.5</loadtime>
<page>
<loadtime>3.2</loadtime>
<num>1</num>
<url>http://www.fake.com</url>
<item>
<num>1</num>
<loadtime>2.3</loadtime>
<url>/1.gif</url>
<dns>0.04</dns>
<firstpacket>0.04</firstpacket>
<ip>64.202.167.128</ip>
<size>1777</size>
</item>
<item>
<num>2</num>
<loadtime>2.1</loadtime>
<url>/2.gif</url>
<dns>0.00</dns>
<firstpacket>0.324</firstpacket>
<ip>64.202.167.128</ip>
<size>177</size>
</item>
</page>
<page>
<loadtime>2.3</loadtime>
<num>2</num>
<url>fake.com/star.htm</url>
<item>
<num>1</num>
<loadtime>2.3</loadtime>
<url>/1.gif</url>
<dns>0.04</dns>
<firstpacket>0.04</firstpacket>
<ip>64.202.167.128</ip>
<size>1777</size>
</item>
<item>
<num>2</num>
<loadtime>1.3</loadtime>
<url>/5.gif</url>
<dns>0.14</dns>
<firstpacket>0.14</firstpacket>
<ip>64.202.167.129</ip>
<size>277</size>
</item>
</page>
</transaction>
</sample>

100 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

</service>
<service name="service2" type="App Monitor Fullpage Gold" active="0"/>
</rsp>
Error Codes
2 - API method must be supplied
3 - Service ID must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again
19 - Username is invalid, please try again (you will be temporarily locked out after 3 consecutive failures)
41 - One or more required parameters are missing/invalid, please check the documentation and try again
59 - The signature is not supplied or is invalid

101 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

snapshot.getdata
Description
The Account snapshot API is provided to allow access to the same statistics that appear on the Webmetrics
dashboard via an API. When you query the API, it will return several vital statistics for each service, along with
the latest errors that this account has seen. The statistics returned include last sample time and value, last error
time, last sample set, uptime over several periods and load time average over several periods. The sample set
is the last 20 samples taken, in a comma separated form, with the most recent sample first in the list.
Details Returned -
Name Description
name Name of the service
avgltmonthly Average load time over the previous month
avgltquarterly Average load time over the previous quarter
avglttoday Average load time for today
avgltweekly Average load time for the past week
avgltyearly Average load time over the past year
group
Given if this service belongs to a group. If the service is in multiple groups, multiple group
tags are returned
id Service id
interval The services' monitoring interval
lasterrortime The last time that this service errored today
loadtimeslaobjective Load time SLA objective in seconds
uptimeslaobjective Uptime SLA objective as a percentage
lastsample The last samples load time, or ERROR if an error
lastsampleset The last 20 samples load time, the latest sample is returned first in the list
lastsampletime The time and date of the last sample
status The status of the service, can be OK, OFF, STRIKE, ERROR
uptimemonthly The services' uptime over the past month
uptimequarterly The services' uptime over the past quarter
uptimetoday The services' uptime today
uptimeweekly The services' uptime over the past week
uptimeyearly The services' uptime over the past year
Arguments
sig - string - required
o The sig for this user, a SHA1 hash of the account name, the account api key and the current
unix time. See How_to_use_the_Webmetrics_APIs for more details.
username - string - required
o The username used to log in to the account
serviceid - string - optional - Multiple allowed

102 / 102
For more information, please visit www.webmetrics.com
Webmetrics API User Guide
May 18, 2011

o One or more Service IDs may be specified to return only data for one or more services. If no
Service IDs are specified, the API will return data for all services.
Example Requests
To get the snapshot info for all services in an account:
?method=snapshot.getdata&username=MyUsername&sig=XXX
To get the snapshot info for two given services:
?method=snapshot.getdata&username=MyUsername&sig=XXX&serviceid=MyServiceID&serviceid=My
OtherServiceID
Restrictions
You may only hit this API once every 10 seconds. As well, your username has a limit of 1000 requests/min for
all APIs.
Error Codes:
2 - API method must be supplied
4 - Service ID is not valid
6 - Username must be supplied
18 - Account has exceeded the request limit, you must wait to try this API again.
19 - Username is invalid. Please try again. You will be temporarily locked out after 3 consecutive failures.
41 - One or more required parameters are missing/invalid, please check the documentation and try again.
59 - The signature is not supplied or is invalid, please see the documentation for more details.

You might also like