Take all ResponseID from a Survey | XM Community
Question

Take all ResponseID from a Survey

  • 30 July 2020
  • 2 replies
  • 197 views

Hello everyone, I have just started using the Qualtrics API, I want to create an application that, given a surveyID, returns all the responses (ResponseID) that Survey has, and then collect more data.

Any idea how to do it, for now I have only managed to correctly execute the endpoint "response scheme", but this does not return any responseID, try "export-responses" but getting a "Not found" error.
Any ideas how can i focus to get all the answers from a survey?
I am using .net to develop the application.

Thanks in advances!


2 replies

Userlevel 7
Badge +22

Response export is three step process:

  1. https://api.qualtrics.com/api-reference/reference/legacyResponseImportsExports.json/paths/~1responseexports/post

  2. https://api.qualtrics.com/api-reference/reference/legacyResponseImportsExports.json/paths/~1responseexports~1%7BresponseExportId%7D/get

  3. https://api.qualtrics.com/api-reference/reference/legacyResponseImportsExports.json/paths/~1responseexports~1%7BresponseExportId%7D~1file/get


You can export the response in following formats `csv`, `csv2013`, `xml`, `json`, or
spss
and parse them to get only ResponseID.
Here is the example using python.

Thaks rondev I try the fisrt one, in the qualtrics page and I obtain this error
{
"meta": {
"httpStatus": "400 - Bad Request",
"error": {
"errorMessage": "Invalid parameter. Must be a valid ISO 8601 date. param=startDate, value='\\"string\\"'",
"errorCode": "ADTP_6"
},
"requestId": "7f78f4da-7c84-474c-9dd5-f89148db2818"
}
}
my parameter are this...

curl --request POST \\
--url https://ca1.qualtrics.com/API/v3/responseexports \\
--header 'content-type: application/json' \\
--header 'x-api-token: XXXXXXXXXXXXXX' \\
--data '{"format":"csv","surveyId":"string","lastResponseId":"string","includedQuestionIds":["string"],"limit":0,"useLabels":true,"startDate":"string","endDate":"string","decimalSeparator":",","seenUnansweredRecode":"string","useLocalTime":false,"additionalData":"string"}'

any idea!! The startDate is options parameter and string!

Thanks!

Leave a Reply