Skip to main content

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:

  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

Requires data_migration Delete permission.

Request Parameters

ParameterTypeRequiredDescription
argsJSON String (Object)NoOptional JSON-stringified helper args.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Response

Success Response

{
"result": "ok"
}

Response Fields

FieldTypeDescription
resultStringOperation result key.

Error Responses

  • 404
{
"result": "Unable to remove directory"
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Cleanup successFilesystem remove operations succeedRemoves export and import directories if present.Wrapped { "result": "ok" }
Cleanup failureFilesystem remove operation failsStops 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.

Last Updated

2026-02-17