TaskService


Click here for a complete list of operations.

CreateTasks

Create tasks from array of HttpTaskEditableData, PingTaskEditableData, PortTaskEditableData.

Params:
  • array of TaskEditableData (see CreateTask method)
  • returnBadFormatedData - if false then wrong data in one task will result in fail of whole batch.
    If true then tasks with correct data will be created; wrong data and created tasks will be returned as result of method.
Result: BatchTaskOperationResult
  • tasks - array of Task - created tasks
  • badTaskEditableData - array of BadTaskEditableData - wrong input data
    BadTaskEditableData
    • index - index of wrong data in input array
    • data - wrong data
    • code - error code. See Soap fault messages for CreateTask method
    • message - error code description. See Soap fault messages for CreateTask method
Soap client faults: See CreateTask method. Raised only if returnBadFormatedData is false

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/CreateTasks"

<?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>
    <CreateTasks xmlns="http://www.host-tracker.com/Services">
      <taskData>
        <TaskEditableData>
          <id>guid</id>
          <enabled>boolean</enabled>
          <interval>int</interval>
          <name>string</name>
          <fullLog>boolean</fullLog>
          <openStat>boolean</openStat>
          <tags>
            <string>string</string>
            <string>string</string>
          </tags>
          <agentPools>
            <string>string</string>
            <string>string</string>
          </agentPools>
          <subscriptions>
            <Subscription xsi:nil="true" />
            <Subscription xsi:nil="true" />
          </subscriptions>
        </TaskEditableData>
        <TaskEditableData>
          <id>guid</id>
          <enabled>boolean</enabled>
          <interval>int</interval>
          <name>string</name>
          <fullLog>boolean</fullLog>
          <openStat>boolean</openStat>
          <tags>
            <string>string</string>
            <string>string</string>
          </tags>
          <agentPools>
            <string>string</string>
            <string>string</string>
          </agentPools>
          <subscriptions>
            <Subscription xsi:nil="true" />
            <Subscription xsi:nil="true" />
          </subscriptions>
        </TaskEditableData>
      </taskData>
      <returnBadFormatedData>boolean</returnBadFormatedData>
    </CreateTasks>
  </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>
    <CreateTasksResponse xmlns="http://www.host-tracker.com/Services">
      <CreateTasksResult>
        <tasks>
          <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 xsi:nil="true" />
            <tags xsi:nil="true" />
            <subscriptions xsi:nil="true" />
            <stats xsi:nil="true" />
            <agentPools xsi:nil="true" />
            <deleted>boolean</deleted>
            <dnsbl xsi:nil="true" />
          </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 xsi:nil="true" />
            <tags xsi:nil="true" />
            <subscriptions xsi:nil="true" />
            <stats xsi:nil="true" />
            <agentPools xsi:nil="true" />
            <deleted>boolean</deleted>
            <dnsbl xsi:nil="true" />
          </Task>
        </tasks>
        <badTaskEditableData>
          <BadTaskEditableData>
            <index>int</index>
            <taskId>guid</taskId>
            <code>string</code>
            <message>string</message>
          </BadTaskEditableData>
          <BadTaskEditableData>
            <index>int</index>
            <taskId>guid</taskId>
            <code>string</code>
            <message>string</message>
          </BadTaskEditableData>
        </badTaskEditableData>
      </CreateTasksResult>
    </CreateTasksResponse>
  </soap:Body>
</soap:Envelope>