Quick start guide

All requests are made with BASE_URL: https://api1.host-tracker.com

The HostTracker API supports the following HTTP methods for interaction:

  • GET: Retrieve data from HostTracker.
  • POST: Create new resources or submit data.
  • PUT: Update existing resources.
  • DELETE: Remove resources.
  • PATCH: Partially update resources.

Authentication:

All operations but user token retrieving require authentication information in http headers. Authentication performed by using Authorization Http header with specified bearer token. Token is created by POST request with login, password data to BASE_URL/users/token. See details on user operations help page.

Example of token usage:

 
GET BASE_URL/task/7EE87894-B8A9-E311-BEB2-DC85DE1F0BC2 HTTP/1.1
User-Agent: Fiddler
Host: www.host-tracker.com
Content-Type: application/json
Authorization: bearer your token here
Content-Length: 0

CORS support:

CORS is enabled for all origins (response contains header Access-Control-Allow-Origin: *). This allows, for example, API access via JQuery AJAX requests.

Support http method overriding

If you could not use DELETE, PUT, PATCH requests for accessing API use X-HTTP-Method-Override header with POST request to resourse.

For example, for task updating you could send PUT request to BASE_URL/tasks or send POST to BASE_URL/tasks with X-HTTP-Method-Override: PUT

POST BASE_URL/users/token

get authorization token for requests to other API

