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": "2f54df7d-eac0-4f98-bce2-38a3cc8d4e20",
      "DeliveryType": "fetch",
      "Domain": {
        "Type": "Site",
        "Values": [
          {
            "Name": "GSMKey",
            "Value": "7C6C-6F60-6A18-4FBB-9143"
          },
          {
            "Name": "SiteKey",
            "Value": "2C3D-791F-8693-499A-B64D"
          }
        ]
      },
      "EventTypes": [
        "Endpoint.FileDetection"
      ],
      "Webhook": null,
      "CreatedDate": "2024-01-25T18:03:52.2157364Z",
      "UpdatedDate": "2024-02-25T18:03:52.2157364Z"
    },
    {
      "SubscriptionId": "dc3e26ba-b6ab-491b-9e01-ad4eaeafc1a7",
      "DeliveryType": "webhook",
      "Domain": {
        "Type": "Site",
        "Values": [
          {
            "Name": "GSMKey",
            "Value": "D59C-A61E-F8A8-492E-B742"
          },
          {
            "Name": "SiteKey",
            "Value": "DAC0-A843-B23F-4783-B622"
          }
        ]
      },
      "EventTypes": [
        "Endpoint.FileDetection"
      ],
      "Webhook": {
        "DeliveryContext": "MyCustomCorrelationString",
        "DeliveryRateInSeconds": 90,
        "DeliveryUrl": "https://my.company.com/wrunity/notifications/webhook",
        "Suspended": false,
        "Statistics": null
      },
      "CreatedDate": "2024-01-25T18:03:52.2157364Z",
      "UpdatedDate": "2024-02-25T18:03:52.2157364Z"
    }
  ]
}                    
<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-01-25T18:03:52.2157364Z</CreatedDate>
      <DeliveryType>fetch</DeliveryType>
      <Domain>
        <Type>Site</Type>
        <Values>
          <SubscriptionResponseModelDomainValue>
            <Name>GSMKey</Name>
            <Value>7C6C-6F60-6A18-4FBB-9143</Value>
          </SubscriptionResponseModelDomainValue>
          <SubscriptionResponseModelDomainValue>
            <Name>SiteKey</Name>
            <Value>2C3D-791F-8693-499A-B64D</Value>
          </SubscriptionResponseModelDomainValue>
        </Values>
      </Domain>
      <EventTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>Endpoint.FileDetection</d4p1:string>
      </EventTypes>
      <SubscriptionId>2f54df7d-eac0-4f98-bce2-38a3cc8d4e20</SubscriptionId>
      <UpdatedDate>2024-02-25T18:03:52.2157364Z</UpdatedDate>
      <Webhook i:nil="true" />
    </SubscriptionResponseModel>
    <SubscriptionResponseModel>
      <CreatedDate>2024-01-25T18:03:52.2157364Z</CreatedDate>
      <DeliveryType>webhook</DeliveryType>
      <Domain>
        <Type>Site</Type>
        <Values>
          <SubscriptionResponseModelDomainValue>
            <Name>GSMKey</Name>
            <Value>D59C-A61E-F8A8-492E-B742</Value>
          </SubscriptionResponseModelDomainValue>
          <SubscriptionResponseModelDomainValue>
            <Name>SiteKey</Name>
            <Value>DAC0-A843-B23F-4783-B622</Value>
          </SubscriptionResponseModelDomainValue>
        </Values>
      </Domain>
      <EventTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>Endpoint.FileDetection</d4p1:string>
      </EventTypes>
      <SubscriptionId>dc3e26ba-b6ab-491b-9e01-ad4eaeafc1a7</SubscriptionId>
      <UpdatedDate>2024-02-25T18:03:52.2157364Z</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>