GET /service/api/notifications/subscriptions

Gets information about the active subscriptions associated with the authenticated caller.

Subscriptions are maintained on the basis of username and client id. Only subscriptions that have been created and are active for the username and client id pair of the caller are returned.

Request Information

URI Parameters

None.

URI Sample(s)

GET
https://unityapi.webrootcloudav.com/service/api/notifications/subscriptions

Body Parameters

None.

Response Information

Resource Description

List of active subscriptions with information on subscribed domains and event types.

Subscriptions are maintained on the basis of username and client id. Only subscriptions are returned that have been created and are active for the username and client id pair of the caller.

GetSubscriptionsResponseModel
NameDescriptionTypeAdditional Information
Count

The total number of active subscriptions.

integer

None.

Subscriptions

List of active subscriptions.

Collection of SubscriptionResponseModel

None.

Sample Response

{
  "Count": 2,
  "Subscriptions": [
    {
      "SubscriptionId": "c98c0084-d230-4e6a-b878-b130a5857dd9",
      "DeliveryType": "fetch",
      "Domain": {
        "Type": "Site",
        "Values": [
          {
            "Name": "GSMKey",
            "Value": "F47F-9FC5-5AF0-4828-8667"
          },
          {
            "Name": "SiteKey",
            "Value": "C1C2-39BB-4470-4534-AC83"
          }
        ]
      },
      "EventTypes": [
        "Endpoint.FileDetection"
      ],
      "Webhook": null,
      "CreatedDate": "2022-11-09T07:09:54.5841038Z",
      "UpdatedDate": "2022-12-09T07:09:54.5841038Z"
    },
    {
      "SubscriptionId": "780d2730-85ea-46c2-b05e-6583d794c229",
      "DeliveryType": "webhook",
      "Domain": {
        "Type": "Site",
        "Values": [
          {
            "Name": "GSMKey",
            "Value": "07CE-8551-211E-4C82-AC09"
          },
          {
            "Name": "SiteKey",
            "Value": "2AD6-2E75-EAC0-46C2-9ABD"
          }
        ]
      },
      "EventTypes": [
        "Endpoint.FileDetection"
      ],
      "Webhook": {
        "DeliveryContext": "MyCustomCorrelationString",
        "DeliveryRateInSeconds": 90,
        "DeliveryUrl": "https://my.company.com/wrunity/notifications/webhook",
        "Suspended": false,
        "Statistics": null
      },
      "CreatedDate": "2022-11-09T07:09:54.5841038Z",
      "UpdatedDate": "2022-12-09T07:09:54.5841038Z"
    }
  ]
}                    
<GetSubscriptionsResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.Notifications.Models">
  <Count>2</Count>
  <Subscriptions>
    <SubscriptionResponseModel>
      <CreatedDate>2022-11-09T07:09:54.5841038Z</CreatedDate>
      <DeliveryType>fetch</DeliveryType>
      <Domain>
        <Type>Site</Type>
        <Values>
          <SubscriptionResponseModelDomainValue>
            <Name>GSMKey</Name>
            <Value>F47F-9FC5-5AF0-4828-8667</Value>
          </SubscriptionResponseModelDomainValue>
          <SubscriptionResponseModelDomainValue>
            <Name>SiteKey</Name>
            <Value>C1C2-39BB-4470-4534-AC83</Value>
          </SubscriptionResponseModelDomainValue>
        </Values>
      </Domain>
      <EventTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>Endpoint.FileDetection</d4p1:string>
      </EventTypes>
      <SubscriptionId>c98c0084-d230-4e6a-b878-b130a5857dd9</SubscriptionId>
      <UpdatedDate>2022-12-09T07:09:54.5841038Z</UpdatedDate>
      <Webhook i:nil="true" />
    </SubscriptionResponseModel>
    <SubscriptionResponseModel>
      <CreatedDate>2022-11-09T07:09:54.5841038Z</CreatedDate>
      <DeliveryType>webhook</DeliveryType>
      <Domain>
        <Type>Site</Type>
        <Values>
          <SubscriptionResponseModelDomainValue>
            <Name>GSMKey</Name>
            <Value>07CE-8551-211E-4C82-AC09</Value>
          </SubscriptionResponseModelDomainValue>
          <SubscriptionResponseModelDomainValue>
            <Name>SiteKey</Name>
            <Value>2AD6-2E75-EAC0-46C2-9ABD</Value>
          </SubscriptionResponseModelDomainValue>
        </Values>
      </Domain>
      <EventTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>Endpoint.FileDetection</d4p1:string>
      </EventTypes>
      <SubscriptionId>780d2730-85ea-46c2-b05e-6583d794c229</SubscriptionId>
      <UpdatedDate>2022-12-09T07:09:54.5841038Z</UpdatedDate>
      <Webhook>
        <DeliveryContext>MyCustomCorrelationString</DeliveryContext>
        <DeliveryRateInSeconds>90</DeliveryRateInSeconds>
        <DeliveryUrl>https://my.company.com/wrunity/notifications/webhook</DeliveryUrl>
        <Statistics i:nil="true" />
        <Suspended>false</Suspended>
      </Webhook>
    </SubscriptionResponseModel>
  </Subscriptions>
</GetSubscriptionsResponseModel>