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
| Parameter | Type | Required | Description |
|---|---|---|---|
app_id | String | Yes | Target app ID. |
api_key | String | Conditional | Required if auth_token is not provided. |
auth_token | String | Conditional | Required 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
| Field | Type | Description |
|---|---|---|
| CSV rows | Text | Exported event/segment schema table. |
Error Responses
500
{
"result": "Error"
}
Behavior
- Builds event map from
countly.eventsandcountly_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.
Related Endpoints
Implementation details
Audit & System Logs
- This endpoint does not emit
/systemlogsactions.
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly.events | Base schema source | Reads app event list/map/segment index used to build exported rows. |
countly_drill.drill_meta | Extended event/segment metadata source | Reads status/type/regex/list-value metadata merged into CSV rows. |
countly.event_categories | Category-name lookup | Resolves event category IDs to display names in export output. |