Create Response Export (API v3) to CSV for data mapping
I finally learned you can use the Create Response Export to csv format as a data map of the the newer response variables (like those text field variables with _TEXT appended to them that do not appear in the .qsf file or the Get Survey API call). For my data mapping process I make API calls to retrieve the survey information of all of my surveys using the Get Survey API call (https://api.qualtrics.com/reference#get-survey) and save these JSON files locally. I then make another set of API calls of all my surveys to get the data variable mapping using the Create Response Export to csv (https://api.qualtrics.com/reference#create-response-export-new) using a limit=1 to only get the bare minimum header data, then parse that into a json file for each survey and save these files locally as well. I can then make normal Create Response Export (format=json) API calls to get the response data that can then be mapped using the locally saved variable mapping json files. This is how I began the transition from the older API response calls (which had a different data formatting/structure) to the newer API response data.
NOTE:
When using the Create Response Export to csv format API call, I learned the 'newlineReplacement' parameter actually refers to any new lines present in your survey question labels (which will cause problems parsing your CSV data unless you remove them). I set this parameter to a blank space
(newlineReplacement=' ') in my API calls to correct the line break issues I was having, and I would suggest always setting this parameter to a blank space or similar when pulling CSV formatted responses to prevent unwanted line breaks in the data.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.