This web service retrieves user events for analytics purposes.
- It is necessary to provide an
Ft-Calling-Appvalue when using Fluid Topics web services. See Fluid Topics calling app. - To avoid issues caused by server overload, schedule a daily routine to retrieve events from the previous 24 hours (GMT).
Use the Events count web service to retrieve the number of events logged for a selected period.
| Method | Endpoint |
|---|---|
POST |
|
Request example
The following example shows a JSON request body for this web service:
{
"startDate": "2024-01-01",
"endDate": "2024-01-02",
"filters": {
"name": [
"khub.search"
],
"user": {
"realm": [
"internal",
"Keycloak"
],
"group": [
"ft:administrator",
"TechWriter"
],
"role": [
"FEEDBACK_USER"
]
}
},
"paging": {
"page": 1,
"perPage": 1
},
"sortOrder": "latestFirst"
}
| Field | Type | Required? | Description |
|---|---|---|---|
startDate |
String | Yes | The inclusive start date of the period. Its format can be YYYY-mm-dd, YYYY-mm-ddTHH:MM or YYYY-mm-ddTHH:MM:SS. For more information about date and time formats, see Timestamps. The value must be within the analytics data retention period. |
endDate |
String | No | The exclusive end date of the period. Must be later than the startDate. If not provided, its value is the GMT date and time of the request. Its format can be YYYY-MM-DD, YYYY-MM-DDTHH:MM or YYYY-MM-DDTHH:MM:SS. For more information about date and time formats, see Timestamps. It is mandatory to keep the end date within 24 hours of the start date to avoid server overload. The value must be within the analytics data retention period. |
filters |
Object | No | An object to filter on only some events. |
name |
Array | No | A list of analytics events. |
user |
Object | No | Optional information to filter on only the users whose activity generated the events. |
id |
Array | No | A list of user IDs. See the List users or Search users web services to find a user's ID. It is also possible to get a user's ID from the Manage users menu. |
realm |
Array | No | A list of user realms. |
group |
Array | No | A list of user groups. |
role |
Array | No | A list of user roles. |
paging |
Object | No | An object to apply paging to the results. |
page |
Number | Yes | The page to display. Starts at one. Required if using the paging parameter. |
perPage |
Number | Yes | The number of results to display per page. Required if using the paging parameter. The maximum allowed value is 5000. |
sortOrder |
String | No | The order of results. Accepted values are LatestFirst and OldestFirst. |
Response body
The following example shows a JSON response body for this web service:
{
"startDate": "2024-01-01T00:00:00",
"endDate": "2024-01-02T00:00:00",
"paging": {
"page": 1,
"perPage": 1,
"totalCount": 4329,
"lastPage": false
},
"results": [
{
"appName": "ft/turnkey-portal",
"appVersion": "4.3.32",
"contentLocale": "en-US",
"datetime": 1714487636947,
"id": "f0c7a781-8956-492c-8961-60fcefca2328",
"name": "khub.search",
"offline": false,
"parameters": {
"searchQuery": {
"terms": "Keyword or semantic search",
"facets": [
{
"key": "Version_FT",
"values": [
"Latest"
]
}
],
"searchType": "EVERYWHERE"
},
"searchResponse": {
"autocorrect": false,
"nbResults": 1261
}
},
"sessionId": "dc439e78-9f84-4a37-a5ae-95e040b550c1",
"tenantId": "documentation-docft-stable",
"uiLocale": "en-US",
"user": {
"realm": [
"internal",
"Keycloak"
],
"groups": [
"ft:administrator",
"antidot",
"nda_basic",
"ft:authenticated",
"nda_advanced"
],
"id": "a95f015f-bddc-4f6d-8719-171e3510b304",
"roles": [
"PERSONAL_BOOK_SHARE_USER",
"PDF_EXPORT_USER",
"PERSONAL_BOOK_USER",
"OFFLINE_USER",
"FEEDBACK_USER",
"ANALYTICS_USER",
"RATING_USER",
"GENERATIVE_AI_USER",
"ADMIN",
"PRINT_USER",
"COLLECTION_USER",
"HTML_EXPORT_USER",
"SAVED_SEARCH_USER"
]
},
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
"userIp": "10.60.1.38"
}
]
}
| Field | Type | Description |
|---|---|---|
startDate |
String | The inclusive start date of the period. |
endDate |
String | The exclusive end date of the period. For information about date and time formats, see Timestamps. |
paging |
Object | An optional element that applies paging to the results. |
page |
Number | The current page of results. |
perPage |
Number | The number of results per page. |
lastPage |
Boolean | Value is true if the current page is the last page. |
results |
Array | Information about the events retrieved. |
appName |
String | The name of the application that sent the event. |
appVersion |
String | The version of the application that sent the event. |
contentLocale |
String | The content language configured for the portal at the time of the event. |
datetime |
String | The timestamp of the event, expressed as a UNIX timestamp. |
id |
String | The event's unique identifier. |
name |
String | The name of the event. |
offline |
Boolean | Value is true if the event was generated in Offline mode. |
parameters |
Object | Data collected by the event. |
sessionId |
String | The session identifier. |
tenantId |
String | The tenant identifier. |
uiLocale |
String | The interface language configured for the portal at the time of the event. |
user |
Array | Information about the user who triggered the event. |
id |
String | The user's unique identifier. |
realm |
String | The realm to which the user belongs. |
groups |
Array | The groups to which the user belongs. |
roles |
Array | The user's roles. |
userAgent |
String | The user agent. |
userIp |
String | The user's IP address. |
| Return code | Description |
|---|---|
200 OK |
Returns zero or more results. |
400 BAD REQUEST |
One or more required parameters is missing. |
401 UNAUTHORIZED |
The authorization header was not provided or is invalid. |
For a comprehensive list of all possible return codes, see Return codes.