I am using the export-responses API call to return a data set. The documentation lists questionIds and embeddedDataIds as options to include in the data portion of the body. The documentation states, 'If provided, only export answers from the provided list of Question IDs'. My expectation is to get a data set with the metadata and only those columns listed. However, the data set is the same as if I specified nothing. Here is the call I have tried (and other variations). I also have tried specifying the format as json but the same dataset is returned.
downloadRequestResponse = requests.request("POST","https://co1.qualtrics.com/API/v3/surveys/SV_xxxxxxxxxx/export-responses/"
, json=data, headers=headers, verify=True)
data = {
"format": "csv",
"seenUnansweredRecode": 2,
"newlineReplacement":" ",
"breakoutSets": True,
"questionIds":>"QID1"],
"limit":5
}
I have also tried replacing "questionIds": I"QID1"] with "embeddedDataIds":s"emb1","emb2"]
I have verified the ids in the survey definition.
What am I missing?
I think I finally figured it out! Part of the issue was working with data sets with many fields which made it difficult to see what was really happening.
Basically, you have to specify all 3 field types in the data.
{
embeddedDataIds: [],
surveyMetadataIds:[],
questionIds:[]
}
If the parameter is not specified it will return all fields of that type.
So, if you want an export of only the ResponseId, RecordedDate and an embeddedField:
data = {"embeddedDataIds":["emb_field"],
"surveyMetadataIds":['"_recordId","recordedDate"],
"questionIds:[]
}
Hi,
I'm using python script to download data and it's not including Survey metadata and embedded data. Could you share the code snippet for this please.
Thank you!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.