Skip to main content

Data Transformations - Read Rules

Enterprise Only This API is available exclusively in Countly Enterprise.

Endpoint

/o/data-manager/transformation

Overview

Returns transformation rules for the app, enriched with latest audit information per rule ID.

Authentication

Countly API supports three authentication methods:

  1. API key query parameter: api_key=YOUR_API_KEY
  2. Auth token query parameter: auth_token=YOUR_AUTH_TOKEN
  3. Auth token header: countly-token: YOUR_AUTH_TOKEN

Permissions

Requires data_manager_transformations 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.

Parameter Semantics

FieldExpected valuesBehavior
app_idValid app IDLimits the response to transformation rules owned by that app.

Response

Success Response

[
{
"_id": "67b860e39f2d3e0012ab9c44",
"app": "64f5c0d8f4f7ac0012ab3456",
"actionType": "SEGMENT_RENAME",
"status": "ENABLED",
"transformResult": "country",
"transformTarget": ["country_code"],
"audit": {
"_id": "67b860e39f2d3e0012ab9c44",
"user_id": "64f5be9bf4f7ac0012ab3001",
"ts": 1739599800,
"userName": "Jane Doe"
}
}
]

Response Fields

FieldTypeDescription
[]ArrayTransformation documents for the app.
[] ._idStringTransformation ID.
[] .appStringApp ID owner.
[] .actionTypeStringInternal action type constant (for example SEGMENT_RENAME).
[] .statusStringRule status (ENABLED or DISABLED).
[] .transformResultStringTarget name/value of transformation.
[] .transformTargetArraySource fields/events affected by transformation.
[] .auditObjectLatest matching audit info from system logs (if found).

Error Responses

  • 500
{
"result": "Error"
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Read transformationsAlwaysLoads rules from countly.datamanager_transforms, enriches with latest systemlog action for each rule ID, resolves member names.Array of transformation objects

Impact on Other Data

  • Read-only endpoint; no write/update side effects.

Audit & System Logs

This endpoint does not write logs. It reads audit data from countly.systemlogs actions:

  • dm-transformation
  • dm-transformation-edit
  • dm-toggle-status

Database Collections

CollectionUsed forData touched by this endpoint
countly.datamanager_transformsPrimary rule sourceReads transformation rule documents for the target app.
countly.systemlogsAudit enrichment sourceReads latest transformation-related actions per rule ID.
countly.membersUser-name enrichment sourceResolves systemlog user_id values to member full names for audit.userName.

Examples

/o/data-manager/transformation?
app_id=64f5c0d8f4f7ac0012ab3456

Operational Considerations

  • Uses aggregation and join-like enrichment (rules + logs + members), so response cost grows with rule count.

Limitations

  • Returns only latest log per transformation ID among the tracked actions.
  • If member records are missing for old logs, audit.userName can be absent.


Last Updated

2026-02-16