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/d06b7094-202a-476f-bb03-b041eb1238fa/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": "41e824d7-f9ff-43ab-8c4b-60c336971d92", "Count": 2, "NextPosition": "yeTLHsjkyx5DBZIBUQfdCCkJAAAAAAAANDFlODI0ZDctZjlmZi00M2FiLThjNGItNjBjMzM2OTcxZDky", "MoreAvailable": false, "Notifications": [ { "EventType": "WebThreatShield.UrlAction", "EventObjectName": "WtsUrlActionEvent", "UnityAPIEventId": "e49dd90c-7592-4df2-a36d-68817c6c7a0a", "WtsUrlActionEvent": { "Timestamp": "2024-11-17T21:42:15.6364395Z", "GSMKey": null, "GSMConsoleName": null, "SiteKey": "360D56209B2E44B98406", "SiteId": null, "SiteName": null, "MachineId": "EACDC77007734EC9A348CE766C0C14BF:::355CDE5F8E504ED9864C60546783EADF:::355CDE5F8E504ED9864C60546783EADF", "HostName": "MyComputer1", "PublicIP": "95.22.110.238", "BlockDetails": { "ActionTaken": "BLOCK", "BlockedUrl": "http://www.category-domain1.com", "BlockReasonId": 11, "BlockReasonName": "Adult and Pornography", "BCRI": 10 } } }, { "EventType": "Endpoint.FileDetection", "EventObjectName": "EndpointFileDetectionEvent", "UnityAPIEventId": "5000112b-65c3-405d-b3ad-8575768a81fe", "EndpointFileDetectionEvent": { "Timestamp": "2024-11-17T21:41:16Z", "GSMKey": "A31D6BE0A0644FE1AF07", "GSMConsoleName": "My Management Console", "SiteKey": "3431C241643B41E0BB96", "SiteId": "691c1c52-637c-fe11-4d33-1edde4dabcea", "SiteName": "My GSM Site 2", "MachineId": "F03C9427205A4B83B9AA9589EB00C8BB:::21E325AC033840BB9203FEFCA1C72184:::21E325AC033840BB9203FEFCA1C72184", "HostName": "MyComputer2", "PublicIP": "95.165.77.211", "ScanInfo": { "ScanId": "f81a8850-d1d9-45be-887c-4386bc0368e7", "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>yeTLHsjkyx5DBZIBUQfdCCkJAAAAAAAANDFlODI0ZDctZjlmZi00M2FiLThjNGItNjBjMzM2OTcxZDky</NextPosition> <SubscriptionId>41e824d7-f9ff-43ab-8c4b-60c336971d92</SubscriptionId> <Notifications> <FetchSubscriptionNotificationsResponseModelNotification /> <FetchSubscriptionNotificationsResponseModelNotification /> </Notifications> </FetchSubscriptionNotificationsResponseModel>