GET /service/api/notifications/subscriptions/{subscriptionId}/fetch
 ?position={position}

Retrieves the latest notifications for a specific subscription.

This call returns notifications for a subscription in chronologic order as they become available, from earliest to newest notification.

Each call provides up to 1000 notifications. In each subsequent call, specify the NextPosition value from the previous response in the position query parameter. Please keep in mind that a position can only be used with its associated subscription. It is the responsibility of the caller to keep track of their subscriptions' position values and pass them in accordingly.

The response also provides an indication whether more notifications are available for the subscription. It is legitimate to immediately fetch subsequent notifications in that case, otherwise do not poll for notifications in very high frequency.

Event notifications are only stored for a certain number of days. If older notifications are not fetched in due time, they will be discarded.

Request Information

URI Parameters

NameDescriptionTypeAdditional Information
subscriptionId

The identifier of the subscription to fetch notifications associated with it.

string

Required

position

The position received from a previous request of this API function or from a GeneratePosition call (see here) to obtain subsequent notifications.

string

Required

URI Sample(s)

GET
https://unityapi.webrootcloudav.com/service/api/notifications/subscriptions/dc956d51-4f8e-4794-bf1b-a5201ba2545e/fetch?position=GRVnChgVZwoy0VvprDPYCJs-AAAAAAAAYzg0MjViMzgtMzg3MS00NWQ5LTk5MGYtZGY4YzhmMjE4NTk4

Body Parameters

None.

Response Information

Resource Description

List of notifications about latest events that have occurred.

FetchSubscriptionNotificationsResponseModel
NameDescriptionTypeAdditional Information
SubscriptionId

The identifier of the subscription the notifications are associated with.

string

None.

Count

The number of notifications fetched.

integer

None.

NextPosition

The position to specify in follow-up requests for retrieving additional available notifications.

string

In case there are no new notifications available beyond the value specified in the position request parameter, this value can be the same as the one passed in the request.

MoreAvailable

Value indicating whether there are more notifications available for the subscription than provided in the response.

boolean

None.

Notifications

List of available notifications based on the provided position value.

Collection of FetchSubscriptionNotificationsResponseModelNotification

None.

Sample Response

{
  "SubscriptionId": "dde54936-5c22-42de-9d8c-7046bcc59f58",
  "Count": 2,
  "NextPosition": "BHROLwV0Ti9sGJHXhE_cCCkJAAAAAAAAZGRlNTQ5MzYtNWMyMi00MmRlLTlkOGMtNzA0NmJjYzU5ZjU4",
  "MoreAvailable": false,
  "Notifications": [
    {
      "EventType": "WebThreatShield.UrlAction",
      "EventObjectName": "WtsUrlActionEvent",
      "UnityAPIEventId": "72816bab-3e1b-42df-a39c-eef2eb9e5ea8",
      "WtsUrlActionEvent": {
        "Timestamp": "2024-03-29T00:09:50.9437032Z",
        "GSMKey": null,
        "GSMConsoleName": null,
        "SiteKey": "4EC95E1C4E0B4C64B2B0",
        "SiteId": null,
        "SiteName": null,
        "MachineId": "0CB5506E63494DEB88CA70C0BF81CC2B:::3D55B6BF9CA24CC7A9FDA0B637A5672A:::3D55B6BF9CA24CC7A9FDA0B637A5672A",
        "HostName": "MyComputer1",
        "PublicIP": "95.227.227.28",
        "BlockDetails": {
          "ActionTaken": "BLOCK",
          "BlockedUrl": "http://www.category-domain1.com",
          "BlockReasonId": 64,
          "BlockReasonName": "Illegal",
          "BCRI": 10
        }
      }
    },
    {
      "EventType": "Endpoint.FileDetection",
      "EventObjectName": "EndpointFileDetectionEvent",
      "UnityAPIEventId": "8fb2a4be-a8a9-4f33-a602-317578fa3110",
      "EndpointFileDetectionEvent": {
        "Timestamp": "2024-03-29T00:08:51Z",
        "GSMKey": "0EA1E33E12A94294A540",
        "GSMConsoleName": "My Management Console",
        "SiteKey": "E34DF36C65CD4988AB73",
        "SiteId": "691c1c52-637c-fe11-4d33-1edde4dabcea",
        "SiteName": "My GSM Site 2",
        "MachineId": "DDD2C620C57A474087243E86505F79B6:::488F09B425224E579F8DFB262548CE1A:::488F09B425224E579F8DFB262548CE1A",
        "HostName": "MyComputer2",
        "PublicIP": "95.195.125.107",
        "ScanInfo": {
          "ScanId": "ee9cba12-1197-4cca-9ddb-a82478a6fc41",
          "ScanType": "RT"
        },
        "DetectionInfo": {
          "FileName": "eicar.com",
          "FilePath": "c:\\users\\user2\\desktop",
          "FileSize": 68,
          "FileMD5": "44d88612fea8a8f36de82e1278abb02f",
          "FileSHA256": "275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f",
          "Determination": "B",
          "MalwareGroup": "Anti-Malware Testfile"
        }
      }
    }
  ]
}                    
<FetchSubscriptionNotificationsResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.Notifications.Models">
  <Count>2</Count>
  <MoreAvailable>false</MoreAvailable>
  <NextPosition>BHROLwV0Ti9sGJHXhE_cCCkJAAAAAAAAZGRlNTQ5MzYtNWMyMi00MmRlLTlkOGMtNzA0NmJjYzU5ZjU4</NextPosition>
  <SubscriptionId>dde54936-5c22-42de-9d8c-7046bcc59f58</SubscriptionId>
  <Notifications>
    <FetchSubscriptionNotificationsResponseModelNotification />
    <FetchSubscriptionNotificationsResponseModelNotification />
  </Notifications>
</FetchSubscriptionNotificationsResponseModel>