Import survey
limesurvey_import_surveyImport an LSA, CSV, TXT, or LSS survey. Use import_data_path for files at or above roughly 50 KB so the server reads and base64-encodes them itself; reserve inline import_data for small files under 200,000 characters of base64 text.
Instructions
Import an LSA, CSV, TXT, or LSS survey. Use import_data_path for files at or above roughly 50 KB so the server reads and base64-encodes them itself; reserve inline import_data for small files under 200,000 characters of base64 text. The returned sid is the survey ID LimeSurvey actually used: it keeps the ID embedded in the file when that ID is free, destination_survey_id overrides it when set, and on an ID collision LimeSurvey silently assigns a random 6-digit sid instead of failing (verified against the LimeSurvey XMLImportSurvey/insertNewSurvey source).
Calls LimeSurvey RemoteControl method import_survey. Authentication uses the configured service account; do not provide a session key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| import_data | No | Base64-encoded survey file contents; omit when using import_data_path. | |
| new_survey_name | No | Optional replacement survey name. | |
| response_format | No | Output format. JSON preserves the complete structured result; Markdown is optimized for reading. | json |
| import_data_path | No | Local file path to a survey file. The server reads and base64-encodes it, so use this instead of inline import_data for files at or above roughly 50 KB. The file must live inside LIMESURVEY_IMPORT_DIR (or LIMESURVEY_EXPORT_DIR as a fallback). Exactly one of import_data or import_data_path must be set. | |
| import_data_type | Yes | Import file type. | |
| destination_survey_id | No | Optional desired ID for the imported survey. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | ||
| result | Yes | ||
| warnings | No | ||
| truncated | No | ||
| truncation_message | No |