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​

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

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.

Examples​

Stop an active export​

/i/datamigration/stop_export?
exportid=f9b35d90be5f2240eafced7c6bfdf130856cd0a7

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​

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.

Limitations​

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

Database Collections

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