SubscriptionService


Click here for a complete list of operations.

GetSubscriptions

Get existing subscriptions:

Params:
  • taskId (optional) - task id (GUID) for which retrieve subscriptions.
    If not specified method return subscriptions for all tasks
  • contactId (optional) - contact id (GUID) for which retrieve subscriptions.
    If not specified method return subscriptions for all contacts
  • subscriptionTypes (optional) - array of alert and/or report subscription types for filtering existing subscription set.
Result: array of Subscription
Subscription - spcifies relations (in form of alert and report subscription types) between tasks in contacts:
  • taskIds - for this method array with one element - taskId - which participate in subscription
  • contactId - for this method array with one element - contactId - which participate in subscription
  • alertTypes - for this method array with one element - type of alert subscription between task and contact specified in first two parameters; or null (nil)
  • reportTypes - for this method array with one element - type of report subscription between task and contact specified in first two parameters; or null (nil)
  • Each returned Subscription has alertTypes set to one element and reportTypes set to nil, or vise versa

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

<?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>
    <GetSubscriptions xmlns="http://www.host-tracker.com/Services">
      <taskId>guid</taskId>
      <contactId>guid</contactId>
      <subscriptionTypes>
        <string>string</string>
        <string>string</string>
      </subscriptionTypes>
    </GetSubscriptions>
  </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>
    <GetSubscriptionsResponse xmlns="http://www.host-tracker.com/Services">
      <GetSubscriptionsResult>
        <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>
      </GetSubscriptionsResult>
    </GetSubscriptionsResponse>
  </soap:Body>
</soap:Envelope>