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
Name | Description | Type | Additional 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/80927cdd-4e3e-48b3-ba94-c892b071c5b6/fetch?position=GRVnChgVZwoy0VvprDPYCJs-AAAAAAAAYzg0MjViMzgtMzg3MS00NWQ5LTk5MGYtZGY4YzhmMjE4NTk4
|
Body Parameters
None.
Response Information
Resource Description
List of notifications about latest events that have occurred.
FetchSubscriptionNotificationsResponseModelName | Description | Type | Additional 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": "2bdd61ef-ce9f-4de6-8cf2-bb667852ad65", "Count": 2, "NextPosition": "gcvoFIDL6BQZyuVESBLdCCkJAAAAAAAAMmJkZDYxZWYtY2U5Zi00ZGU2LThjZjItYmI2Njc4NTJhZDY1", "MoreAvailable": false, "Notifications": [ { "EventType": "WebThreatShield.UrlAction", "EventObjectName": "WtsUrlActionEvent", "UnityAPIEventId": "ff3d1c39-e52b-4534-80c8-56c0ee5792d1", "WtsUrlActionEvent": { "Timestamp": "2024-12-01T20:36:54.64534Z", "GSMKey": null, "GSMConsoleName": null, "SiteKey": "BFD78AFB523D47F69E07", "SiteId": null, "SiteName": null, "MachineId": "754E8522C6EC44D39875C5C8B1DAB2B0:::9D9114850F554CEBBB6017682FCD869E:::9D9114850F554CEBBB6017682FCD869E", "HostName": "MyComputer1", "PublicIP": "95.218.221.38", "BlockDetails": { "ActionTaken": "BLOCK", "BlockedUrl": "http://www.category-domain1.com", "BlockReasonId": 49, "BlockReasonName": "Keyloggers and Monitoring", "BCRI": 10 } } }, { "EventType": "Endpoint.FileDetection", "EventObjectName": "EndpointFileDetectionEvent", "UnityAPIEventId": "b4721529-c9cd-4091-be37-d6838f7ccb37", "EndpointFileDetectionEvent": { "Timestamp": "2024-12-01T20:35:55Z", "GSMKey": "277EB800EE594F7FAC23", "GSMConsoleName": "My Management Console", "SiteKey": "CD6CBF74B50A44F1BC4B", "SiteId": "691c1c52-637c-fe11-4d33-1edde4dabcea", "SiteName": "My GSM Site 2", "MachineId": "510B4277E2494260844CA7C417F10BEB:::7BCE5930D9154B7B96835752D172BF62:::7BCE5930D9154B7B96835752D172BF62", "HostName": "MyComputer2", "PublicIP": "95.116.239.137", "ScanInfo": { "ScanId": "2ce3c192-e022-40c0-8cdd-647c5996414e", "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>gcvoFIDL6BQZyuVESBLdCCkJAAAAAAAAMmJkZDYxZWYtY2U5Zi00ZGU2LThjZjItYmI2Njc4NTJhZDY1</NextPosition> <SubscriptionId>2bdd61ef-ce9f-4de6-8cf2-bb667852ad65</SubscriptionId> <Notifications> <FetchSubscriptionNotificationsResponseModelNotification /> <FetchSubscriptionNotificationsResponseModelNotification /> </Notifications> </FetchSubscriptionNotificationsResponseModel>