Jump to: navigation, search

Query events by identity

Description

This method retrieves the events associated with a given identity.

Request

Method GET
URL /identities/${identityId}/events
Parameters
Name Value Mandatory Description
${identityId} string yes Identity identifier.
age integer no The maximum age for the event, in seconds. Older events are not be returned.
eventName string no Event name.
eventType string no Event type.
category string or "all categories" no Category name or the "all categories" key, which means that the results include any event associated with a category or a combination of categories.
url string no Event URL.
globalVisitID string no Associated global Visit ID.

Response

The History REST API answers with HTTP codes for every request. The following table shows the correct response for a successful request. See HTTP Response Codes and Errors for further details on the possible codes that this request can return.

HTTP code 200
HTTP Title OK
Body  JSON Array of Event resources.

Examples

Activating Paging

The following example retrieves the first three events for the 'user@genesyslab.com' Identity.

Request

GET http://127.0.0.1:9081/server/data/identities/user@genesyslab.com/events?page_size=3

Response

HTTP/1.1 200 OK
Date: Thu, 13 Dec 2012 14:26:47 GMT
Content-Type: application/json; charset=UTF-8
Date: Thu, 13 Dec 2012 14:26:47 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/2.1.0
Paging-Next: user@genesyslab.com#1354798334842#c2994560-3fa3-11e2-aee5-00505625a04f
Content-Length: 1508
[{"eventID":"5cdca781-3fa3-11e2-aee5-00505625a04f",
"category":"","eventType":"SYSTEM","eventName":"UserInfo",
"serverTimestamp":1354798164472,
"browserPageID":"2D869014426A4CAA8FA5C0D7B8668D0A",
"globalVisitID":"c93a19a1-45db-4d59-9c85-b637daea4a20",
"url":"http://www.genesyslab.com/afu_FLS_intermediary.page?returnUrl=/?",
"timestamp":1354798163915,"visitID":"f24c60f6-0728-4f3d-b8b4-1e7bad2dc8a3",
"pageID":"5c911f90-3fa3-11e2-aee5-00505625a04f",
"data":{"userID":"user@genesyslab.com","sex":"male","name":"user1","age":30}},
{"eventID":"62a62150-3fa3-11e2-aee5-00505625a04f",
"category":"","eventType":"BUSINESS","eventName":"Timeout-10","serverTimestamp":1354798174181,
"browserPageID":"2D869014426A4CAA8FA5C0D7B8668D0A","globalVisitID":"c93a19a1-45db-4d59-9c85-b637daea4a20","url":"http://www.genesyslab.com/afu_FLS_intermediary.page?returnUrl=/%3f",
"timestamp":1354798174090,"visitID":"f24c60f6-0728-4f3d-b8b4-1e7bad2dc8a3",
"pageID":"5c911f90-3fa3-11e2-aee5-00505625a04f","data":{}},
{"eventID":"6e920a60-3fa3-11e2-aee5-00505625a04f","category":"",
"eventType":"BUSINESS","eventName":"Timeout-30","serverTimestamp":1354798194182,
"browserPageID":"2D869014426A4CAA8FA5C0D7B8668D0A",
"globalVisitID":"c93a19a1-45db-4d59-9c85-b637daea4a20",
"url":"http://www.genesyslab.com/afu_FLS_intermediary.page?returnUrl=/%3f",
"timestamp":1354798194128,"visitID":"f24c60f6-0728-4f3d-b8b4-1e7bad2dc8a3",
"pageID":"5c911f90-3fa3-11e2-aee5-00505625a04f","data":{}}]

Retrieving the next page of results

The following request uses the Paging-Next header parameter of the previous response ( user@genesyslab.com#1354798334842#c2994560-3fa3-11e2-aee5-00505625a04f) to retrieve the next three events.
Request

GET http://127.0.0.1:9081/server/data/identities/user@genesyslab.com/events?page_size=3
&page_value="user@genesyslab.com#1354798334842#c2994560-3fa3-11e2-aee5-00505625a04f"&next=true

Response

HTTP/1.1 200 OK
Date: Thu, 13 Dec 2012 14:35:11 GMT
Content-Type: application/json; charset=UTF-8
Date: Thu, 13 Dec 2012 14:35:11 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/2.1.0
Paging-Next: pat.thompsom@genesyslab.com#1355325030949#11ed4570-446e-11e2-bfd2-00505625a04f
Paging-Prev: "user@genesyslab.com10135479833484210c2994560-3fa3-11e2-aee5-00505625a04f"
Content-Length: 1507
[{"eventID":"03956571-446e-11e2-bfd2-00505625a04f","category":"Internet","eventType":"SYSTEM","eventName":"SignIn",
"serverTimestamp":1355325007175,"browserPageID":"7FA47396264C4F6A8FED4F4E9710B0C4",
"globalVisitID":"66c0976d-cbdd-4e94-accb-26093803cf54",
"url":"http://www.genesyslab.com/catalogue-topic/t_new_internet_options.page?",
"timestamp":1355325006715,
"visitID":"42788a69-785d-4860-be39-45048d32441c",
"pageID":"f57b03a0-446d-11e2-bfd2-00505625a04f",
"data":{"userID":"pat.thompsom@genesyslab.com"}},
{"eventID":"072fa330-446e-11e2-bfd2-00505625a04f",
"category":"Internet",
"eventType":"BUSINESS","eventName":"Timeout-30",
"serverTimestamp":1355325013219,
"browserPageID":"7FA47396264C4F6A8FED4F4E9710B0C4",
"globalVisitID":"66c0976d-cbdd-4e94-accb-26093803cf54",
"url":"http://www.genesyslab.com/catalogue-topic/t_new_internet_options.page?",
"timestamp":1355325013148,
"visitID":"42788a69-785d-4860-be39-45048d32441c",
"pageID":"f57b03a0-446d-11e2-bfd2-00505625a04f",
"data":{}},
{"eventID":"0fbe5780-446e-11e2-bfd2-00505625a04f",
"category":"Internet","eventType":"SYSTEM",
"eventName":"PageExited","serverTimestamp":1355325027576,
"browserPageID":"7FA47396264C4F6A8FED4F4E9710B0C4",
"globalVisitID":"66c0976d-cbdd-4e94-accb-26093803cf54",
"url":"http://www.genesyslab.com/catalogue-topic/t_new_internet_options.page?",
"timestamp":1355325027495,
"visitID":"42788a69-785d-4860-be39-45048d32441c",
"pageID":"f57b03a0-446d-11e2-bfd2-00505625a04f",
"data":{}}]
This page was last edited on March 10, 2020, at 13:56.
Comments or questions about this documentation? Contact us for support!