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:
- API key query parameter:
api_key=YOUR_API_KEY - Auth token query parameter:
auth_token=YOUR_AUTH_TOKEN - Auth token header:
countly-token: YOUR_AUTH_TOKEN
Permissions
- Single-app cleanup: requires
drillUpdatepermission. - All-app cleanup: requires global admin.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
app_id | String | Conditional | Required for single-app cleanup (all not set). |
all | Boolean String | No | Set to any truthy value to run across all apps. Requires global admin permission. |
api_key | String | Conditional | Required if auth_token is not provided. |
auth_token | String | Conditional | Required if api_key is not provided. |
Response
Success Response
{
"result": "Meta cleanup started"
}
Response Fields
| Field | Type | Description |
|---|---|---|
result | String | Start 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_idis required and cleanup is queued for that app only. - Writes completion/failure status to system logs (
meta_cleanup_finished).
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly.apps | App configuration and metadata | Stores app-level feature settings and metadata used or modified by this endpoint. |
countly_drill.drill_meta | Drill metadata model | Stores event/segment/property metadata dictionaries used by this endpoint. |
countly.systemlogs | Audit trail | Contains 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
Related Endpoints
Last Updated
2026-04-17