Skip to main content

Data Migration - Get Runtime Config

Endpoint

/o/datamigration/get_config

Overview

Returns data migration runtime defaults, including export folder path and detected upload size limit from Nginx configuration when available.

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 Read 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.

Configuration Impact

SettingDefaultAffectsUser-visible impact
Nginx client_max_body_sizeNginx defaultImport file-size guidanceReturned fileSizeLimit reflects detected max request body size (converted to KB).

Response

Success Response

{
"result": {
"def_path": "/path/to/core/plugins/data_migration/export",
"fileSizeLimit": 102400
}
}

Response Fields

FieldTypeDescription
result.def_pathStringDefault export directory path on server.
result.fileSizeLimitNumberDetected upload limit in KB, or 0 when not detected.

Error Responses

This handler normally returns 200 with fallback values even when Nginx config discovery fails.

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Nginx parsednginx -t and config parse succeedReturns default path plus parsed client_max_body_size converted to KB.Wrapped config object
FallbackNginx parse not available/failsReturns default path and fileSizeLimit=0.Wrapped config object

Impact on Other Data

  • Read-only endpoint.

Database Collections

This endpoint does not read or write database collections directly.


Examples

Get migration runtime config

/o/datamigration/get_config

Limitations

  • If Nginx config parser fails inside callback, handler may not return detailed parse error context.

Last Updated

2026-02-17