TaskService


Click here for a complete list of operations.

GetTasksByFilter

Get array of Task(HttpTask, PingTask, PortTask, ...) using task filter

Params: TaskFilter:
  • Hint 1. All filter fields are optional and could be combined together.
  • Hint 2. Specifying single filtered value (for ex. name) and filtered value collection (for ex. names) results in filtered value collection with all specified values (in ex. specified name and specified names).
  • Hint 3. If several fields are specified then they are combined via AND condition.
  • Hint 4. If you specify task id (ids) and task name (names) - they will be combined via OR.
  • id - task id to filter by
  • ids - task ids to filter by
  • excludeIds - search for tasks not included in id and/or ids fields
  • taskType - filter by task type. Supported values specified in Task (See GetTasks method)
  • taskTypes - filter by task types. Supported values specified in Task (See GetTasks method)
  • excludeTaskTypes
  • status - enabled or disabled
  • url - url to find (or part of url if urlSearchLike is true)
  • urls - urls to find, incompatable with urlSearchLike
  • urlSearchLike - if true - url specifies a part of url to find
  • excludeUrls
  • name - task name or it's part if nameSearchLike = true
  • names - task names, incompatible with nameSearchLike
  • nameSearchLike - task names
  • interval - task interval
  • intervals - task intervals
  • excludeIntervals
  • openStat - search for public tasks
  • lastState - search tasks with specified state
  • tags - search by tags
  • overlimited - filter billing overlimited tasks
  • active - search for active tasks. Task could be disabled by user or by system.
    If true - returned active tasks, if false - returned disabled by user or by system tasks.
    Default is null - return all tasks
Soap client faults:
  • WrongTaskType - wrong task type specified in filter. See GetTaskTypes for available types.
  • WrongTaskStatus - wrong task status specified in filter. Allowed: enabled,disabled

Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /api/soap/v1/task.asmx HTTP/1.1
Host: www.host-tracker.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.host-tracker.com/Services/GetTasksByFilter"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <AuthHeader xmlns="http://www.host-tracker.com/Services">
      <login>string</login>
      <password>string</password>
      <ticket>string</ticket>
    </AuthHeader>
  </soap:Header>
  <soap:Body>
    <GetTasksByFilter xmlns="http://www.host-tracker.com/Services">
      <filter>
        <id>guid</id>
        <ids>
          <guid>guid</guid>
          <guid>guid</guid>
        </ids>
        <excludeIds>boolean</excludeIds>
        <taskType>string</taskType>
        <taskTypes>
          <string>string</string>
          <string>string</string>
        </taskTypes>
        <excludeTaskTypes>boolean</excludeTaskTypes>
        <status>string</status>
        <url>string</url>
        <urls>
          <string>string</string>
          <string>string</string>
        </urls>
        <urlSearchLike>boolean</urlSearchLike>
        <excludeUrls>boolean</excludeUrls>
        <name>string</name>
        <names>
          <string>string</string>
          <string>string</string>
        </names>
        <nameSearchLike>boolean</nameSearchLike>
        <excludeNames>boolean</excludeNames>
        <interval>int</interval>
        <intervals>
          <int>int</int>
          <int>int</int>
        </intervals>
        <excludeIntervals>boolean</excludeIntervals>
        <openStat>boolean</openStat>
        <lastState>boolean</lastState>
        <tags>
          <string>string</string>
          <string>string</string>
        </tags>
        <overlimited>boolean</overlimited>
        <active>boolean</active>
      </filter>
      <additionalTaskInfo>None or Subscriptions or Stats</additionalTaskInfo>
    </GetTasksByFilter>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetTasksByFilterResponse xmlns="http://www.host-tracker.com/Services">
      <GetTasksByFilterResult>
        <Task>
          <creationTime>dateTime</creationTime>
          <taskType>string</taskType>
          <enabled>boolean</enabled>
          <interval>int</interval>
          <upFromTime>dateTime</upFromTime>
          <lastState>boolean</lastState>
          <lastStateChangeTime>dateTime</lastStateChangeTime>
          <openStatEnabled>boolean</openStatEnabled>
          <fullLogEnabled>boolean</fullLogEnabled>
          <disablenceReason>string</disablenceReason>
          <disablenceTime>dateTime</disablenceTime>
          <holdResults>boolean</holdResults>
          <agentStat>boolean</agentStat>
          <billingOverlimits>
            <string>string</string>
            <string>string</string>
          </billingOverlimits>
          <tags>
            <string>string</string>
            <string>string</string>
          </tags>
          <subscriptions>
            <Subscription xsi:nil="true" />
            <Subscription xsi:nil="true" />
          </subscriptions>
          <stats>
            <daily>double</daily>
            <monthly>double</monthly>
            <yearly>double</yearly>
            <total>double</total>
          </stats>
          <agentPools>
            <string>string</string>
            <string>string</string>
          </agentPools>
          <deleted>boolean</deleted>
          <dnsbl>
            <lastChecked>dateTime</lastChecked>
            <interval>int</interval>
            <lastState>boolean</lastState>
            <lastStateChangeTime>dateTime</lastStateChangeTime>
          </dnsbl>
        </Task>
        <Task>
          <creationTime>dateTime</creationTime>
          <taskType>string</taskType>
          <enabled>boolean</enabled>
          <interval>int</interval>
          <upFromTime>dateTime</upFromTime>
          <lastState>boolean</lastState>
          <lastStateChangeTime>dateTime</lastStateChangeTime>
          <openStatEnabled>boolean</openStatEnabled>
          <fullLogEnabled>boolean</fullLogEnabled>
          <disablenceReason>string</disablenceReason>
          <disablenceTime>dateTime</disablenceTime>
          <holdResults>boolean</holdResults>
          <agentStat>boolean</agentStat>
          <billingOverlimits>
            <string>string</string>
            <string>string</string>
          </billingOverlimits>
          <tags>
            <string>string</string>
            <string>string</string>
          </tags>
          <subscriptions>
            <Subscription xsi:nil="true" />
            <Subscription xsi:nil="true" />
          </subscriptions>
          <stats>
            <daily>double</daily>
            <monthly>double</monthly>
            <yearly>double</yearly>
            <total>double</total>
          </stats>
          <agentPools>
            <string>string</string>
            <string>string</string>
          </agentPools>
          <deleted>boolean</deleted>
          <dnsbl>
            <lastChecked>dateTime</lastChecked>
            <interval>int</interval>
            <lastState>boolean</lastState>
            <lastStateChangeTime>dateTime</lastStateChangeTime>
          </dnsbl>
        </Task>
      </GetTasksByFilterResult>
    </GetTasksByFilterResponse>
  </soap:Body>
</soap:Envelope>