mon.itor.us REST API

Prerequisite

User should be signed up in mon.itor.us.

Conventions

the things in parenthesis should be changed to real values, e.g. [key] = 3d5fg5dflk If not specified additionally all the parameters are mandatory by default.

Authentication

Request URL

GET: http://mon.itor.us/user/api/[signinEmail]/[signinPassword]

OR

POST: http://mon.itor.us/user/api?email=[signinEmail]&password=[signinPassword]

Request parameters

Parameter Value Description
email string an e-mail of a registered user which acts as a username
password string password of a registered user

If HTTP response code is 200 OK then the key will be returned which will be used to identify user in further requests.



Otherwise in case of 400 response code the following the message will be returned regarding an error.


Response fields

Parameter Value Description
key string key used to identify the user in the further requests
message string appropriate error message

All the other HTTP response codes will be returned in case of something wrong is happened on the side of a provider of API.

Sample response

The following is a sample response for the query http://mon.itor.us/user/api/user@user.com/pass4mon:



Get list of tests

Request URL

GET: http://mon.itor.us/test/api/[key]/testNames

Request parameters

Parameter Value Description
key string key received during authentication phase
testNames constant value = testNames action to be performed

If HTTP response code is 200 OK then the list of user tests is returned.



Otherwise in case of 400 response code the following the message will be returned regarding an error.


Response fields

Parameter Value Description
test attribute id – numbervalue – string attribute id is used to identify the testvalue shows the test name
message string appropriate error message

All the other HTTP response codes will be returned in case of something wrong is happened on the side of a provider of API.

Sample response

The following is a sample response for the query http://mon.itor.us/test/api/19FQT195O03DBD8HKJVAHF1HDJ/testNames:


Get info regarding specified test

Request URL

GET: http://mon.itor.us/test/api/[key]/testinfo/[testID]/[timezoneoffset]

Request parameters

Parameter Value Description
key string key received during authentication phase
testInfo constant value = testInfo action to be performed
testID number used to identify the test
timezoneoffset (Optional) number offset relative to GMT, used to show results in the timezone of the user; if not specified in request the default value is considered in GMT timezone

If HTTP response code is 200 OK then the list of user tests is returned.



Otherwise in case of 400 response code the following the message will be returned regarding an error.


Response fields

Parameter Value Description
testId number id of the test
tagname string tag of the test
name string name of the test
testurl string url of the test
type string one of the following test types: HTTP, HTTPS, PING, FTP, UDP, TCP, SIP, SMTP, IMAP, POP3, DNS
startDate date creation date of the test
newTest number 1 - Yes or 0 –No specifies if the test was already added by another user or not

All the other HTTP response codes will be returned in case of something wrong is happened on the side of a provider of API.

Sample response

The following is a sample response for the query http://mon.itor.us/test/api/19FQT195O03DBD8HKJVAHF1HDJ/testinfo/49152/240:


Get the results of the specified test

Request URL

GET: http://mon.itor.us/test/api/[key]/test/[testID]/[day]/[month]/[year]/[countOfLocations]/[locationIds]/[timezoneoffset]

Request parameters

Parameter Value Description
key string key received during authentication phase
test constant value = test action to be performed
day number specifies the day the results should be retrieved for
month number specifies the month the results should be retrieved for
year number specifies the year the results should be retrieved for
countOfLocations number shows the number of locations the results should be retrieved for. Possible values are 1,2,3. To receive the results from all locations 0 value should be specified.
locationIds (Optional) number if value of parameter countOfLocations is other than 0 this should specify the location ids the results should be retrieved for. Possible values are 1 for Austria, 2 for Germany, 3 for US
timezoneoffset (Optional) number offset relative to GMT, used to show results in the timezone of the user; if not specified in request the default value is considered in GMT timezone

If HTTP response code is 200 OK then the list of user tests is returned.



Otherwise in case of 400 response code the following the message will be returned regarding an error.


Response fields

Parameter Value Description
location attribute id - number id attribute shows the location the following results are received for
row tags contains the cells with the values corresponding to one check of the specified test
cell number the following three values are received for each check of the test resulttime, response, status
oksum number sum of all response values with a status of ok(can be used to obtain average response time)
okcount number number of checks with status ok performed during the specified period of time
nokcount number number of checks with status nok performed during the specified period of time
min number min response time out of all checks performed during the specified period of time
max number max response time out of all checks performed during the specified period of time

All the other HTTP response codes will be returned in case of something wrong is happened on the side of a provider of API.

Sample response

The following is a sample response for the query http://mon.itor.us/test/api/19FQT195O03DBD8HKJVAHF1HD/test/49152/15/1/2007/3/2/1/3/240:


Get all the tags names

Request URL

POST: http://mon.itor.us/test/api/[key]/tags

Request parameters

Parameter Value Description
key string key received during authentication phase
tags constant value = tags action to performed

If HTTP response code is 200 OK then the key will be returned which will be used to identify user in further requests.



Otherwise in case of 400 response code the following the message will be returned regarding an error.


Response fields

Parameter Value Description
tag string tag name
message string appropriate error message

All the other HTTP response codes will be returned in case of something wrong is happened on the side of a provider of API.

Sample response

The following is a sample response for the query http://mon.itor.us/test/api/19FQT195O03DBD8HKJVAHF1HDJ/tags:



Get the tests with specified tag name

Request URL

POST: mon.itor.us/test/api/[key]/tagTests/[tagName]

Request parameters

Parameter Value Description
key string key received during authentication phase
tagTests constant value = tagTests action to performed
tagName string tag name of the tests to be retrieved

If HTTP response code is 200 OK then the key will be returned which will be used to identify user in further requests.



Otherwise in case of 400 response code the following the message will be returned regarding an error.


Response fields

Parameter Value Description
test attribute id – number value - string id of the test with a requested tag name value is a name of the test with the requested tag name
message string appropriate error message

All the other HTTP response codes will be returned in case of something wrong is happened on the side of a provider of API.

Sample response

The following is a sample response for the query http://mon.itor.us/test/api/19FQT195O03DBD8HKJVAHF1HDJ/tagTests/premon:



Get the all tests last testresults of the specified user

Request URL

GET: http://mon.itor.us/test/api/[key]/testsLastValues/[countOfLocations]/[locationIds]

Request parameters

Parameter Value Description
key string key received during authentication phase
testsLastValues constant value = testsLastValues action to be performed
countOfLocations number shows the number of locations the results should be retrieved for. Possible values are 1,2,3. To receive the results from all locations 0 value should be specified.
locationIds (Optional) number if value of parameter countOfLocations is other than 0 this should specify the location ids the results should be retrieved for. Possible values are 1 for Austria, 2 for Germany, 3 for US

If HTTP response code is 200 OK then the list of user tests is returned.



Otherwise in case of 400 response code the following the message will be returned regarding an error.


Response fields

Parameter Value Description
location attribute id - number id attribute shows the location the following results are received for
row tags contains the cells with the values corresponding to one check of the specified test
cell number the following three values are received for each check of the test resulttime, response, status
cell string the following three values are received for each check of the test tagName, testName

All the other HTTP response codes will be returned in case of something wrong is happened on the side of a provider of API.

Sample response

The following is a sample response for the query http://mon.itor.us/test/api/19FQT195O03DBD8HKJVAHF1HD/testsLastValues/1/3: