Qualtrics API - UseLabels = True but Choice Text is Not Showing | XM Community
Question

Qualtrics API - UseLabels = True but Choice Text is Not Showing

  • 28 October 2020
  • 1 reply
  • 165 views

I am downloading data from a survey that we did in Qualtrics. I found Python 3 sample code (https://api.qualtrics.com/docs/response-exports) and base my code around it.
After successful download I noticed some drill down question that provided a list of option for the user to select from were downloaded as numbers (I suspect the index of the answer selected). This drill down question where change with the Survey Actice and the responses where Edit to match with the original ones.
I believe the answer is simple as putting in some parameters to download the data differently but I can't seem to find it in Qualtric's API documentation.
Here is the code used for creating Data Export:
--------------------------------
# Step 1: Creating Data Export
downloadRequestUrl = baseUrl
useLabels = True
dictionaryPayload = {'format': fileFormat, 'surveyId': surveyId, 'useLabels': useLabels}
downloadRequestPayload = json.dumps(dictionaryPayload)
downloadRequestResponse = requests.request("POST", downloadRequestUrl, data=downloadRequestPayload, headers=headers)
progressId = downloadRequestResponse.json()["result"]["id"]
print(downloadRequestResponse.text)
----------------------------------
Does anyone know how to solve this issue?
Thanks 😐


1 reply

Hi,
When specifying the dictionaryPayload you are using the boolean True as the value for the 'useLabels' . This should be the string "True".

Here is an example from my code:
'{"format":"csv", "useLabels":"True"}'

Leave a Reply