Request. POST BASE_URL/users/token

  • Content-Type: application/json
  • Json:
    
    {"login":"your login here",
     "password":"your password here"}
    Content-Length: 0
    
    

    Parameters should be js encoded.

  • Subaccount could work with superaccount data by providing "forLogin" field. Content-Type: application/json
  • Json:
    
    {"login":"subaccount login",
     "password":"subaccount pwd",
     "forLogin": "superaccount login"}
    
    

    In this case, returned token allows you to manage superaccount information in same way as you work with API methods directly for your own account. The corresponding rights have to been granted by superaccount in order for operation to succeed. For example, if superaccount grants read only rights to monitoring tasks, the returned token will allow you to fetch monitoring information, but POST, PUT, PATCH, DELETE methods that alter monitoring state will be prohibited.

  • Content-Type: text/xml
  • Json:
    
    {"login":"subaccount login",
     "password":"subaccount pwd",
     "forLogin": "superaccount login"}
    
    

    Parameters should be xml encoded.

  • Content-Type: application/x-www-form-urlencoded
  • Json:
    
    login=your login here&password=your password here
    
    

    Parameters should be url encoded.

  • Accept specifies response content format: application/json, text/xml.
  • It is optional and if omitted then response format detected from Content-Type. For Content-Type: application/x-www-form-urlencoded it is application/json by default.

  • Authorization should not be send.
  • Response. POST BASE_URL/users/token

    200 OK:

  • Accept: application/json (or if not specified and Content-Type is not xml)
  • Json:
    
    {
        "ticket":"your token here",
        "expirationTime":"token expiration",
        "expirationUnixTime":int value - token expiration unix time
    }
    
    
  • Accept: text/xml (or if not specified and Content-Type is xml)
  • Xml:
    
    <AuthTicket>
    <ticket>your token here</ticket>
    <expirationTime>token expiration</expirationTime>
    <expirationUnixTime>int value - token expiration unix time</expirationUnixTime>
    </AuthTicket>
    
    

    Parameters should be xml encoded.

    401 IncorrectLoginOrPassword - incorect login or password

    Examples. POST BASE_URL/users/token

    get authorization token for requests to other API

    Request. POST BASE_URL/users/token

  • Json request for json token:
  • Json:
    
    POST BASE_URL/users/token HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Content-Length: 37
            
    {"login":"login", "password":"password"}
    
    
  • XML request for XML token:
  • 
    POST BASE_URL/users/token HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Content-Length: 75
            
    <LoginData>
    <login>login</login>
    <password>password</password>
    </LoginData>
    
    
  • Form request for json token:
  • 
    POST BASE_URL/users/token HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/x-www-form-urlencoded
    Host: www.host-tracker.com
    Content-Length: 26
            
    login=login&password=password
    
    
  • Form request for XML token:
  • 
    POST BASE_URL/users/token HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/x-www-form-urlencoded
    Accept: text/xml
    Host: www.host-tracker.com
    Content-Length: 26
            
    login=login&password=password
    
    

    Api REST agent operations

    BASE_URL: https://api1.host-tracker.com

    GET BASE_URL/agents

    get array of HostTracker world monitoring points

    Request. GET BASE_URL/agents

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Response. GET BASE_URL/agents

    200 OK:

  • Accept: application/json or Content-Type: application/json
  • Json:
    
    [
    {
    "id":"guid - monitoring point id",
    "upFrom":"date - monitoring point starting date",
    "datacenter":
    {
    "name":"datacenter name",
    "city":"datacenter city",
    "country":"datacenter country",
    "state":"datacenter state"
    },
    "company":
    {
    "url":"company site",
    "name":"company name",
    "language":"company site language",
    "country":"company country"
    },
    "ip":"agent ip address",
    "version":"agent version",
    "lon":agent longitude, ex. -97.14667,
    "lat":agent latitude, ex. 31.549333,
    "pools":[array of pools, currently empty. reserved for future use]
    },
    {
    "id":"5625d028-7c78-482f-9d8d-2c41fbc752f1",
    "upFrom":"2013-04-17T15:02:38",
    "datacenter":
    {
    "name":"Waco ITG",
    "url":"http://guiahosting.com",
    "city":"Waco",
    "country":"US",
    "state":"TX"
    },
    "company":
    {
    "name":"GuiaHosting",
    "language":"ES",
    "country":"US"
    },
    "ip":"91.197.251.251",
    "version":"0.0.5230.0",
    "lon":-98.14667,
    "lat":33.549333,
    "pools":[]
                }
    ...
    ]
    
    
  • Accept: text/xml or Content-Type: text/xml
  • Xml:
    
    <ArrayOfAgent>
    <Agent>
    <id>guid - monitoring point id</id>
    <upFrom>date - monitoring point starting date</upFrom>
    <datacenter>
    <name>datacenter name</name>
    <city>datacenter city</city>
    <country>datacenter country</country>
    <state>datacenter state</state>
    </datacenter>
    <company>
    <name>company name</name>
    <url>company site</url>
    <language>company language</language>
    <country>company country</country>
    </company>
    <ip>agent ip address</ip>
    <version>agent version</version>
    <lon>agent longitude</lon>
    <lat>agent latitude</lat>
    <pools />
    </Agent>
    <Agent>
    <id>9fac37cd-8cc7-4306-b84d-0dcb14b5ef68</id>
    <upFrom>2013-09-20T11:16:07</upFrom>
    <datacenter>
    <name>Waco ITG</name>
    <city>Waco</city>
    <country>US</country>
    <state>TX</state>
    </datacenter>
    <company>
    <name>GuiaHosting</name>
    <url>http://guiahosting.com</url>
    <language>ES</language>
    <country>US</country>
    </company>
    <ip>91.197.255.221</ip>
    <version>0.0.5230.0</version>
    <lon>-97.14667</lon>
    <lat>31.549333</lat>
    <pools />
    </Agent>
    </ArrayOfAgent>
    
    
    • 401 AccessDenied - authorization header is not provided
    • 401 WrongTicket - wrong token provided in header
    • 401 TicketExpired - specified ticket expired

    Examples. GET BASE_URL/agents

  • Request for agents in json format:
  • 
    GET BASE_URL/agents HTTP/1.1
    User-Agent: Fiddler
    Accept: application/json
    Host: www.host-tracker.com
    Authorization: bearer 3DD135...5EE510417
    Content-Length: 0
    
    
  • Request for agents in XML format:
  • 
    GET BASE_URL/agents HTTP/1.1
    User-Agent: Fiddler
    Accept: text/xml
    Host: www.host-tracker.com
    Authorization: bearer 3DD135...5EE510417
    Content-Length: 0
    
    

    GET BASE_URL/agents/pools

    - get array of agent regions (Asia, Europe, America) (used for configuring tasks)

    Request. GET BASE_URL/agents/pools

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Response. GET BASE_URL/agents/pools

    200 OK:

  • Accept: application/json or Content-Type: application/json
  • Json:
    
    [
    {
        "id":"string - id of region",
        "desc":"readable region description",
        "hidden":false,     "childPools":["child1 pool id", "child1 pool id", ... ],
        "agents":[array of this region agents"],
    },
    ...
    ]
    
    
  • Accept: text/xml or Content-Type: text/xml
  • Xml:
    
    <ArrayOfAgentPool>
        <AgentPool>
            <id>string - id of region</id>
            <desc>readable region description</desc>
            <hidden>False</hidden>
            <childPools>
            <string>id of child1 pool</string>
            <string>id of child2 pool</string>
            ...
        </childPools>
            <agents>
                <Agent>agent structure. See GET BASE_URL/agents</Agent>
                <Agent>agent structure. See GET BASE_URL/agents</Agent>
            ...
            </agents>
        </AgentPool>
    </ArrayOfAgentPool>
    
    
    • 401 AccessDenied - authorization header is not provided
    • 401 WrongTicket - wrong token provided in header
    • 401 TicketExpired - specified ticket expired

    Examples. GET BASE_URL/agents/pools

  • Request for agent pools in json format:
  • 
    GET BASE_URL/agents/pools HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Content-Length: 0
    Authorization: bearer ECFB190B3...653C1E78
    
    
  • Request for agent pools in XML format:
  • 
    GET BASE_URL/agents/pools HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Content-Length: 0
    Authorization: bearer ECFB190B3...653C1E78
    
    

    Api REST task operations

    BASE_URL: https://api1.host-tracker.com

    GET BASE_URL/tasks/intervals

    get array of accepted task intervals.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • 
    GET BASE_URL/tasks/intervals HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your auth.token here
    Content-Length: 0
    
    

    Response:

    
    [1,5,15,30,60]
    
    

    GET BASE_URL/tasks/types

    get array of accepted task types. Currently ["Http","Ping","Port"] for all operations, ["Database","Snmp"] - read only, "Counter" - in development

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • 
    GET BASE_URL/tasks/types HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your auth.token here
    Content-Length: 0
    
    

    Response:

    
    ["Counter","DNSBL","Database","Http","Ping","Port","Snmp"]
    
    

    GET BASE_URL/tasks/{id:guid}

    get task by id (GUID).

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • 
    GET BASE_URL/tasks/428cad60-2f47-e511-80c3-0003ff730224 HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your auth.token here
    Content-Length: 0
    
    

    Response:

    Task data

    GET BASE_URL/tasks

    get all tasks or filtered via query string parameters.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Query string parameters (all are optional):

    • info - specify what additional task information to return.
      • subscriptions - return subscriptions (for alerts and reports) for task
      • stats - return statistics (daily, monthly, yearly, total) for task
      • results - return results for interval (sdtu, edtu) from query string.
        if (sdtu, edtu) is not provided - return last result for task.
        Results are returned as array in results field of task.
      Several values could be specified using comma. For ex.: info=stats,subscriptions.
      Also you could use int value for each flag:
      • subscriptions bit 0001 - 1
      • stats bit 0010 - 2
      • results bit 0100 - 4
      In such case info=stats,subscriptions,results is same to info=7(0111).
    • ids - return only tasks with ids specified in ids url parameter.
      If you search by one id - see method GET BASE_URL/tasks/{id:guid}
      For specifying many ids use this example: ?ids=guid1&ids=guid2&ids=guid3.
    • excludeIds - exclude ids specified in ids array and return other tasks. ?excludeIds=true
    • taskType - task type to search for. ?taskType=Http (case sensitive)
    • taskTypes - array of task type to search for. ?taskTypes=Http&taskTypes=Ping (case sensitive)
    • excludeTaskTypes - exclude tasks with taskType and taskTypes - return other tasks. ?excludeTaskTypes=true.
    • status - Enabled or Disabled. ?excludeTaskTypes=Disabled - return only disabled tasks.
    • url - task with specified url to search for. Url should be url
    • urls - task with specified urls to search for. Url in urls array should be url encoded.
    • urlSearchLike - specified only with url parameter (not urls). If true like search will be performed.
      ?url=mysite&urlSearchLike=true - will return tasks with url: http://www.mysite.com/some/file.js, http://www.mysite.com and other which contains mysite.
    • excludeUrls - exclude tasks with specified urls (in url and urls parameter).
    • name - search task with specified name.
      If name(names) and id(ids) are specified in url query string - search will use OR join for results.
      For ex. ?id=guid1&name=mytask will return tasks with name mytask and task with id guid1.
      Combining name(names) with other filter parameters will result in AND join -
      all returned tasks should contain name as specified in name (names) parameter.
    • names - array of names to search for. ?names=mytask1&names=mytask2
    • nameSearchLike - perform like search for name (could not be used with names). ?name=mytask&nameSearchLike=true
    • excludeNames - exclude tasks with specified name (names).
    • interval - search tasks with specified interval. ?interval=1
    • intervals - search tasks with specified intervals. ?intervals=1&intervals=60
    • excludeIntervals - exclude tasks with specified intervals. ?interval=1&excludeIntervals=true
    • openStat - search for public tasks (with public statistics and event log). ?openStat=true or ?openStat=false
    • lastState - search for up or down tasks. ?lastState=true - up tasks or ?lastState=false - down tasks
    • tags - search for tasks with tags. ?tags=server&tags=mymachine
    • overlimited - search for billing overlimited tasks. ?overlimited=true - tasks with overlimit, ?overlimited=false - without.
    • active - search for active or disabled tasks.
      Task could be disabled by HostTracker system or by user.
      This flag indicates system disablence (due to overlimit, low balance, or other).
      For user disablence see status parameter.
      ?active=true - return only active tasks, ?active=false - return only disabled tasks
    • sdtu - int64, unix timestamp, UTC - number of seconds from 01.01.1970.
      start time = (01.01.1970 00:00:00 + sdtu)
      See edtu and notes bellow.
    • edtu - int64, unix timestamp, UTC - number of seconds from 01.01.1970.
      end time = (01.01.1970 00:00:00 + edtu)
      In query string you need to provide both (sdtu, edtu) for obtaining task results for given period.
      edtu - is timestamp for end of interval. Should be greater than sdtu.
      Note0: (sdtu, edtu) defines interval
      Currently it is only used on quering results - results flag should be set in info parameter.
      Note1: timestamps are in UTC time zone
      Note2: number of queried results should not exceed 10000.
      We calculate number of requested results as:
      (edtu - sdtu) * (# queried tasks) / (Avg interval of queried tasks)
      If this number greater than 10000, the response will be 400: StartEndIntervalIsTooBig

    Response:

    200 OK:

    • Accept: application/json or Content-Type: application/json
      
          TODO
          
          

      Note0: if results are requested with info=results and (sdtu, edtu)
      response will contain array of results: [result1, result2, ...]
      Results are task type dependent.
      For sure they have:
      timestamp - int64, unix timestamp, UTC
      eventNumber - int32, sequential number of task check

    • Accept: text/xml or Content-Type: text/xml
      
          TODO
          
          
      • 401 AccessDenied - authorization header is not provided
      • 401 WrongTicket - wrong token provided in header
      • 401 TicketExpired - specified ticket expired

    Examples:

    • Request for all tasks in json format:
      
      GET BASE_URL/tasks HTTP/1.1
      User-Agent: Fiddler
      Accept: application/json
      Host: www.host-tracker.com
      Authorization: bearer 3DD135...5EE510417
      Content-Length: 0
      
      
    • TODO

    POST BASE_URL/tasks/http

    create http task.

    Request headers:

    • Authorization: bearer your auth.token here (how to get token see user operations)
    • Content-Type specifies request content format: application/x-www-form-urlencoded, application/json, text/xml.
    • Accept(or if not set - Content-Type) specifies response content format: application/json, text/xml.

    Request body in json format:

    Xml:
    
    {
      //fields specific for http task
      "url": "<your url. Required>",
      "httpMethod": "<Get, Post or Head. Optional - default is Get>",
      "userAgent": "<user agent for request. Optional.>",
      "referer": "<referrer for request. Optional>",
      "acceptHeader": "<accept header. Optional>",
      "followRedirect": <bool: true or false(default). Optional>,
      "treat300AsError": <bool: true or false(default). Optional. If set, followRedirect is ignored>,
        //if true then redirects will be followed.
      "checkDnsbl": <bool: true or false(default). Optional>,
        /*if true then domain will be checked agains DNS black lists and if it is there,
         notification will be send according to subscriptions.*/

      "checkDomainExpiration": <bool: true or false(default). Optional>,
        /*if true then domain expiration date will be monitored.
         Notifications will be sent 30,7 and 1 day before expiration and every day after it according to subscriptions.*/

        /*Note: expiration monitoring will be created only for valid domain (not IP)*/
      "checkCertificateExpiration": <bool: true or false(default). Optional>,
        /*if true then certificate expiration date of provided endpoint will be monitored.
         Notifications will be sent 30,7 and 1 day before expiration and every day after it according to subscriptions.
         Available only for https endpoints and ignored in other cases.*/

      "timeout": <int: ms for site response before fail. Optional>,
      "keywords":
        [
          "keyword1", "keyword2", ...
        ],
         //keywords to search for in response body. Optional
      "keywordMode": "<PresentAny, PresentAll, ReverseAny, ReverseAll, ReverseWithResult. Optional>",
       /*
      Keyword mode specifies how to use keywords:
    • PresentAny - task will be Ok if any of specified keywords are present in response
    • PresentAll - task will be Ok if all specified keywords are present in response
    • ReverseAny - task will be Ok if all specified keywords are absent in response
    • ReverseAll - task will be Ok if any of specified keywords are absent in response
    • ReverseWithResult - task will be Ok if all specified keywords are absent in response.
      Fail contains rest of response line where first keyword was detected.
      This text is sent in alerts. Usefull, for example, in scenarios when your response contains
      some status information - each line has error status and object with this status.
      In such case you will retrieve on email, SMS, ... information of objects with fail status.
      WARN. In this mode only first 100 characters of every response line will be analyzed.
      */

      "userName": "<userName for credentials to your resourse. Optional>",
      "password": "<password for credentials to your resourse. Optional>",
      "postParameters":"paramKey1=paramValue1\r\nparamKey2=paramValue2\r\n...", /*postParameters are Optional and specified with Post httpMethod*/
      //fields same for all task types
      "interval": <int: 1(default),5,15,30,60 - interval of monitoring. Optional>,
      "enabled": <bool: true(default) or false. Optional>,
      "fullLog": <bool: true or false(default). Optional>,
      "openStat": <bool: true(default) or false. Optional>,
      "name": "<your task name here. Optional>",
      "tags":
        [
          "tag1", "tag2", ...
        ], /*tags are Optional and can be used for task filtering*/
      "agentPools":
        [
          "poolId1", "poolId2", ...
        ], /*agentPools is Optional. It specifies monitoring locations for task. Default is taken from profile.
    Requirements if specified: 7 agents in all pools. If condition is not met error SelectMoreAgents with details will arise. */

      "subscriptions":
         [
            <subscription1>, <subscription2>, ...
         ]
      /*
        subscriptions are Optional. You could subscribe contacts for alerts and reports about this task using this field.
        In every subscription structure in array you should not specify taskIds. Specifying contactIds will create subscriptions only for this contacts.
        If you do not specify contactIds then all your existing confirmed contacts will be subscribed.
        For details of subscription structure see subscription service and examples.
      */

    }

    Request body in xml format:

    Xml:
    
    <HttpTaskEditableData>
      <!-- specific for http task fields -->
      <url>your url. Required</url>
      <httpMethod>Get, Post or Head. Optional - default is Get</httpMethod>
      <userAgent>user agent for request. Optional.</userAgent>
      <referer>referrer for request. Optional</referer>
      <acceptHeader>accept header. Optional</acceptHeader>
      <followRedirect>bool: true or false(default). Optional</followRedirect>
      <treat300AsError>bool: true or false(default). Optional. If set, followRedirect is ignored</treat300AsError>
        <!--if true then redirects will be followed.-->
      <checkDnsbl>bool: true or false(default). Optional</checkDnsbl>
        <!--if true then domain will be checked agains DNS black lists and if it is there,
         notification will be send according to subscriptions.-->

      <checkDomainExpiration>bool: true or false(default). Optional</checkDomainExpiration>
        <!--if true then domain expiration date will be monitored.
         Notifications will be sent 30,7 and 1 day before expiration and every day after it according to subscriptions.-->

        <!--Note: expiration monitoring will be created only for valid domain (not IP) -->
      <checkCertificateExpiration>bool: true or false(default). Optional</checkCertificateExpiration>
        <!--if true then certificate expiration date of provided endpoint will be monitored.
         Notifications will be sent 30,7 and 1 day before expiration and every day after it according to subscriptions.
         Available only for https endpoints and ignored in other cases.-->

      <keywords>
        <string>keyword1</string>
        <string>keyword2</string>
        ...
      </keywords>
      <!--keywords to search for in response body. Optional-->
      <keywordMode>PresentAny, PresentAll, ReverseAny, ReverseAll, ReverseWithResult. Optional</keywordMode>
       <!--
      Keyword mode specifies how to use keywords:
    • PresentAny - task will be Ok if any of specified keywords are present in response
    • PresentAll - task will be Ok if all specified keywords are present in response
    • ReverseAny - task will be Ok if all specified keywords are absent in response
    • ReverseAll - task will be Ok if any of specified keywords are absent in response
    • ReverseWithResult - task will be Ok if all specified keywords are absent in response.
      Fail contains rest of response line where first keyword was detected.
      This text is sent in alerts. Usefull, for example, in scenarios when your response contains
      some status information - each line has error status and object with this status.
      In such case you will retrieve on email, SMS, ... information of objects with fail status.
      WARN. In this mode only first 100 characters of every response line will be analyzed.
      -->

      <userName>userName for credentials to your resourse. Optional</userName>
      <password>password for credentials to your resourse. Optional</password>
      <postParameters>param1=test\r\nparam2=test\r\nuser=public</postParameters> <!--postParameters are Optional and specified with Post httpMethod-->
      <interval>1(default),5,15,30,60 - interval of monitoring. Optional</interval>
      <enabled>bool: true(default) or false. Optional</enabled>
      <fullLog>bool: true or false(default). Optional</fullLog>
      <openStat>bool: true(default) or false. Optional</openStat>
      <name>your task name here. Optional</name>
      <tags>
        <string>tag1</string>
        <string>tag2</string>
        ...
      </tags><!--tags are Optional and can be used for task filtering-->
      <agentPools>
        <string>poolId1</string>
        <string>poolId2</string>
        ...
      </agentPools><!--agentPools are Optional. It specifies monitoring locations for task. Default is taken from profile.
    Requirements if specified: 7 agents in all pools. If condition is not met error SelectMoreAgents with details will arise. -->

      <subscriptions>
        <Subscription>subscription1</Subscription>
        <Subscription>subscription2</Subscription>
        ...
      </subscriptions>
      <!--
        subscriptions are Optional. You could subscribe contacts for alerts and reports about this task using this field.
        In every subscription structure in array you should not specify taskIds. Specifying contactIds will create subscriptions only for this contacts.
        If you do not specify contactIds then all your existing confirmed contacts will be subscribed.
        For details of subscription structure see subscription service and examples.
      -->

    </HttpTaskEditableData>

    Response:

    201 Created:

    • Content-Type: application/json
      Json:
      
      {
      "id":"ef10cd12-93f9-e311-bec5-dc85de1f0bc2",
      "url":"http://www.myprivateresource6.com",
      "rawUrl":"http://www.myprivateresource6.com",
      "name":"testing web api on private resourse",
      "creationTime":"2014-06-21T22:26:23.6780166Z",
      "taskType":"Http",
      "enabled":true,
      "interval":1,
      "upFromTime":"2014-06-21T22:26:23.6780166Z",
      "lastState":true,
      "lastStateChangeTime":"2014-06-21T22:26:23.6780166Z",
      "openStatEnabled":false,
      "fullLogEnabled":false,
      "disablenceReason":null,
      "disablenceTime":null,
      "holdResults":true,
      "agentStat":false,
      "billingOverlimits":[],
      "tags":["privateResource","testApi"],
      "subscriptions":
      [
      {
      "alertTypes":["Up"],
      "reportTypes":null,
      "taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],
      "contactIds":["4cedf037-d1d9-e311-bebc-dc85de1f0bc2"]
      },
      {
      "alertTypes":["Down"],
      "reportTypes":null,
      "taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],
      "contactIds":["4cedf037-d1d9-e311-bebc-dc85de1f0bc2"]
      },
      {
      "alertTypes":["Up"],
      "reportTypes":null,
      "taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],
      "contactIds":["afc5e2c8-3d42-e311-bea5-3085a980e898"]
      },
      {
      "alertTypes":["Down"],
      "reportTypes":null,
      "taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],
      "contactIds":["afc5e2c8-3d42-e311-bea5-3085a980e898"]
      },
      {
      "alertTypes":["Up"],"reportTypes":null,
      "taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],"contactIds":["e48409ff-bbf7-e311-bec5-dc85de1f0bc2"]},
      {"alertTypes":["Down"],"reportTypes":null,"taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],"contactIds":["e48409ff-bbf7-e311-bec5-dc85de1f0bc2"]},
      {"alertTypes":null,"reportTypes":["Monthly"],"taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],"contactIds":["4cedf037-d1d9-e311-bebc-dc85de1f0bc2"]},
      {"alertTypes":null,"reportTypes":["Daily"],"taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],"contactIds":["afc5e2c8-3d42-e311-bea5-3085a980e898"]},
      {"alertTypes":null,"reportTypes":["Monthly"],"taskIds":["ef10cd12-93f9-e311-bec5-dc85de1f0bc2"],"contactIds":["afc5e2c8-3d42-e311-bea5-3085a980e898"]}
      ],
      "stats":null,
      "agentPools":["asia","westeurope"],
      "deleted":false,
      "httpMethod":"Post",
      "userAgent":"mybot",
      "referer":"http://www.google.com",
      "acceptHeader":"application/json",
      "keywords":["error","wrong"],
      "keywordMode":"ReverseAny",
      "maxResponsePageSize":2097152,
      "timeout":40000,
      "userName":"public",
      "password":"xxx",
      "postParameters":"param1=test\r\nparam2=test\r\nuser=public"
      }
    • If requested text/xml as response forma
      • 401 AccessDenied - authorization header is not provided
      • 401 WrongTicket - wrong token provided in header
      • 401 TicketExpired - specified ticket expired

    Examples:

  • Content-Type: application/json
  • Json:
    
    POST BASE_URL/tasks/http HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Content-Length: 823
    Authorization: bearer ECFB190B3...653C1E78
    
    {
    "url": "http://www.myprivateresource.com",
    "httpMethod": "Post",
    "userAgent": "mybot",
    "referer": "http://www.google.com",
    "acceptHeader": "application/json",
    "keywords": ["error", "wrong"],
    "keywordMode": "ReverseAny",
    "timeout": 10000,
    "userName": "public",
    "password": "xxx",
    "postParameters":"param1=test\r\nparam2=test\r\nuser=public",
    "interval": 1,
    "enabled": true,
    "fullLog": false,
    "openStat": false,
    "name": "testing web api on private resourse",
    "tags": ["testApi", "privateResource"],
    "agentPools": ["asia", "westeurope"],
    "subscriptions":
    [
        {"alertTypes": ["Up", "Down"]},
        {"reportTypes": ["Daily"], contactIds:["AFC5E2C8-3D42-E311-BEA5-3085A980E898"]},
        {"reportTypes": ["Monthly"]}
    ]
    }
    
    
  • Content-Type: text/xml
  • Xml:
    
    POST BASE_URL/tasks/http HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Accept: text/xml
    Host: www.host-tracker.com
    Content-Length: 1546
    Authorization: bearer ECFB...1E78

    <HttpTaskEditableData>
      <url>http://www.myprivateresource5.com</url>
      <httpMethod>Post</httpMethod>
      <userAgent>mybot</userAgent>
      <referer>http://www.google.com</referer>
      <acceptHeader>application/json</acceptHeader>
      <keywords>
        <string>error</string>
        <string>wrong</string>
      </keywords>
      <keywordMode>ReverseAny</keywordMode>
      <userName>public</userName>
      <password>xxx</password>
      <postParameters>param1=test\r\nparam2=test\r\nuser=public</postParameters>
      <interval>1</interval>
      <enabled>true</enabled>
      <fullLog>false</fullLog>
      <openStat>false</openStat>
      <name>testing web api on private resourse</name>
      <tags>
        <string>testApi</string>
        <string>privateResource</string>
      </tags>
      <agentPools>
        <string>asia</string>
        <string>westeurope</string>
      </agentPools>
      <subscriptions>
        <Subscription>
          <alertTypes>
            <string>Up</string>
            <string>Down</string>
          </alertTypes>
        </Subscription>
        <Subscription>
          <reportTypes>
            <string>Daily</string>
          </reportTypes>
          <contactIds>
            <guid>AFC5E2C8-3D42-E311-BEA5-3085A980E898</guid>
          </contactIds>
        </Subscription>
        <Subscription>
          <reportTypes>
            <string>Monthly</string>
          </reportTypes>
        </Subscription>
      </subscriptions>
    </HttpTaskEditableData>

    POST BASE_URL/tasks/ping

    create ping task.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Parameters:

    • id - should only be specified in UpdateTasks method. Ignored in other methods.
    • enabled - if true task will be created in enabled state
    • interval - interval in minutes. See available intervals in GetTaskIntervals method
    • name - task name
    • fullLog - enable or disable full logging for task
    • openStat - is statistics and task results are public (available for public access)
    • tags - array of tags for task
    • agentPools - monitoring agents from which task should be monitored. Default is taken from profile.
      Requirements if specified: 7 agents in all pools. If condition is not met error SelectMoreAgents with details will arise.
    • subscriptions - array of Subscription. See subscription service for details
    • host - IP or domain name of target host

  • Content-Type: application/json
  • Json:
    
    POST BASE_URL/tasks/ping HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Content-Length: 430
    Authorization: bearer your auth.token here
    
    {
    "interval": 1,
    "enabled": true,
    "fullLog": false,
    "openStat": false,
    "name": "testing web api on private resourse",
    "tags": ["testApi", "privateResource"],
    "agentPools": [],
    "subscriptions":
    [
    {"alertTypes": ["Up", "Down"]},
    {"reportTypes": ["Daily"], contactIds:[]},
    {"reportTypes": ["Monthly"]}
    ],
    "host":"91.197.255.62"
    }
    
    
  • Content-Type: text/xml
  • Xml:
    
    POST BASE_URL/tasks/ping HTTP/1.1 
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Content-Length: 773
    Authorization: bearer your auth.token here
    <PingTaskEditableData>
      <host>172.16.254.1</host>
      <interval>1</interval>
      <enabled>true</enabled>
      <fullLog>false</fullLog>
      <openStat>false</openStat>
      <name>test2</name>
      <tags>
        <string>tag1</string>
        <string>tag2</string>
      </tags>
      <agentPools>
      </agentPools>
      <subscriptions>
        <Subscription>
          <alertTypes>
            <string>Up</string>
            <string>Down</string>
          </alertTypes>
        </Subscription>
        <Subscription>
          <reportTypes>
            <string>Daily</string>
          </reportTypes>
          <contactIds>
          </contactIds>
        </Subscription>
        <Subscription>
          <reportTypes>
            <string>Monthly</string>
          </reportTypes>
        </Subscription>
      </subscriptions>
    </PingTaskEditableData>

    Response:

    • 201 Created
    • 401 AccessDenied - authorization header is not provided
    • 401 WrongTicket - wrong token provided in header
    • 401 TicketExpired - specified ticket expired

    POST BASE_URL/tasks/port

    create port task.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Parameters:

    • id - should only be specified in UpdateTasks method. Ignored in other methods.
    • enabled - if true task will be created in enabled state
    • interval - interval in minutes. See available intervals in GetTaskIntervals method
    • name - task name
    • fullLog - enable or disable full logging for task
    • openStat - is statistics and task results are public (available for public access)
    • tags - array of tags for task
    • agentPools - monitoring agents from which task should be monitored. Default is taken from profile.
      Requirements if specified: 7 agents in all pools. If condition is not met error SelectMoreAgents with details will arise.
    • host - IP or domain name of target host
    • port - port on the host

  • Content-Type: application/json
  • Json:
    
    POST BASE_URL/tasks/port HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your auth.token here
    Content-Length: 400
    
    {
    "host":"my.some.site.com",
    "port":"123",
    "interval": 1,
    "enabled": true,
    "fullLog": false,
    "openStat": false,
    "name": "porttest2",
    "tags": ["tag1"],
    "agentPools": [],
    "subscriptions":
    [
        {"alertTypes": ["Up", "Down"]},
        {"reportTypes": ["Daily"], contactIds:["AFC5E2C8-3D42-E311-BEA5-3085A980E898"]},
        {"reportTypes": ["Monthly"]}
    ]
    }
    
    
  • Content-Type: text/xml
  • Xml:
    
    POST BASE_URL/tasks/port HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer your auth.token here
    Content-Length: 857

    <PortTaskEditableData >
      <host>somemy.site.com</host>
      <port>123</port>
      <interval>1</interval>
      <enabled>true</enabled>
      <fullLog>false</fullLog>
      <openStat>false</openStat>
      <name>test2</name>
      <tags>
        <string>tag1</string>
        <string>tag2</string>
      </tags>
      <agentPools>
      </agentPools>
      <subscriptions>
        <Subscription>
          <alertTypes>
            <string>Up</string>
            <string>Down</string>
          </alertTypes>
        </Subscription>
        <Subscription>
          <reportTypes>
            <string>Daily</string>
          </reportTypes>
          <contactIds>
            <guid>AFC5E2C8-3D42-E311-BEA5-3085A980E898</guid>
          </contactIds>
        </Subscription>
        <Subscription>
          <reportTypes>
            <string>Monthly</string>
          </reportTypes>
        </Subscription>
      </subscriptions>
    </PortTaskEditableData >

    Response:

    • 201 Created
    • 401 AccessDenied - authorization header is not provided
    • 401 WrongTicket - wrong token provided in header
    • 401 TicketExpired - specified ticket expired

    PUT BASE_URL/tasks

    - update general task parameters.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Response:

    • 200 - OK
    • WrongInterval - interval for task is not in range of available regular task intervals (see GetTaskIntervals method)
    • WrongEditableTaskDataType - type of task in db and type of input editable data is not the same.
    • DeniedAccessToMonitoringAgents - you could not set monitoring points for task by default. Contact us if you want to do this.
    • BadIP - bad ip specified in host or url
    • WrongUrl - url is wrong
    • UrlInBlackList - url is in black list
    • WrongHttpMethod - http method is wrong (see GetTask for allowed methods)
    • WrongKeywordMode - http task keyword mode is wrong (see GetTask for allowed modes)
    • WrongPort - port of port task is wrong
    • WrongTaskType - task type is wrong (see GetTaskTypes for allowed types)
    • WrongTaskStatus - allowed enabled and disabled values
    • SimilarExists - some of your tasks have same url or host or host:port specified
    • NoIdInTaskData - no id specified in task editable data
    • EmptyTaskData - array of editable task data is empty

    POST BASE_URL/tasks/port

    create port task.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Content-Type: application/json
  • Json:
    
    PUT BASE_URL/tasks/http/guid of task HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Content-Length: 659
    Authorization: bearer your auth.token here
    
    {
    "url": "http://www.myprivateresource.com",
    "httpMethod": "Post",
    "userAgent": "mybot",
    "referer": "http://www.google.com",
    "acceptHeader": "application/json",
    "keywords": ["error", "wrong"],
    "keywordMode": "ReverseAny",
    "userName": "public",
    "timeout": 5000,
    "password": "xxx",
    "postParameters":"param1=test\r\nparam2=test\r\nuser=public",
    "interval": 1,
    "enabled": true,
    "fullLog": false,
    "openStat": false,
    "name": "test33",
    "tags": [],
    "agentPools": [],
    "subscriptions":
    [
        {"alertTypes": ["Up", "Down"]},
        {"reportTypes": ["Daily"], contactIds:[]},
        {"reportTypes": ["Monthly"]}
    ]
    }
    
    
  • Content-Type: text/xml
  • Xml:
    
    PUT BASE_URL/tasks/http/guid of task HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Content-Length: 1190
    Authorization: bearer your auth.token here

    <HttpTaskEditableData>
      <url>http://www.myprivateresource6.com</url>
      <httpMethod>Post</httpMethod>
      <userAgent>mybot</userAgent>
      <referer>http://www.google.com</referer>
      <acceptHeader>application/json</acceptHeader>
      <keywords>
        <string>error</string>
        <string>wrong</string>
      </keywords>
      <keywordMode>ReverseAny</keywordMode>
      <userName>public</userName>
      <password>xxx</password>
      <postParameters>param1=test\r\nparam2=test\r\nuser=public</postParameters>
      <interval>1</interval>
      <enabled>true</enabled>
      <fullLog>false</fullLog>
      <openStat>false</openStat>
      <name>testing web api on private resourse</name>
      <tags>
      </tags>
      <agentPools>
      </agentPools>
      <subscriptions>
        <Subscription>
          <alertTypes>
          <string>Up</string>
          <string>Down</string>
          </alertTypes>
        </Subscription>
        <Subscription>
          <reportTypes>
          <string>Daily</string>
          </reportTypes>
          <contactIds>
          </contactIds>
        </Subscription>
        <Subscription>
          <reportTypes>
          <string>Monthly</string>
          </reportTypes>
        </Subscription>
      </subscriptions>
    </HttpTaskEditableData>

    Response:

    • 200 - OK
    • WrongInterval - interval for task is not in range of available regular task intervals (see GetTaskIntervals method)
    • WrongEditableTaskDataType - type of task in db and type of input editable data is not the same.
    • DeniedAccessToMonitoringAgents - you could not set monitoring points for task by default. Contact us if you want to do this.
    • BadIP - bad ip specified in host or url
    • WrongUrl - url is wrong
    • UrlInBlackList - url is in black list
    • WrongHttpMethod - http method is wrong (see GetTask for allowed methods)
    • WrongKeywordMode - http task keyword mode is wrong (see GetTask for allowed modes)
    • WrongPort - port of port task is wrong
    • WrongTaskType - task type is wrong (see GetTaskTypes for allowed types)
    • WrongTaskStatus - allowed enabled and disabled values
    • SimilarExists - some of your tasks have same url or host or host:port specified

    PUT BASE_URL/tasks/ping

    update ping task.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Content-Type: application/json
  • Json:
    
    PUT BASE_URL/tasks/ping/guid of task HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Content-Length: 344
    Authorization: bearer your auth.token here
    
    {
    "host":"91.197.255.62"
    "interval": 1,
    "enabled": true,
    "fullLog": false,
    "openStat": false,
    "name": "testing web api on private resourse",
    "tags": ["testApi", "privateResource"],
    "agentPools": [],
    "subscriptions":
    [
    {"alertTypes": ["Up", "Down"]},
    {"reportTypes": ["Daily"], contactIds:[]},
    {"reportTypes": ["Monthly"]}
    ],
    }
    
    
  • Content-Type: text/xml
  • Xml:
    
    PUT BASE_URL/tasks/ping/guid of task HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Content-Length: 638
    Authorization: bearer your auth.token here

    <PingTaskEditableData>
      <host>172.16.254.2</host>
      <interval>1</interval>
      <enabled>true</enabled>
      <fullLog>false</fullLog>
      <openStat>false</openStat>
      <name>test2</name>
      <tags>
        <string>tag1</string>
        <string>tag2</string>
      </tags>
      <agentPools>
      </agentPools>
      <subscriptions>
        <Subscription>
          <alertTypes>
          <string>Up</string>
          <string>Down</string>
          </alertTypes>
        </Subscription>
        <Subscription>
          <reportTypes>
          <string>Daily</string>
          </reportTypes>
          <contactIds>
          </contactIds>
        </Subscription>
        <Subscription>
          <reportTypes>
          <string>Monthly</string>
          </reportTypes>
        </Subscription>
      </subscriptions>
    </PingTaskEditableData>

    Response:

    • 200 - OK
    • WrongInterval - interval for task is not in range of available regular task intervals (see GetTaskIntervals method)
    • WrongEditableTaskDataType - type of task in db and type of input editable data is not the same.
    • DeniedAccessToMonitoringAgents - you could not set monitoring points for task by default. Contact us if you want to do this.
    • BadIP - bad ip specified in host or url
    • WrongUrl - url is wrong
    • UrlInBlackList - url is in black list
    • WrongHttpMethod - http method is wrong (see GetTask for allowed methods)
    • WrongKeywordMode - http task keyword mode is wrong (see GetTask for allowed modes)
    • WrongPort - port of port task is wrong
    • WrongTaskType - task type is wrong (see GetTaskTypes for allowed types)
    • WrongTaskStatus - allowed enabled and disabled values
    • SimilarExists - some of your tasks have same url or host or host:port specified

    PUT BASE_URL/tasks/port

    update port task.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Content-Type: application/json
  • Json:
    
    PUT BASE_URL/tasks/port/guid of task HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Content-Length: 399
    Authorization: bearer your auth.token here
    
    {
    "host":"my.some.site.com",
    "port":"123",
    "interval": 1,
    "enabled": true,
    "fullLog": false,
    "openStat": false,
    "name": "porttest2",
    "tags": ["tag1"],
    "agentPools": [],
    "subscriptions":
    [
        {"alertTypes": ["Up", "Down"]},
        {"reportTypes": ["Daily"], contactIds:["AFC5E2C8-3D42-E311-BEA5-3085A980E898"]},
        {"reportTypes": ["Monthly"]}
    ]
    }
    
    
  • Content-Type: text/xml
  • Xml:
    
    PUT BASE_URL/tasks/port/guid of task HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Content-Length: 857
    Authorization: bearer your auth.token here

    <PortTaskEditableData>
      <host>somemy.site.com</host>
      <port>123</port>
      <interval>1</interval>
      <enabled>true</enabled>
      <fullLog>false</fullLog>
      <openStat>false</openStat>
      <name>test2</name>
      <tags>
        <string>tag1</string>
        <string>tag2</string>
      </tags>
      <agentPools>
      </agentPools>
      <subscriptions>
        <Subscription>
          <alertTypes>
            <string>Up</string>
            <string>Down</string>
          </alertTypes>
        </Subscription>
        <Subscription>
          <reportTypes>
            <string>Daily</string>
          </reportTypes
          <contactIds>
            <guid>AFC5E2C8-3D42-E311-BEA5-3085A980E898</guid>
          </contactIds>
        </Subscription>
        <Subscription>
          <reportTypes>
            <string>Monthly</string>
          </reportTypes>
        </Subscription>
      </subscriptions>
    </PortTaskEditableData>

    Response:

    • 200 - OK
    • WrongInterval - interval for task is not in range of available regular task intervals (see GetTaskIntervals method)
    • WrongEditableTaskDataType - type of task in db and type of input editable data is not the same.
    • DeniedAccessToMonitoringAgents - you could not set monitoring points for task by default. Contact us if you want to do this.
    • BadIP - bad ip specified in host or url
    • WrongUrl - url is wrong
    • UrlInBlackList - url is in black list
    • WrongHttpMethod - http method is wrong (see GetTask for allowed methods)
    • WrongKeywordMode - http task keyword mode is wrong (see GetTask for allowed modes)
    • WrongPort - port of port task is wrong
    • WrongTaskType - task type is wrong (see GetTaskTypes for allowed types)
    • WrongTaskStatus - allowed enabled and disabled values
    • SimilarExists - some of your tasks have same url or host or host:port specified

    DELETE BASE_URL/tasks/{id:guid}

    delete task specified by id (GUID).

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • 
    DELETE BASE_URL/tasks/guid of task HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer your auth.token here
    Content-Length: 0
    
    

    Response:

    TODO

    DELETE BASE_URL/tasks

    delete tasks by filter specified in query string.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Query string parameters (all are optional):

    • info - specify what additional task information to return.
      • subscriptions - return subscriptions (for alerts and reports) for task
      • stats - return statistics (daily, monthly, yearly, total) for task
      • results - return results for interval (sdtu, edtu) from query string.
        if (sdtu, edtu) is not provided - return last result for task.
        Results are returned as array in results field of task.
      Several values could be specified using comma. For ex.: info=stats,subscriptions.
      Also you could use int value for each flag:
      • subscriptions bit 0001 - 1
      • stats bit 0010 - 2
      • results bit 0100 - 4
      In such case info=stats,subscriptions,results is same to info=7(0111).
    • ids - return only tasks with ids specified in ids url parameter.
      If you search by one id - see method GET BASE_URL/tasks/{id:guid}
      For specifying many ids use this example: ?ids=guid1&ids=guid2&ids=guid3.
    • excludeIds - exclude ids specified in ids array and return other tasks. ?excludeIds=true
    • taskType - task type to search for. ?taskType=Http (case sensitive)
    • taskTypes - array of task type to search for. ?taskTypes=Http&taskTypes=Ping (case sensitive)
    • excludeTaskTypes - exclude tasks with taskType and taskTypes - return other tasks. ?excludeTaskTypes=true.
    • status - Enabled or Disabled. ?excludeTaskTypes=Disabled - return only disabled tasks.
    • url - task with specified url to search for. Url should be url
    • urls - task with specified urls to search for. Url in urls array should be url encoded.
    • urlSearchLike - specified only with url parameter (not urls). If true like search will be performed.
      ?url=mysite&urlSearchLike=true - will return tasks with url: http://www.mysite.com/some/file.js, http://www.mysite.com and other which contains mysite.
    • excludeUrls - exclude tasks with specified urls (in url and urls parameter).
    • name - search task with specified name.
      If name(names) and id(ids) are specified in url query string - search will use OR join for results.
      For ex. ?id=guid1&name=mytask will return tasks with name mytask and task with id guid1.
      Combining name(names) with other filter parameters will result in AND join -
      all returned tasks should contain name as specified in name (names) parameter.
    • names - array of names to search for. ?names=mytask1&names=mytask2
    • nameSearchLike - perform like search for name (could not be used with names). ?name=mytask&nameSearchLike=true
    • excludeNames - exclude tasks with specified name (names).
    • interval - search tasks with specified interval. ?interval=1
    • intervals - search tasks with specified intervals. ?intervals=1&intervals=60
    • excludeIntervals - exclude tasks with specified intervals. ?interval=1&excludeIntervals=true
    • openStat - search for public tasks (with public statistics and event log). ?openStat=true or ?openStat=false
    • lastState - search for up or down tasks. ?lastState=true - up tasks or ?lastState=false - down tasks
    • tags - search for tasks with tags. ?tags=server&tags=mymachine
    • overlimited - search for billing overlimited tasks. ?overlimited=true - tasks with overlimit, ?overlimited=false - without.
    • active - search for active or disabled tasks.
      Task could be disabled by HostTracker system or by user.
      This flag indicates system disablence (due to overlimit, low balance, or other).
      For user disablence see status parameter.
      ?active=true - return only active tasks, ?active=false - return only disabled tasks
    • sdtu - int64, unix timestamp, UTC - number of seconds from 01.01.1970.
      start time = (01.01.1970 00:00:00 + sdtu)
      See edtu and notes bellow.
    • edtu - int64, unix timestamp, UTC - number of seconds from 01.01.1970.
      end time = (01.01.1970 00:00:00 + edtu)
      In query string you need to provide both (sdtu, edtu) for obtaining task results for given period.
      edtu - is timestamp for end of interval. Should be greater than sdtu.
      Note0: (sdtu, edtu) defines interval
      Currently it is only used on quering results - results flag should be set in info parameter.
      Note1: timestamps are in UTC time zone
      Note2: number of queried results should not exceed 10000.
      We calculate number of requested results as:
      (edtu - sdtu) * (# queried tasks) / (Avg interval of queried tasks)
      If this number greater than 10000, the response will be 400: StartEndIntervalIsTooBig
    
    DELETE BASE_URL/tasks?tag=tag1&?taskTypes=Http HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Content-Length: 0
    Authorization: bearer your auth.token here
    
    

    Response:

    TODO

    POST BASE_URL/tasks/$batch

    perform batched tasks creation and/or update.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Response:

    TODO

    Api REST contact operations

    GET BASE_URL/contacts/types

    get array of accepted contact types.

    Request. GET BASE_URL/contacts/types

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Response. GET BASE_URL/contacts/types

  • Content-Type: application/json
  • 
    ["Email","IM","SMS","VoiceCall"]
    
    
  • Content-Type: text/xml
  • 
    <ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <string>Email</string>
       <string>IM</string>
       <string>SMS</string>
       <string>VoiceCall</string>
    </ArrayOfString>

    GET BASE_URL/contacts/delays

    get array of accepted contact alert delays in minutes.

    Request. GET BASE_URL/contacts/types

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Response. GET BASE_URL/contacts/delays

  • Content-Type: application/json
  • 
    [0,5,15,30,60,180,720]
    
    
  • Content-Type: text/xml
  • 
    <ArrayOfInt xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <int>0</int>
       <int>5</int>
       <int>15</int>
       <int>30</int>
       <int>60</int>
       <int>180</int>
       <int>720</int>
    </ArrayOfInt>

    GET /contacts/sms/gateways

    get array of accepted sms gateways.

    Request. GET BASE_URL/contacts/sms/gateways

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Response. GET BASE_URL/contacts/sms/gateways

  • Content-Type: application/json
  • Json:
    
    ["clickatell","clickatella","infobip","skype","twiliosms"]
    
    
  • Content-Type: text/xml
  • 
    <ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <string>clickatell</string>
       <string>clickatella</string>
       <string>infobip</string>
       <string>skype</string>
       <string>twiliosms</string>
    </ArrayOfString>

    GET BASE_URL/contacts

    get all contacts, possible filltered by url query str

    Request. GET BASE_URL/contacts

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.

  • Optional filters(via URL,URL filter keywords are case sensitive!):

  • acceptBillingNotifications - True - search for contacts which accepts billing notifications, False - search only for contacts which does not accept billing notifications, Null - search both
  • 
    GET BASE_URL/contacts?acceptBillingNotifications=True HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
    
    
  • address - search for contacts with specified address.
  • 
    GET BASE_URL/contacts?address=test@mail.com HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
    
    
  • addresses - search for contacts with specified addresses
  • 
    GET BASE_URL/contacts?addresses=test@mail.com&addresses=
    1122334455 HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
    
    
  • contactType - search for specified contact type(SMS, Email, IM, VoiceCall).
  • 
    GET BASE_URL/contacts?contactType=SMS HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
    
    
  • confirmed - True - search for confirmed only, False - search only for not confirmed, null - search both.
  • 
    GET BASE_URL/contacts?confirmed=True HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
    
    
  • excludeAddresses - search for contacts with not specified addresses(not email)
  • 
    GET BASE_URL/contacts?addresses=3333333334&addresses=222222221&addresses="gord_den+5@gmail.com"&excludeAddresses=True HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
    
    
  • excludeContactTypes - if true - exclude specified contact types
  • 
    
    
    
  • excludeIds - if true then exclude specified ids
  • 
    
    
    
  • ids - search contacts by ids
  • 
    GET BASE_URL/contacts?ids=092a2bc9-58d1-e411-80c3
    -00155d36955e&ids=695dc35a-59d1-e411-80c3-00155d36955e HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
    
    
  • overlimited - True - search for overlimited only, False - search only for not overlimited, Null - search both
  • 
    GET BASE_URL/contacts?overlimited=False HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
    
    

    Response. GET BASE_URL/contacts

    contact data

  • Content-Type: application/json
  • Json:
    
    {
    "id":"Contact id",
    "address":"Contact address",
    "confirmed":"True or false"
    "contactType":"Type of contact",
    "name":"Name of contact",
    "sendCost":"Cost to send",
    "alertDelay":"Delay of alert",
    "activePeriodStart":"Start of active period",
    "activePeriodEnd":"End of active period",
    "activeDays":"Active days",
    "billingOverlimit":Billing overlimit here,
    "subscriptions":"Subscriptions here",
    "reportFormat":"Format of report",
    "sendNews":"True or false",
    "sendPressRelease":"True or false",
    "sendBillingNotifications":"True or false"
    }
    
    
  • Content-Type: text/xml
  • Xml:
    
    <ArrayOfContact xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <Contact xsi:type="EmailContact">
         <id>Contact id</id>
         <confirmed>True or false</confirmed>
         <contactType>Type of contact</contactType>
         <name>Name</name>
         <address>Contact address</address>
         <sendCost>Cost to send</sendCost>
         <alertDelay>Delay of alerts</alertDelay>
         <activePeriodStart />
         <activePeriodEnd />
         <billingOverlimit />
         <subscriptions />
         <reportFormat>Format of report</reportFormat>
         <sendNews>True or false</sendNews>
         <sendPressRelease>True or false</sendPressRelease>
         <sendBillingNotifications>True or false</sendBillingNotifications>
       </Contact>
    </ArrayOfContact>

    GET BASE_URL/contacts/{id:guid}

    get contact by id (GUID)

    Request. GET BASE_URL/contacts/{id:guid}

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • 
    GET BASE_URL/contacts/092a2bc9-58d1-e411-80c3-00155d36955e HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Content-Length: 0
    Authorization: bearer
    
    

    GET BASE_URL/contacts/{id:guid}

    Contact data

    POST BASE_URL/contacts/email

    create email contact

    Request. POST BASE_URL/contacts/email

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Parameters:

    • id - contact id (GUID) should be specified only in UpdateContacts operation. For other method should be null (not set).
    • name - user provided contact name
    • address - contact address
    • alertDelay - alert sending delay in minutes. See GetAlertDelays method for available values
    • activePeriodStart - string in format hh:mm (or null if contact is active for all time), specify start of contact daily activity period. Should be specified with activePeriodEnd. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activePeriodEnd - string in format hh:mm (or null if contact is active for all time), specify period of contact activity. Should be specified with activePeriodStart. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activeDays - array of week days when contact is active or null if contact is active for all days. Available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    • subscriptions - subscriptions for this contact (see subscription service AddSubscriptions for details).
    • reportFormat - format of emails. Currently supported: Text, ShortText. Planned: HTML, Pdf(for reports)
    • sendNews - could contact be used for news delivery
    • sendPressRelease - could contact be used for press release delivery
    • sendBillingNotifications - send billing notifications (about low balance, overlimits and others)
  • Content-Type: application/json
  • Json:
    
    {"address":"example@example.com","name":"name of you contact"}
    
    
  • Content-Type: text/xml
  • Xml:
    
    <EmailContactEditableData>
       <address>
          example@example.com
       </address>
       <name>
          name of your contact
       </name>
    </EmailContactEditableData>

    Response. POST BASE_URL/contacts/email

    Contact statuses:

    • Confirmed - contact created in confirmed state.
    • LowSmsBalance - could not send contact confirmation code due to low balance.
    • CodeSent - contact created and confirmation code was sent. Contact become active after confirmation.
    • CodeFail - contact create but code sending failed. Try to resend code after some time.
    • CodeSentEarlier -
    • OperationError -
    • Overlimited -

    POST BASE_URL/contacts/email

    create email contact

    Request. POST BASE_URL/contacts/email

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Parameters:

    • id - contact id (GUID) should be specified only in UpdateContacts operation. For other method should be null (not set).
    • name - user provided contact name
    • address - contact address
    • alertDelay - alert sending delay in minutes. See GetAlertDelays method for available values
    • activePeriodStart - string in format hh:mm (or null if contact is active for all time), specify start of contact daily activity period. Should be specified with activePeriodEnd. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activePeriodEnd - string in format hh:mm (or null if contact is active for all time), specify period of contact activity. Should be specified with activePeriodStart. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activeDays - array of week days when contact is active or null if contact is active for all days. Available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    • subscriptions - subscriptions for this contact (see subscription service AddSubscriptions for details).
    • reportFormat - format of emails. Currently supported: Text, ShortText. Planned: HTML, Pdf(for reports)
    • sendNews - could contact be used for news delivery
    • sendPressRelease - could contact be used for press release delivery
    • sendBillingNotifications - send billing notifications (about low balance, overlimits and others)
  • Content-Type: application/json
  • Json:
    
    {"address":"number","name":"name of you contact","gateway":"type of gateway"}
    
    
  • Content-Type: text/xml
  • Xml:
    
    <SmsContactEditableData>
      <address>399494543</address>
      <name>name of you contact4</name>
      <gateway>clickatell</gateway>
    </SmsContactEditableData>

    Response. POST BASE_URL/contacts/email

    Contact statuses:

    Contact data

    POST BASE_URL/contacts/im

    create instant messaging contact

    Request. POST BASE_URL/contacts/im

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Parameters:

    • id - contact id (GUID) should be specified only in UpdateContacts operation. For other method should be null (not set).
    • name - user provided contact name
    • address - contact address
    • alertDelay - alert sending delay in minutes. See GetAlertDelays method for available values
    • activePeriodStart - string in format hh:mm (or null if contact is active for all time), specify start of contact daily activity period. Should be specified with activePeriodEnd. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activePeriodEnd - string in format hh:mm (or null if contact is active for all time), specify period of contact activity. Should be specified with activePeriodStart. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activeDays - array of week days when contact is active or null if contact is active for all days. Available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    • subscriptions - subscriptions for this contact (see subscription service AddSubscriptions for details).
    • reportFormat - format of emails. Currently supported: Text, ShortText. Planned: HTML, Pdf(for reports)
    • sendNews - could contact be used for news delivery
    • sendPressRelease - could contact be used for press release delivery
    • sendBillingNotifications - send billing notifications (about low balance, overlimits and others)
  • Content-Type: application/json
  • Json:
    
    {"address":"123api", "name":"im contact","gateway":"SkypeChat"}
    
    
  • Content-Type: text/xml
  • Xml:
    
    <IMContactEditableData>
    <address>123api2</address>
      <name>im contact2</name>
      <gateway>SkypeChat</gateway>
    </IMContactEditableData>

    Response. POST BASE_URL/contacts/email

    Contact statuses:

    Contact data

    POST BASE_URL/contacts/voice

    create voice call contact

    Request. POST BASE_URL/contacts/voice

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Parameters:

    • id - contact id (GUID) should be specified only in UpdateContacts operation. For other method should be null (not set).
    • name - user provided contact name
    • address - contact address
    • alertDelay - alert sending delay in minutes. See GetAlertDelays method for available values
    • activePeriodStart - string in format hh:mm (or null if contact is active for all time), specify start of contact daily activity period. Should be specified with activePeriodEnd. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activePeriodEnd - string in format hh:mm (or null if contact is active for all time), specify period of contact activity. Should be specified with activePeriodStart. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activeDays - array of week days when contact is active or null if contact is active for all days. Available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    • subscriptions - subscriptions for this contact (see subscription service AddSubscriptions for details).
  • Content-Type: application/json
  • Json:
    
    {
    "address":"123123123",
    "name":"voice contact",
    "gateway":"twiliovoice"
    }
    
    
  • Content-Type: text/xml
  • Xml:
    
    <IMContactEditableData>
    <address>123api2</address>
      <name>im contact2</name>
      <gateway>SkypeChat</gateway>
    </IMContactEditableData>

    Response. POST BASE_URL/contacts/email

    Contact statuses:

    Contact data

    PUT BASE_URL/contacts/email

    update email contact

    Request. PUT BASE_URL/contacts/email

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Parameters:

  • Content-Type: application/json
  • 
    PUT BASE_URL/contacts/email/id of contact HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your ticket here
    
    {"reportFormat":"ShortText"}
    
    
  • Content-Type: text/xml
  • 
    PUT BASE_URL/contacts/email/id of contact HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer your ticket here
    
    ≶EmailContactEditableData>
    ≶reportFormat>report format, see≶/reportFormat>
    ≶sendNews>1 or 0≶/sendNews>
    ≶/EmailContactEditableData>
    
    

    Response. POST BASE_URL/contacts/email

    Contact statuses:

    Contact data

    PUT BASE_URL/contacts/sms

    update sms contact

    Request. PUT BASE_URL/contacts/email

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Parameters:

  • Content-Type: application/json
  • Json:
    
    {"address":"222222221","name":"sms contact2","gateway":"twiliosms"}
    
    
  • Content-Type: text/xml
  • 
    PUT BASE_URL/contacts/sms/092a2bc9-58d1-e411-80c3-00155d36955e HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer
    
    ≶SmsContactEditableData>
    ≶gateway>clickatell≶/gateway>
    ≶/SmsContactEditableData>
    
    

    Response. POST BASE_URL/contacts/sms

    Contact data

    PUT BASE_URL/contacts/im

    update instant messaging contact

    Request. PUT PUT BASE_URL/contacts/im

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Parameters:

  • Content-Type: application/json
  • 
    PUT BASE_URL/contacts/im/695dc35a-59d1-e411-80c3-00155d36955e HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer
    Content-Length: 79
    {"address":"222222224","name":"im contact2","gateway":"GTalk"}
    
    
  • Content-Type: text/xml
  • 
    PUT BASE_URL/contacts/im/695dc35a-59d1-e411-80c3-00155d36955e HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer
    ≶IMContactEditableData>
    ≶gateway>SkypeChat≶/gateway>
    ≶/IMContactEditableData>
    
    

    Response. PUT PUT BASE_URL/contacts/im

    Contact data

    PUT BASE_URL/contacts/voice

    Currently has no additional field. VoiceCall gateway is twiliovoice. Send cost: $0.04 for US carriers, $0.222 for other.

    DELETE BASE_URL/contacts/{id:guid}

    delete contact specified by id (GUID)

    Request. DELETE BASE_URL/contacts/{id:guid}

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • 
    DELETE BASE_URL/contacts/id of contact HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your ticket here
    
    

    Response. PUT PUT BASE_URL/contacts/im

    Contact data

    DELETE BASE_URL/contacts

    delete contacts specified by filter or all contacts

    Request.

    
                        
    
    

    Response

    
                            
    
    

    POST /contacts/{id:guid}/code

    confirm contact by sending confirmation code

    Request. POST BASE_URL/contacts/{id:guid}/code

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Parameters:

  • Content-Type: application/json
  • Xml:
    
    POST BASE_URL/contacts/id of contact/code HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your token here
                            
    {"code":"64700"}
    
    
  • Content-Type: text/xml
  • Xml:
    
    POST BASE_URL/contacts/7cb19b17-6bd9-e411-80c3-00155d36955e/code HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer
    
    ≶ContactCode>
    ≶contactId>7cb19b17-6bd9-e411-80c3-00155d36955e≶/contactId>
    ≶code>22934≶/code>
    ≶/ContactCode>
    
    

    Response. PUT PUT BASE_URL/contacts/im

    Contact data

    PATCH /contacts/{id:guid}/code

    possible regenerate confirmation code and resend it to contact address

    Request. PATCH BASE_URL/contacts/{id:guid}/code

    Headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • 
    PATCH BASE_URL/contacts/id of contact/code HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer your token here
    Content-Length: 0
    
    

    Response. PATCH /contacts/{id:guid}/code

    Contact data

    Api REST stats operations

    GET BASE_URL/stats

    get uptime statistics for tasks. You usually filter stats by query string parameters explained bellow.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • 
    GET BASE_URL/stats HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your auth.token here
    Content-Length: 0
    
    

    Query string parameters (inherited from task filter):

    • ids - return only tasks with ids specified in ids url parameter.
      For specifying many ids use this example: ?ids=guid1&ids=guid2&ids=guid3.
    • excludeIds - exclude ids specified in ids array and return other tasks. ?excludeIds=true
    • taskType - task type to search for. ?taskType=Http (case sensitive)
    • taskTypes - array of task type to search for. ?taskTypes=Http&taskTypes=Ping (case sensitive)
    • excludeTaskTypes - exclude tasks with taskType and taskTypes - return other tasks. ?excludeTaskTypes=true.
    • status - Enabled or Disabled. ?excludeTaskTypes=Disabled - return only disabled tasks.
    • url - task with specified url to search for. Url should be
    • urls - task with specified urls to search for. Url in urls array should be url encoded.
    • urlSearchLike - specified only with url parameter (not urls). If true like search will be performed.
      ?url=mysite&urlSearchLike=true - will return tasks with url: http://www.mysite.com/some/file.js, http://www.mysite.com and other which contains mysite.
    • excludeUrls - exclude tasks with specified urls (in url and urls parameter).
    • name - search task with specified name.
      If name(names) and id(ids) are specified in url query string - search will use OR join for results.
      For ex. ?id=guid1&name=mytask will return tasks with name mytask and task with id guid1.
      Combining name(names) with other filter parameters will result in AND join -
      all returned tasks should contain name as specified in name (names) parameter.
    • names - array of names to search for. ?names=mytask1&names=mytask2
    • nameSearchLike - perform like search for name (could not be used with names). ?name=mytask&nameSearchLike=true
    • excludeNames - exclude tasks with specified name (names).
    • interval - search tasks with specified interval. ?interval=1
    • intervals - search tasks with specified intervals. ?intervals=1&intervals=60
    • excludeIntervals - exclude tasks with specified intervals. ?interval=1&excludeIntervals=true
    • openStat - search for public tasks (with public statistics and event log). ?openStat=true or ?openStat=false
    • lastState - search for up or down tasks. ?lastState=true - up tasks or ?lastState=false - down tasks
    • tags - search for tasks with tags. ?tags=server&tags=mymachine
    • overlimited - search for billing overlimited tasks. ?overlimited=true - tasks with overlimit, ?overlimited=false - without.
    • active - search for active or disabled tasks.
      Task could be disabled by HostTracker system or by user.
      This flag indicates system disablence (due to overlimit, low balance, or other).
      For user disablence see status parameter.
      ?active=true - return only active tasks, ?active=false - return only disabled tasks

    Query string parameters (specific for statistics operations):

    • statsStart - string, start date of interval - should be in format you selected in profile.
      This parameter have no effect if you also specify statsStartUnix in query string.
      Instead, start date will be calculated from statsStartUnix. If both statsStart and statsStartUnix are empty
      then startDate will be choosen as minimum from creation times of selected by filter tasks.
      Important: dates you provide in one of parameters (statsStart, statsEnd, statsStartUnix, statsEndUnix)
      are treated as time in UTC time zone.
    • statsEnd - string, end date of interval - should be in format you selected in profile.
      This parameter have no effect if you also specify statsEndUnix in query string.
      Instead, end date will be calculated from statsEndUnix. If both statsEnd and statsEndUnix are empty
      then endDate will be the current moment of time.
      Important: dates you provide in one of parameters (statsStart, statsEnd, statsStartUnix, statsEndUnix)
      are treated as time in UTC time zone.
    • statsStartUnix - int, unix timestamp - number of seconds from 01.01.1970.
      StartDate = getJustDate(01.01.1970 00:00:00 + statsStartUnix)
      In query string you usualy provide pair (statsStartUnix, statsEndUnix) or pair (statsStart, statsEnd).
      Important: dates you provide in one of parameters (statsStart, statsEnd, statsStartUnix, statsEndUnix)
      are treated as time in UTC time zone.
    • statsEndUnix - int, unix timestamp - number of seconds from 01.01.1970.
      EndDate = getJustDate(01.01.1970 00:00:00 + statsEndUnix)
      In query string you usualy provide pair (statsStartUnix, statsEndUnix) or pair (statsStart, statsEnd).
      Important: dates you provide in one of parameters (statsStart, statsEnd, statsStartUnix, statsEndUnix)
      are treated as time in UTC time zone.
    • expectedSLA - value between 0.00 and 100.00. Expected SLA.
      if calculated uptime % is less then expectedSLA then in results field slaExpectationSucceeded will be false
      In other case, value in slaExpectationSucceeded will be true.
      If you do not provide expectedSLA in request or task does not have data for detecting practical uptime %, slaExpectationSucceeded will be absent in response
    • fullTask - true or false (default is false). If true than all task information will be returned in task field of StatsForTask object
      In other case (when false or not specified in query string) just TaskReference object will be returned. It contains only id and name field of task.

    Response: Stats object with stats property - array of StatsForTask objects. StatsForTask object fields:

    • task - Task object (in case when fullTask=true) as described in task operations.
      Or TaskReference object (in case when fullTask is not specified or false) that contains just id and name of the task.
    • uptimeInMinutes - number of minutes site was up in specified interval (startDate, endDate)
    • downtimeInMinutes - number of minutes site was down in specified interval (startDate, endDate)
    • maintenanceUptimeInMinutes - number of minutes site was up and in maintenance (see maintenance settings) in specified interval (startDate, endDate)
    • maintenanceDowntimeInMinutes - number of minutes site was down and in maintenance (see maintenance settings) in specified interval (startDate, endDate)
    • totalTimeInMinutes - number of minutes site was under monitoring in specified interval (startDate, endDate)
    • uptimeSpan - uptime in format DD.hh:mm:ss, for example: 2.12:03:24 - 2 days, 12 hours, 3 minutes and 24 seconds
    • downtimeSpan - downtime in format DD.hh:mm:ss.
    • maintenanceUptimeSpan - maintenance uptime in format DD.hh:mm:ss.
    • maintenanceDowntimeSpan - maintenance downtime in format DD.hh:mm:ss.
    • totalTimeSpan - total monitoring time in format DD.hh:mm:ss.
    • uptimeChecks - number of checks (site avalability verifications) that resulted in up state.
    • downtimeChecks - number of checks (site avalability verifications) that resulted in down state (site was not accessible or error occured).
    • maintenanceUptimeChecks - number of checks (site avalability verifications) that resulted in up state during maintenance.
    • maintenanceDowntimeChecks - number of checks (site avalability verifications) that resulted in down state during maintenance.
    • totalChecks - number of checks (site avalability verifications) totally performed in interval (startDate, endDate).
    • uptimePercent - uptime in % during (startDate, endDate) calculated by formula: (uptimeInSeconds + maintenanceUptimeInSeconds) / (totalTimeInSeconds - maintenanceDowntimeInSeconds).
      This value will not be returned in response in case when total time of monitoring is 0 or total time of monitoring is maintenance downtime.
    • downtimePercent - downtime in % during (startDate, endDate) calculated by formula: (downtimeInSeconds) / (totalTimeInSeconds - maintenanceDowntimeInSeconds).
      This value will not be returned in response in case when total time of monitoring is 0 or total time of monitoring is maintenance downtime.
    • slaExpectationSucceeded - if you provide in query string expectedSLA parameters, this parameters will contain response to your expectation.
      In other words slaExpectationSucceeded = true when uptimePercent >= expectedSLA and false when uptimePercent < expectedSLA.

    Other Stats object fields:

    • statsStart - statsStart date for which uptime was calculated - date is formated as specified in profile.
    • statsEnd - statsEnd date for which uptime was calculated - date is formatted as specified in profile
    • statsStartUnix - int, distance in seconds from 01.01.1970 of the statsStart
    • statsEndUnix - int, distance in seconds from 01.01.1970 of the endStats.
    • expectedSLA - same value you provide in query string.

    Api REST outage operations

    GET BASE_URL/outages

    get outages for tasks

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • 
    GET BASE_URL/outages HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your auth.token here
    Content-Length: 0
    
    

    Query string parameters (inherited from task filter):

    • ids - return only tasks with ids specified in ids url parameter.
      For specifying many ids use this example: ?ids=guid1&ids=guid2&ids=guid3.
    • excludeIds - exclude ids specified in ids array and return other tasks. ?excludeIds=true
    • taskType - task type to search for. ?taskType=Http (case sensitive)
    • taskTypes - array of task type to search for. ?taskTypes=Http&taskTypes=Ping (case sensitive)
    • excludeTaskTypes - exclude tasks with taskType and taskTypes - return other tasks. ?excludeTaskTypes=true.
    • status - Enabled or Disabled. ?excludeTaskTypes=Disabled - return only disabled tasks.
    • url - task with specified url to search for. Url should be
    • urls - task with specified urls to search for. Url in urls array should be url encoded.
    • urlSearchLike - specified only with url parameter (not urls). If true like search will be performed.
      ?url=mysite&urlSearchLike=true - will return tasks with url: http://www.mysite.com/some/file.js, http://www.mysite.com and other which contains mysite.
    • excludeUrls - exclude tasks with specified urls (in url and urls parameter).
    • name - search task with specified name.
      If name(names) and id(ids) are specified in url query string - search will use OR join for results.
      For ex. ?id=guid1&name=mytask will return tasks with name mytask and task with id guid1.
      Combining name(names) with other filter parameters will result in AND join -
      all returned tasks should contain name as specified in name (names) parameter.
    • names - array of names to search for. ?names=mytask1&names=mytask2
    • nameSearchLike - perform like search for name (could not be used with names). ?name=mytask&nameSearchLike=true
    • excludeNames - exclude tasks with specified name (names).
    • interval - search tasks with specified interval. ?interval=1
    • intervals - search tasks with specified intervals. ?intervals=1&intervals=60
    • excludeIntervals - exclude tasks with specified intervals. ?interval=1&excludeIntervals=true
    • openStat - search for public tasks (with public statistics and event log). ?openStat=true or ?openStat=false
    • lastState - search for up or down tasks. ?lastState=true - up tasks or ?lastState=false - down tasks
    • tags - search for tasks with tags. ?tags=server&tags=mymachine
    • overlimited - search for billing overlimited tasks. ?overlimited=true - tasks with overlimit, ?overlimited=false - without.
    • active - search for active or disabled tasks.
      Task could be disabled by HostTracker system or by user.
      This flag indicates system disablence (due to overlimit, low balance, or other).
      For user disablence see status parameter.
      ?active=true - return only active tasks, ?active=false - return only disabled tasks

    Query string parameters (specific for outage operations):

    • startTime - string, start date of interval - should be in format you selected in profile.
      This parameter have no effect if you also specify startTimeUnix in query string.
      Instead, start date will be calculated from startTimeUnix. If both startTime and startTimeUnix are empty
      then startTime will be choosen to be a date of 1 month before current moment of request for outages.
      Important: dates you provide in one of parameters (startTime, endTime, startTimeUnix, endTimeUnix)
      are treated as time in time zone of your current profile (UNLESS you specify a parameter getInUtcTimeZone=1).
    • endTime - string, end date of interval - should be in format you selected in profile.
      This parameter have no effect if you also specify endTimeUnix in query string.
      Instead, end date will be calculated from endTimeUnix. If both endTime and endTimeUnix are empty
      then endTime will be the current moment of time.
      Important: dates you provide in one of parameters (startTime, endTime, startTimeUnix, endTimeUnix)
      are treated as time in time zone of your current profile (UNLESS you specify a parameter getInUtcTimeZone=1).
    • startTimeUnix - int, unix timestamp - number of seconds from 01.01.1970.
      startTime = getDateTime(01.01.1970 00:00:00 + startTimeUnix)
      In query string you usualy provide pair (startTimeUnix, endTimeUnix) or pair (startTime, endTime).
      Important: dates you provide in one of parameters (startTime, endTime, startTimeUnix, endTimeUnix)
      are treated as time in time zone of your current profile (UNLESS you specify a parameter getInUtcTimeZone=1).
    • endTimeUnix - int, unix timestamp - number of seconds from 01.01.1970.
      endTime = getDateTime(01.01.1970 00:00:00 + endTimeUnix)
      In query string you usualy provide pair (startTimeUnix, endTimeUnix) or pair (startTime, endTime).
      Important: dates you provide in one of parameters (startTime, endTime, startTimeUnix, endTimeUnix)
      are treated as time in time zone of your current profile (UNLESS you specify a parameter getInUtcTimeZone=1).
    • getInUtcTimeZone - could be 0 or 1
      if 1 then all dates & times of outages will be returned in UTC time zone.
      if 0 then the time zone from profile will be used
    • fullTask - true or false (default is false). If true than all task information will be returned in task field of StatsForTask object
      In other case (when false or not specified in query string) just TaskReference object will be returned. It contains only id and name field of task.

    Response: Outages object with taskOutages property - array of TaskOutages objects. Outages object fields:

    • startTime - string, formated according to profile DateTime format settings.
      Shows startTime query filter parameter, that was used for obtained outages
      It is returned always, even if you do not specify it in OutageFilter
    • endTime - string, formated according to profile DateTime format settings.
      Shows endTime query filter parameter, that was used for obtained outages
      It is returned always, even if you do not specify it in OutageFilter
    • startTimeUnix - big int (or long) - seconds from 01.01.1970 00:00:00
      Corresponds to startTime return parameter
    • endTimeUnix - big int (or long) - seconds from 01.01.1970 00:00:00
      Corresponds to endTime return parameter
    • timeZone - time zone of dates and times in returned outages and query filter parameters
      Equals to UTC if getInUtcTimeZone is 1 in filter
    • taskOutages - Array of information about tasks.
      Each element contains two fields:
      • task - TaskReference (or Task if fullTask is true in request)
      • outages - Array of Span objects

    Span object fields:

    • startTime - string, formated according to profile DateTime format settings.
      It is a start time of outage
    • endTime - string, formated according to profile DateTime format settings.
      It is an end time of outage
    • startTimeUnix - big int (or long) - seconds from 01.01.1970 00:00:00
      It is a start time of outage
    • endTimeUnix - big int (or long) - seconds from 01.01.1970 00:00:00
      It is an end time of outage
    • startEventNumber - int
      Number of check (in a sequence of task availability checks) which detected that site went DOWN
    • endEventNumber - int
      Last number of check (in a sequence of task availability checks) which detected that site was still DOWN before UP
    • comment - string
      Comment for outage you provided in Host-Tracker web UI.

    Api REST incident operations

    GET BASE_URL/incident

    get incidents for tasks.

    Request headers:

  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • 
    GET BASE_URL/incident HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your auth.token here
    Content-Length: 0
    
    

    Query string parameters (inherited from task filter):

    • ids - return only tasks with ids specified in ids url parameter.
      For specifying many ids use this example: ?ids=guid1&ids=guid2&ids=guid3.
    • excludeIds - exclude ids specified in ids array and return other tasks. ?excludeIds=true
    • taskType - task type to search for. ?taskType=Http (case sensitive)
    • taskTypes - array of task type to search for. ?taskTypes=Http&taskTypes=Ping (case sensitive)
    • excludeTaskTypes - exclude tasks with taskType and taskTypes - return other tasks. ?excludeTaskTypes=true.
    • status - Enabled or Disabled. ?excludeTaskTypes=Disabled - return only disabled tasks.
    • url - task with specified url to search for. Url should be
    • urls - task with specified urls to search for. Url in urls array should be url encoded.
    • urlSearchLike - specified only with url parameter (not urls). If true like search will be performed.
      ?url=mysite&urlSearchLike=true - will return tasks with url: http://www.mysite.com/some/file.js, http://www.mysite.com and other which contains mysite.
    • excludeUrls - exclude tasks with specified urls (in url and urls parameter).
    • name - search task with specified name.
      If name(names) and id(ids) are specified in url query string - search will use OR join for results.
      For ex. ?id=guid1&name=mytask will return tasks with name mytask and task with id guid1.
      Combining name(names) with other filter parameters will result in AND join -
      all returned tasks should contain name as specified in name (names) parameter.
    • names - array of names to search for. ?names=mytask1&names=mytask2
    • nameSearchLike - perform like search for name (could not be used with names). ?name=mytask&nameSearchLike=true
    • excludeNames - exclude tasks with specified name (names).
    • interval - search tasks with specified interval. ?interval=1
    • intervals - search tasks with specified intervals. ?intervals=1&intervals=60
    • excludeIntervals - exclude tasks with specified intervals. ?interval=1&excludeIntervals=true
    • openStat - search for public tasks (with public statistics and event log). ?openStat=true or ?openStat=false
    • lastState - search for up or down tasks. ?lastState=true - up tasks or ?lastState=false - down tasks
    • tags - search for tasks with tags. ?tags=server&tags=mymachine
    • overlimited - search for billing overlimited tasks. ?overlimited=true - tasks with overlimit, ?overlimited=false - without.
    • active - search for active or disabled tasks.
      Task could be disabled by HostTracker system or by user.
      This flag indicates system disablence (due to overlimit, low balance, or other).
      For user disablence see status parameter.
      ?active=true - return only active tasks, ?active=false - return only disabled tasks

    Query string parameters (specific for incident operations):

    • startTime - string, start date of interval - should be in format you selected in profile.
      This parameter have no effect if you also specify startTimeUnix in query string.
      Instead, start date will be calculated from startTimeUnix. If both startTime and startTimeUnix are empty
      then startTime will be choosen to be a date of 1 month before current moment of request for incidents.
      Important: dates you provide in one of parameters (startTime, endTime, startTimeUnix, endTimeUnix)
      are treated as time in time zone of your current profile (UNLESS you specify a parameter getInUtcTimeZone=1).
    • endTime - string, end date of interval - should be in format you selected in profile.
      This parameter have no effect if you also specify endTimeUnix in query string.
      Instead, end date will be calculated from endTimeUnix. If both endTime and endTimeUnix are empty
      then endTime will be the current moment of time.
      Important: dates you provide in one of parameters (startTime, endTime, startTimeUnix, endTimeUnix)
      are treated as time in time zone of your current profile (UNLESS you specify a parameter getInUtcTimeZone=1).
    • startTimeUnix - int, unix timestamp - number of seconds from 01.01.1970.
      startTime = getDateTime(01.01.1970 00:00:00 + startTimeUnix)
      In query string you usualy provide pair (startTimeUnix, endTimeUnix) or pair (startTime, endTime).
      Important: dates you provide in one of parameters (startTime, endTime, startTimeUnix, endTimeUnix)
      are treated as time in time zone of your current profile (UNLESS you specify a parameter getInUtcTimeZone=1).
    • endTimeUnix - int, unix timestamp - number of seconds from 01.01.1970.
      endTime = getDateTime(01.01.1970 00:00:00 + endTimeUnix)
      In query string you usualy provide pair (startTimeUnix, endTimeUnix) or pair (startTime, endTime).
      Important: dates you provide in one of parameters (startTime, endTime, startTimeUnix, endTimeUnix)
      are treated as time in time zone of your current profile (UNLESS you specify a parameter getInUtcTimeZone=1).
    • getInUtcTimeZone - could be 0 or 1
      if 1 then all dates & times of incidents will be returned in UTC time zone.
      if 0 then the time zone from profile will be used
    • fullTask - true or false (default is false). If true than all task information will be returned in task field of StatsForTask object
      In other case (when false or not specified in query string) just TaskReference object will be returned. It contains only id and name field of task.

    Response: the object with taskIncidents property - array of TaskIncidents objects, each with fields:

    • startTime - string, formated according to profile DateTime format settings.
      Shows startTime query filter parameter, that was used for obtained incidents
      It is returned always, even if you do not specify it in IncidentFilter
    • endTime - string, formated according to profile DateTime format settings.
      Shows endTime query filter parameter, that was used for obtained incidents
      It is returned always, even if you do not specify it in IncidentFilter
    • startTimeUnix - big int (or long) - seconds from 01.01.1970 00:00:00
      Corresponds to startTime return parameter
    • endTimeUnix - big int (or long) - seconds from 01.01.1970 00:00:00
      Corresponds to endTime return parameter
    • timeZone - time zone of dates and times in returned incidents and query filter parameters
      Equals to UTC if getInUtcTimeZone is 1 in filter
    • taskIncidents - Array of information about task incidents.
      Each element contains two fields:
      • task - TaskReference (or Task if fullTask is true in request)
      • incidents - Array of Incident objects

    Incident object fields:

    • taskId - string, Guid of monitoring task
    • checkId - int, sequential check number for this monitoring task
    • startTimeUnix - big int (or long) - seconds from 01.01.1970 00:00:00
      - moment of detected incident in requested time zone.
    • endTimeUnix - big int (or long) - seconds from 01.01.1970 00:00:00
      - denotes end of check which detected the incident
    • location - Location object:
      agentId - Guid of location from which incident was detected,
      city, state, country - fields of the location
    • recheckTimeUnix - big int
      - timestamp of recheck start which confirmed the incident
    • recheckDurationSec - int
      - recheck duration in seconds
    • isUnderMaintenance - int
      - nonpresent if the incident is not under maintenance. Otherwise, the value > 0.
    • error - CheckError object
      - errorType - string, denotes the error category,
      - errorCode - int, subcategory of the error
      - errorMessage - string, plain message of the error if no subcategory could be defined
      - errorDescription - string, error summary deduced from other three fields.
    • hasSnapshot - bool
      - snapshot is byte array of site state at incident moment. For http monitoring it is document html, for pagespeed is the image of site.
    • recheck - confirmation of incident
      - okLocations - location objects which did not detect the incident
      - failLocationsByError - recheck error with attached locations. Fields of CheckError object + locations: Location[]