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/808f9212-736b-4812-aa5b-85811e158dc9/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": "41a3b85c-d2a3-4136-9e19-618da6e48c9b",
  "Count": 2,
  "NextPosition": "lGbBAJVmwQAt2E3jaArbCCkJAAAAAAAANDFhM2I4NWMtZDJhMy00MTM2LTllMTktNjE4ZGE2ZTQ4Yzli",
  "MoreAvailable": false,
  "Notifications": [
    {
      "EventType": "WebThreatShield.UrlAction",
      "EventObjectName": "WtsUrlActionEvent",
      "UnityAPIEventId": "0014cb98-d0aa-4afe-9dd6-6e83e2b72fe4",
      "WtsUrlActionEvent": {
        "Timestamp": "2023-02-09T06:40:01.3585593Z",
        "GSMKey": null,
        "GSMConsoleName": null,
        "SiteKey": "54BD2A9D2C314BF1A20B",
        "SiteId": null,
        "SiteName": null,
        "MachineId": "D9262CEAE4174F4A82AA561260CAF631:::204587C1EF934B4E8ABC6028487E13C9:::204587C1EF934B4E8ABC6028487E13C9",
        "HostName": "MyComputer1",
        "PublicIP": "95.79.170.230",
        "BlockDetails": {
          "ActionTaken": "BLOCK",
          "BlockedUrl": "http://www.category-domain1.com",
          "BlockReasonId": 49,
          "BlockReasonName": "Keyloggers and Monitoring",
          "BCRI": 10
        }
      }
    },
    {
      "EventType": "Endpoint.FileDetection",
      "EventObjectName": "EndpointFileDetectionEvent",
      "UnityAPIEventId": "3b34c8f7-bfc5-4abc-8fc9-bf009c8566b2",
      "EndpointFileDetectionEvent": {
        "Timestamp": "2023-02-09T06:39:01Z",
        "GSMKey": "BB4E38DDC53C484E9F2B",
        "GSMConsoleName": "My Management Console",
        "SiteKey": "CFAEDCB7AD2249398663",
        "SiteId": "691c1c52-637c-fe11-4d33-1edde4dabcea",
        "SiteName": "My GSM Site 2",
        "MachineId": "38A22EB0E4DF4E5A9A8D11C959BFBDB3:::A4864B4339CB42D2A4E88087556FC6E5:::A4864B4339CB42D2A4E88087556FC6E5",
        "HostName": "MyComputer2",
        "PublicIP": "95.42.21.254",
        "ScanInfo": {
          "ScanId": "4e4baf89-cd16-406b-8b75-5e3f50c09acf",
          "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>lGbBAJVmwQAt2E3jaArbCCkJAAAAAAAANDFhM2I4NWMtZDJhMy00MTM2LTllMTktNjE4ZGE2ZTQ4Yzli</NextPosition>
  <SubscriptionId>41a3b85c-d2a3-4136-9e19-618da6e48c9b</SubscriptionId>
  <Notifications>
    <FetchSubscriptionNotificationsResponseModelNotification />
    <FetchSubscriptionNotificationsResponseModelNotification />
  </Notifications>
</FetchSubscriptionNotificationsResponseModel>