Skip to main content

Read event segment metadata

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/data-manager/event-segment

Overview

Returns segment metadata per event, including status/required/description and latest audit info.

Authentication

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

Permissions

Requires data_manager Read permission.

Request Parameters

ParameterTypeRequiredDescription
app_idStringYesTarget app ID.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Examples

/o/data-manager/event-segment?
app_id=64f5c0d8f4f7ac0012ab3456

Response

Success Response

[
{
"_id": "purchase",
"sg": [
{
"name": "country",
"type": "s",
"status": "approved",
"required": false,
"description": "Country code"
}
]
}
]

Response Fields

FieldTypeDescription
[]ArrayArray of events with grouped segment metadata (sg).
[].sg[].nameStringSegment key.
[].sg[].typeStringSegment type.
[].sg[].statusStringSegment status when present.
[].sg[].requiredBooleanSegment required flag when present.
[].sg[].descriptionStringSegment description when present.
[].sg[].auditObjectLatest audit info (if found).

Error Responses

  • 500
{
"result": "Error"
}

Behavior

  • Aggregates event segment metadata from countly_drill.drill_meta.
  • Enriches segments with audit info from countly.systemlogs and countly.members.
  • Adds masking metadata from app masking config when present.
Implementation details

Audit & System Logs

  • This endpoint does not emit /systemlogs actions.

Database Collections

CollectionUsed forData touched by this endpoint
countly_drill.drill_metaPrimary source for event segment metadataReads event and segment definitions, including status/type/required fields.
countly.systemlogsAudit enrichment sourceReads latest segment/event-related system log entries to attach audit metadata.
countly.membersUser-name enrichment sourceReads member names for user_id values found in audit logs.
countly.appsMasking enrichment sourceReads app masking configuration to annotate masked segments in the response.