Skip to main content

Read bookmarks

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=drill_bookmarks

Overview

Lists Drill bookmarks visible to the current member. Bookmarks store saved Drill query filters (query_obj) and projection keys (by_val) used by /o?method=segmentation.

Authentication

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

Permissions

Requires Read permission as evaluated by FEATURE_DEPENDENCIES (funnels, cohorts, users, drill, formulas).

Request Parameters

ParameterTypeRequiredDescription
methodStringYesMust be drill_bookmarks.
app_idStringYesTarget app ID.
event_keyStringConditionalUsed for event-level bookmark mode (app_level not set to 1). The server hashes app_id + event_key and matches stored event_app_id.
app_levelStringNoIf 1, returns app-level bookmarks by app_id; otherwise returns event-scoped bookmarks by event_app_id.
appsJSON String (Array)NoOptional app ID list when app_level=1; returns bookmarks where app_id is in this list.
namespaceStringNoNon-default namespace filter. If omitted or set to drill, only bookmarks without a stored namespace are returned.
only_countBoolean StringNoIf present, returns only the matching bookmark count instead of bookmark objects.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Examples

List event-scoped bookmarks

/o?method=drill_bookmarks&
app_id=64f5c0d8f4f7ac0012ab3456&
event_key=[CLY]_session

Get bookmark count

/o?method=drill_bookmarks&
app_id=64f5c0d8f4f7ac0012ab3456&
event_key=[CLY]_session&
only_count=true

List app-level bookmarks for multiple apps

/o?method=drill_bookmarks&
app_id=64f5c0d8f4f7ac0012ab3456&
app_level=1&
apps=["64f5c0d8f4f7ac0012ab3456","64f5c0d8f4f7ac0012ab7890"]

Response

Success Response

Bookmark list:

[
{
"_id": "67bd31c92e7f0b0012ab4567",
"app_id": "64f5c0d8f4f7ac0012ab3456",
"event_key": "[CLY]_session",
"name": "US iOS Sessions",
"desc": "Sessions for iOS users in US",
"global": false,
"creator": "64f5bf79f4f7ac0012ab1234",
"query_obj": "{\"up.cc\":\"US\",\"up.p\":\"ios\"}",
"query_text": "Country is US and platform is iOS",
"by_val": "[\"up.p\"]",
"by_val_text": "Platform",
"event_app_id": "2c2f0f9a..."
}
]

Count mode (only_count):

5

Response Fields

FieldTypeDescription
(root value)Array or NumberBookmark array or count depending on request mode.
_idStringBookmark ID. Present in list mode.
app_idStringApp ID the bookmark belongs to.
event_keyStringEvent key the bookmark belongs to.
nameStringBookmark name.
descStringBookmark description.
globalBooleanWhether the bookmark is visible beyond its creator.
creatorStringMember ID of the bookmark creator.
query_objStringSaved Drill query object JSON string. Uses the same shape as segmentation queryObject.
query_textStringHuman-readable query label.
by_valStringSaved projection key array JSON string, equivalent to segmentation projectionKey.
by_val_textStringHuman-readable projection label.
namespaceStringNon-default namespace, when stored. Default Drill bookmarks usually omit this field.
visualizationStringOptional visualization hint.
signStringDeterministic duplicate-detection signature.
event_app_idStringMD5 hash of app_id + event_key used for event-scoped lookup.

Error Responses

This endpoint does not define a dedicated structured error payload; error output can vary by failure path.

Behavior

  • Filters bookmarks by user visibility: globally visible bookmarks or bookmarks created by the current member.
  • Applies namespace and app/event scope rules.
  • Uses event_app_id hash for event-scoped bookmarks when app_level is not 1.
  • Returns a number instead of an array when only_count is provided.
Implementation details

Configuration Impact

SettingDefaultAffectsUser-visible impact
api.*Server API defaultsShared API execution controls (for example processing thresholds/limits).Changes to API-level controls can affect runtime behavior, limits, or response timing for this endpoint.

Database Collections

CollectionUsed forData touched by this endpoint
countly_drill.drill_bookmarksEndpoint data sourceStores endpoint-related records this endpoint reads or modifies.