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/e7d36180-c8c9-443b-a1c9-419acde8353c/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": "5bbf5c2e-9ae7-4523-95c3-e44fb1056647",
  "Count": 2,
  "NextPosition": "gn_jaIN_42j2ighd4yHdCCkJAAAAAAAANWJiZjVjMmUtOWFlNy00NTIzLTk1YzMtZTQ0ZmIxMDU2NjQ3",
  "MoreAvailable": false,
  "Notifications": [
    {
      "EventType": "WebThreatShield.UrlAction",
      "EventObjectName": "WtsUrlActionEvent",
      "UnityAPIEventId": "e23397e4-0549-490e-9e1a-8319b9da9cb3",
      "WtsUrlActionEvent": {
        "Timestamp": "2024-12-21T17:13:30.2427508Z",
        "GSMKey": null,
        "GSMConsoleName": null,
        "SiteKey": "2EB0BAAF887F4C749AAF",
        "SiteId": null,
        "SiteName": null,
        "MachineId": "EE71F0460FEF475DB89F4E51EB354CEA:::5B057B2D04B94A5F9EF55BFD6B9D933F:::5B057B2D04B94A5F9EF55BFD6B9D933F",
        "HostName": "MyComputer1",
        "PublicIP": "95.159.123.98",
        "BlockDetails": {
          "ActionTaken": "BLOCK",
          "BlockedUrl": "http://www.category-domain1.com",
          "BlockReasonId": 49,
          "BlockReasonName": "Keyloggers and Monitoring",
          "BCRI": 10
        }
      }
    },
    {
      "EventType": "Endpoint.FileDetection",
      "EventObjectName": "EndpointFileDetectionEvent",
      "UnityAPIEventId": "ca4359cf-bae6-4782-8d9e-cc2644b1417a",
      "EndpointFileDetectionEvent": {
        "Timestamp": "2024-12-21T17:12:30Z",
        "GSMKey": "55910EFE24AF4F619D74",
        "GSMConsoleName": "My Management Console",
        "SiteKey": "1AD487A4B2BB4CC68E74",
        "SiteId": "691c1c52-637c-fe11-4d33-1edde4dabcea",
        "SiteName": "My GSM Site 2",
        "MachineId": "3DB120D58747457095FF9FB9183BAF8B:::50D4883BC4CB4238BFDE12E406CB378C:::50D4883BC4CB4238BFDE12E406CB378C",
        "HostName": "MyComputer2",
        "PublicIP": "95.125.195.178",
        "ScanInfo": {
          "ScanId": "ec2caf0c-78c5-4487-93ed-dff4e833ee87",
          "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>gn_jaIN_42j2ighd4yHdCCkJAAAAAAAANWJiZjVjMmUtOWFlNy00NTIzLTk1YzMtZTQ0ZmIxMDU2NjQ3</NextPosition>
  <SubscriptionId>5bbf5c2e-9ae7-4523-95c3-e44fb1056647</SubscriptionId>
  <Notifications>
    <FetchSubscriptionNotificationsResponseModelNotification />
    <FetchSubscriptionNotificationsResponseModelNotification />
  </Notifications>
</FetchSubscriptionNotificationsResponseModel>