Skip to main content

Start metadata cleanup

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/drill/cleanup_meta

Overview

Starts Drill metadata cleanup for one app or all apps.

Authentication

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

Permissions

  • Single-app cleanup: requires drill Update permission.
  • All-app cleanup: requires global admin.

Request Parameters

ParameterTypeRequiredDescription
app_idStringConditionalRequired for single-app cleanup (all not set).
allBoolean StringNoSet to any truthy value to run across all apps. Requires global admin permission.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Examples

Single app cleanup

/i/drill/cleanup_meta?
app_id=64f5c0d8f4f7ac0012ab3456

All apps cleanup

/i/drill/cleanup_meta?
all=true

Response

Success Response

{
"result": "Meta cleanup started"
}

Response Fields

FieldTypeDescription
resultStringStart confirmation message.

Error Responses

  • 404
{
"result": "Missing parameter app_id"
}

Behavior

  • Starts asynchronous cleanup, does not wait for completion.
  • For all-app mode, iterates through all apps and runs cleanup per app.
  • In single-app mode, app_id is required and cleanup is queued for that app only.
  • Writes completion/failure status to system logs (meta_cleanup_finished).
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.appsApp configuration and metadataStores app-level feature settings and metadata used or modified by this endpoint.
countly_drill.drill_metaDrill metadata modelStores event/segment/property metadata dictionaries used by this endpoint.
countly.systemlogsAudit trailContains system action records used by this endpoint for audit output or audit writes.