Data Migration - Delete All Migration Files
Endpoint
/i/datamigration/delete_all
Overview
Deletes all local export and import file directories for the Data Migration feature.
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
Requires data_migration Delete permission.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
args | JSON String (Object) | No | Optional JSON-stringified helper args. |
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": "ok"
}
Response Fields
| Field | Type | Description |
|---|---|---|
result | String | Operation result key. |
Error Responses
404
{
"result": "Unable to remove directory"
}
Behavior/Processing
Behavior Modes
| Mode | Trigger | Processing Path | Response Shape |
|---|---|---|---|
| Cleanup success | Filesystem remove operations succeed | Removes export and import directories if present. | Wrapped { "result": "ok" } |
| Cleanup failure | Filesystem remove operation fails | Stops and returns cleanup error text. | Wrapped error text |
Impact on Other Data
- Deletes local migration files/folders in plugin workspace.
- Does not remove existing migration records from
countly.data_migrations.
Database Collections
This endpoint does not read or write database collections directly.
Examples
Delete all migration import/export files
/i/datamigration/delete_all
Limitations
- This endpoint only cleans file system artifacts; database status records remain unless removed by other endpoints.
Related Endpoints
Last Updated
2026-02-17