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
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. |
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
| Field | Type | Description |
|---|---|---|
result | String | Start 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_idis required and cleanup is queued for that app only. - Writes completion/failure status to system logs (
meta_cleanup_finished).
Related Endpoints
Implementation details
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. |