Skip to main content

Data Migration - Delete Import

Endpoint

/i/datamigration/delete_import

Overview

Deletes local import artifacts for one import/export ID.

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
exportidStringYesImport/export identifier used by import workspace files.
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 status key.

Error Responses

  • 404
{
"result": "data-migration.exportid-missing"
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Delete successexportid provided and cleanup succeedsRemoves import archive/folder and related import metadata files/logs.Wrapped { "result": "ok" }
Missing IDexportid absent/emptyStops and returns missing-id key.Wrapped error key

Impact on Other Data

  • Deletes files in plugin import workspace.
  • Deletes import log file and import metadata JSON when present.

Database Collections

This endpoint does not read or write database collections directly.


Examples

Delete one import package

/i/datamigration/delete_import?
exportid=f9b35d90be5f2240eafced7c6bfdf130856cd0a7

Last Updated

2026-02-17