Skip to main content

Start metadata cleanup

Enterprise Only
This API is available exclusively in Countly Enterprise.

Endpoint

/i/drill/cleanup_meta

Overview

Starts Drill metadata cleanup for one app or all apps.

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

  • 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.

Response

Success Response

{
"result": "Meta cleanup started"
}

Response Fields

FieldTypeDescription
resultStringStart confirmation message.

Error Responses

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

Behavior/Processing

  • 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).

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.

Examples

Single app cleanup

/i/drill/cleanup_meta?
app_id=64f5c0d8f4f7ac0012ab3456

All apps cleanup

/i/drill/cleanup_meta?
all=true


Last Updated

2026-04-17