Skip to main content

Data Migration - Stop Export

Endpoint

/i/datamigration/stop_export

Overview

Marks an export as stopped when it is still in export pipeline states.

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 Update permission.

Request Parameters

ParameterTypeRequiredDescription
exportidStringYesExport ID to stop.
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": "data-migration.export-already-stopped"
}

Response Fields

FieldTypeDescription
resultStringExport stop status key.

Error Responses

  • 404
{
"result": "data-migration.export-already-finished"
}
  • 404
{
"result": "data-migration.export-already-failed"
}
  • 404
{
"result": "data-migration.export-already-sent"
}
  • 404
{
"result": "data-migration.data-migration.exportid_not_provided"
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Stop acceptedExport exists and is in packing or exporting stepSets stopped=true in migration record.Wrapped data-migration.export-already-stopped
Cannot stopExport already finished/failed/sentReturns status-specific error key.Wrapped error key

Impact on Other Data

  • Updates stopped flag in countly.data_migrations.

Database Collections

CollectionUsed forData touched by this endpoint
countly.data_migrationsExport status lookup and updateReads export status/step and sets stopped=true when eligible.

Examples

Stop an active export

/i/datamigration/stop_export?
exportid=f9b35d90be5f2240eafced7c6bfdf130856cd0a7

Limitations

  • The success message key is data-migration.export-already-stopped, even in the first successful stop transition.

Last Updated

2026-02-17