Skip to main content

User Profiles - Events Table

Enterprise

This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.

Endpoint

/o?method=user_details&calculate=eventsTable

Overview

Returns per-user event table data with filtering and pagination.

Authentication

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions

  • User Profiles: Read permission.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or auth_token)API key authentication
auth_tokenStringYes (or api_key)Auth token authentication
app_idStringYesApp ID
methodStringYesMust be user_details
calculateStringYesMust be eventsTable
uidStringNoUser ID
didStringNoDevice ID alternative
periodStringNoRequested period
eventStringNoEvent filter (all, custom-events, or event key)
sessionString (JSON Object/String)NoSession filter
sSearchStringNoSearch filter
iDisplayStartNumberNoOffset
iDisplayLengthNumberNoPage size
limitNumberNoExplicit limit override
skipNumberNoExplicit skip override
cursorStringNoCursor pagination token (ClickHouse mode)
paginationModeStringNoCursor mode (snapshot or live)
dbOverrideStringNoQuery adapter override

Examples

/o?api_key=YOUR_API_KEY&app_id=YOUR_APP_ID&method=user_details&calculate=eventsTable&uid=u_102&period=30days&event=all&iDisplayStart=0&iDisplayLength=20
/o?api_key=YOUR_API_KEY&app_id=YOUR_APP_ID&method=user_details&calculate=eventsTable&uid=u_102&period=30days&event=purchase&dbOverride=clickhouse&paginationMode=snapshot

Response

Success Response

{
"sEcho": "1",
"iTotalRecords": 1245,
"iTotalDisplayRecords": 100,
"aaData": [
{
"ts": 1739557500,
"e": "purchase",
"c": {
"amount": 49.99,
"currency": "USD"
},
"dur": 250
}
]
}

Response Fields

FieldTypeDescription
sEchoStringEcho value for table requests
iTotalRecordsNumberTotal matched records
iTotalDisplayRecordsNumberDisplayed records
aaDataArrayEvent rows
hasNextPageBooleanReturned for cursor-based pagination
nextCursorStringCursor for next page

Error Responses

  • HTTP 400 - Query execution issue:
{
"result": "Error. Please check logs."
}

Behavior

  • Maps shorthand system event names (for example view, crash, survey) to internal keys.
  • Supports Mongo-like pagination and cursor pagination.
  • If endpoint returns error from backend query layer, response includes message wrapper.
Implementation details

Configuration Impact

SettingDefaultAffectsUser-visible impact
users.*User profile feature defaultsUser-details retrieval behavior in profile endpoints.Changes to user feature settings can affect which profile-related fields/aggregations are returned.

Database Collections

CollectionUsed forData touched by this endpoint
countly_drill.drill_eventsDrill event recordsStores granular event rows queried or updated by this endpoint.
countly.app_users{appId}Per-app user profilesStores user-level properties and profile fields affected by this endpoint.