Skip to main content

Export event schema as CSV

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

/i/data-manager/export-schema

Overview

Exports app event and segment schema as a CSV document.

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

/i/data-manager/export-schema?
app_id=64f5c0d8f4f7ac0012ab3456

Response

Success Response

Event Name,Event Description,Event Category,#of Segments,Segment Name,Segment Description,Segment Type,Segment Status,Segment Required,Segment List Options,Segment Regex
purchase,Purchase event,Revenue,2,country,,String,active,true,,
purchase,Purchase event,Revenue,2,amount,,Number,active,false,,

Note: the endpoint returns raw CSV body (text/csv) via common.returnRaw(...), not JSON.

Response Fields

FieldTypeDescription
CSV rowsTextExported event/segment schema table.

Error Responses

  • 500
{
"result": "Error"
}

Behavior

  • Builds event map from countly.events and countly_drill.drill_meta.
  • Joins category names from countly.event_categories.
  • Expands segment rows (including list options when available).
  • Returns CSV with Content-Type: text/csv.

Operational Considerations

  • Export performs metadata joins across events, drill meta, and categories, then renders CSV in-memory.
  • Large event catalogs with many segments can produce large response bodies.
Implementation details

Audit & System Logs

  • This endpoint does not emit /systemlogs actions.

Database Collections

CollectionUsed forData touched by this endpoint
countly.eventsBase schema sourceReads app event list/map/segment index used to build exported rows.
countly_drill.drill_metaExtended event/segment metadata sourceReads status/type/regex/list-value metadata merged into CSV rows.
countly.event_categoriesCategory-name lookupResolves event category IDs to display names in export output.