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​

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

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.

Examples​

Get migration runtime config​

/o/datamigration/get_config

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​

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.

Limitations​

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

Configuration Impact

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

Database Collections

This endpoint does not read or write database collections directly.