HostTracker help - api REST outage operations

  1. GET /api/web/v1/outages - get outages for tasks by filter.
GET /api/web/v1/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 https://www.host-tracker.com/api/web/v1/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 url encoded. ?url=http%3A%2F%2Fwww.mysite.com%2Fsome%2Ffile.js
  • urls - task with specified urls to search for. Url in urls array should be url encoded. ?urls=http%3A%2F%2Fwww.mysite.com%2Fsome%2Ffile.js&urls=http%3A%2F%2Fgoogle.com
  • 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).
    ?url=mysite&urlSearchLike=true&excludeUrls=true - return all tasks which do not contain mysite in url.
  • 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). ?name=mytask&nameSearchLike=true&excludeNames=true
  • 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.

Help pages by categories