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": "373337e2-50de-4ad8-b2be-0271148da7f4",
      "DeliveryType": "fetch",
      "Domain": {
        "Type": "Site",
        "Values": [
          {
            "Name": "GSMKey",
            "Value": "5A97-ECBF-6022-42C4-8389"
          },
          {
            "Name": "SiteKey",
            "Value": "24EB-CCD6-456F-40C1-8F6E"
          }
        ]
      },
      "EventTypes": [
        "Endpoint.FileDetection"
      ],
      "Webhook": null,
      "CreatedDate": "2024-08-17T09:59:57.0205052Z",
      "UpdatedDate": "2024-09-17T09:59:57.0205052Z"
    },
    {
      "SubscriptionId": "f6fd444c-5380-4e6c-838e-9f42efd300ea",
      "DeliveryType": "webhook",
      "Domain": {
        "Type": "Site",
        "Values": [
          {
            "Name": "GSMKey",
            "Value": "57D0-7596-5311-48B7-9EB5"
          },
          {
            "Name": "SiteKey",
            "Value": "3BD8-1124-563F-4710-98C1"
          }
        ]
      },
      "EventTypes": [
        "Endpoint.FileDetection"
      ],
      "Webhook": {
        "DeliveryContext": "MyCustomCorrelationString",
        "DeliveryRateInSeconds": 90,
        "DeliveryUrl": "https://my.company.com/wrunity/notifications/webhook",
        "Suspended": false,
        "Statistics": null
      },
      "CreatedDate": "2024-08-17T09:59:57.0205052Z",
      "UpdatedDate": "2024-09-17T09:59:57.0205052Z"
    }
  ]
}                    
<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-08-17T09:59:57.0205052Z</CreatedDate>
      <DeliveryType>fetch</DeliveryType>
      <Domain>
        <Type>Site</Type>
        <Values>
          <SubscriptionResponseModelDomainValue>
            <Name>GSMKey</Name>
            <Value>5A97-ECBF-6022-42C4-8389</Value>
          </SubscriptionResponseModelDomainValue>
          <SubscriptionResponseModelDomainValue>
            <Name>SiteKey</Name>
            <Value>24EB-CCD6-456F-40C1-8F6E</Value>
          </SubscriptionResponseModelDomainValue>
        </Values>
      </Domain>
      <EventTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>Endpoint.FileDetection</d4p1:string>
      </EventTypes>
      <SubscriptionId>373337e2-50de-4ad8-b2be-0271148da7f4</SubscriptionId>
      <UpdatedDate>2024-09-17T09:59:57.0205052Z</UpdatedDate>
      <Webhook i:nil="true" />
    </SubscriptionResponseModel>
    <SubscriptionResponseModel>
      <CreatedDate>2024-08-17T09:59:57.0205052Z</CreatedDate>
      <DeliveryType>webhook</DeliveryType>
      <Domain>
        <Type>Site</Type>
        <Values>
          <SubscriptionResponseModelDomainValue>
            <Name>GSMKey</Name>
            <Value>57D0-7596-5311-48B7-9EB5</Value>
          </SubscriptionResponseModelDomainValue>
          <SubscriptionResponseModelDomainValue>
            <Name>SiteKey</Name>
            <Value>3BD8-1124-563F-4710-98C1</Value>
          </SubscriptionResponseModelDomainValue>
        </Values>
      </Domain>
      <EventTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>Endpoint.FileDetection</d4p1:string>
      </EventTypes>
      <SubscriptionId>f6fd444c-5380-4e6c-838e-9f42efd300ea</SubscriptionId>
      <UpdatedDate>2024-09-17T09:59:57.0205052Z</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>