SubscriptionService


Click here for a complete list of operations.

AddSubscriptions

Create new subscriptions:

Params:
  • subscriptions - array of Subscription (description in method GetSubscriptions)
  • Hint 1. In contrast to GetSubscriptions method if you want, for example, set Up, Down alert subscription types and
    Daily, Monthly, Yearly report types between many tasks and many contacts, you could specify array of taskIds, contactIds, and expacted alertTypes, reportTypes in one Subscription structure.
  • Hint 2. If you do not specify taskIds but contactIds then you will subscribe this contacts for all existed tasks
  • Hint 3. If you do not specify contactIds but taskIds then you will subscribe this tasks for all existed contacts
  • Hint 4. If you do not specify contactIds and taskIds then you will subscribe all existed tasks for all existed contacts
Soap client additional fault messages:
  • AlertsAndReportsAreEmpty - for every Subscription structure in input array you should specify at least one subscription type: report or alert.
  • UnknownAlertType - incorrect alert type specified
  • UnknownReportType - incorrect report type specified

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/subscription.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/AddSubscriptions"

<?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>
    <AddSubscriptions xmlns="http://www.host-tracker.com/Services">
      <subscriptions>
        <Subscription>
          <alertTypes>
            <string>string</string>
            <string>string</string>
          </alertTypes>
          <reportTypes>
            <string>string</string>
            <string>string</string>
          </reportTypes>
          <taskIds>
            <guid>guid</guid>
            <guid>guid</guid>
          </taskIds>
          <contactIds>
            <guid>guid</guid>
            <guid>guid</guid>
          </contactIds>
        </Subscription>
        <Subscription>
          <alertTypes>
            <string>string</string>
            <string>string</string>
          </alertTypes>
          <reportTypes>
            <string>string</string>
            <string>string</string>
          </reportTypes>
          <taskIds>
            <guid>guid</guid>
            <guid>guid</guid>
          </taskIds>
          <contactIds>
            <guid>guid</guid>
            <guid>guid</guid>
          </contactIds>
        </Subscription>
      </subscriptions>
    </AddSubscriptions>
  </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>
    <AddSubscriptionsResponse xmlns="http://www.host-tracker.com/Services" />
  </soap:Body>
</soap:Envelope>