Skip to main content

Data Transformations - Toggle Status

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/transformation/toggle-status

Overview​

Toggles a transformation status between ENABLED and DISABLED.

Authentication​

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

Permissions​

Requires data_manager_transformations Update permission.

Request Parameters​

ParameterTypeRequiredDescription
app_idStringYesTarget app ID.
idStringYesTransformation document ID.
statusStringYesCurrent status hint. Handler flips this value (ENABLED -> DISABLED; anything else -> ENABLED).
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Parameter Semantics​

FieldExpected valuesBehavior
statusAny stringOnly used as toggle hint. If current is ENABLED, next is DISABLED; otherwise next is ENABLED.

Examples​

/i/data-manager/transformation/toggle-status?
app_id=64f5c0d8f4f7ac0012ab3456&
id=67b860e39f2d3e0012ab9c44&
status=ENABLED

Response​

Success Response​

{
"status": "DISABLED"
}

Response Fields​

FieldTypeDescription
statusStringNew status after toggle (ENABLED or DISABLED).

Error Responses​

  • 500
{
"result": "Error"
}

Behavior​

Behavior Modes​

ModeTriggerProcessing PathResponse Shape
ToggleAlwaysComputes opposite status, validates it against TRANSFORM_STATUS, updates document by _id + app.Object with status

Impact on Other Data​

  • Updates only status field in countly.datamanager_transforms.
  • Invalidates transformation cache for app.

Operational Considerations​

  • This endpoint always toggles state; it does not support idempotent “set exact status” semantics.

Limitations​

  • Invalid IDs or DB failures are returned as generic 500 Error.
Implementation details

Audit & System Logs

ActionTriggerPayload
dm-toggle-statusAfter successful toggle update{ status: "new_status", id: "rule_id" }

Database Collections

CollectionUsed forData touched by this endpoint
countly.datamanager_transformsTransformation rule storageUpdates only the status field for the specified rule ID and app.
countly.systemlogsAudit trailWrites dm-toggle-status with new status and rule ID.