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": "0c2dee68-d0e8-403c-8f77-52a6265c2398",
      "DeliveryType": "fetch",
      "Domain": {
        "Type": "Site",
        "Values": [
          {
            "Name": "GSMKey",
            "Value": "E835-C957-B324-4CCA-A458"
          },
          {
            "Name": "SiteKey",
            "Value": "31AD-C301-7BC9-4E36-91F5"
          }
        ]
      },
      "EventTypes": [
        "Endpoint.FileDetection"
      ],
      "Webhook": null,
      "CreatedDate": "2024-09-21T17:45:02.4217983Z",
      "UpdatedDate": "2024-10-21T17:45:02.4217983Z"
    },
    {
      "SubscriptionId": "7186b07a-0f64-430c-9eae-246f91c096e3",
      "DeliveryType": "webhook",
      "Domain": {
        "Type": "Site",
        "Values": [
          {
            "Name": "GSMKey",
            "Value": "53CA-6A4A-6209-42E1-9336"
          },
          {
            "Name": "SiteKey",
            "Value": "E693-294D-9DCF-4606-A85F"
          }
        ]
      },
      "EventTypes": [
        "Endpoint.FileDetection"
      ],
      "Webhook": {
        "DeliveryContext": "MyCustomCorrelationString",
        "DeliveryRateInSeconds": 90,
        "DeliveryUrl": "https://my.company.com/wrunity/notifications/webhook",
        "Suspended": false,
        "Statistics": null
      },
      "CreatedDate": "2024-09-21T17:45:02.4217983Z",
      "UpdatedDate": "2024-10-21T17:45:02.4217983Z"
    }
  ]
}                    
<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>2024-09-21T17:45:02.4217983Z</CreatedDate>
      <DeliveryType>fetch</DeliveryType>
      <Domain>
        <Type>Site</Type>
        <Values>
          <SubscriptionResponseModelDomainValue>
            <Name>GSMKey</Name>
            <Value>E835-C957-B324-4CCA-A458</Value>
          </SubscriptionResponseModelDomainValue>
          <SubscriptionResponseModelDomainValue>
            <Name>SiteKey</Name>
            <Value>31AD-C301-7BC9-4E36-91F5</Value>
          </SubscriptionResponseModelDomainValue>
        </Values>
      </Domain>
      <EventTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>Endpoint.FileDetection</d4p1:string>
      </EventTypes>
      <SubscriptionId>0c2dee68-d0e8-403c-8f77-52a6265c2398</SubscriptionId>
      <UpdatedDate>2024-10-21T17:45:02.4217983Z</UpdatedDate>
      <Webhook i:nil="true" />
    </SubscriptionResponseModel>
    <SubscriptionResponseModel>
      <CreatedDate>2024-09-21T17:45:02.4217983Z</CreatedDate>
      <DeliveryType>webhook</DeliveryType>
      <Domain>
        <Type>Site</Type>
        <Values>
          <SubscriptionResponseModelDomainValue>
            <Name>GSMKey</Name>
            <Value>53CA-6A4A-6209-42E1-9336</Value>
          </SubscriptionResponseModelDomainValue>
          <SubscriptionResponseModelDomainValue>
            <Name>SiteKey</Name>
            <Value>E693-294D-9DCF-4606-A85F</Value>
          </SubscriptionResponseModelDomainValue>
        </Values>
      </Domain>
      <EventTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>Endpoint.FileDetection</d4p1:string>
      </EventTypes>
      <SubscriptionId>7186b07a-0f64-430c-9eae-246f91c096e3</SubscriptionId>
      <UpdatedDate>2024-10-21T17:45:02.4217983Z</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>