Maite
Maite

Reputation: 65

get all responseId form a survey Qualtrics

How I can obtain all the responseId from a survey in Qualtrics using the API.

I don't want to download a file with the data, I just want to save the responseId in a object.

It is possible? I am looking in the API, but not finding anything.

Thanks in advance.

Upvotes: 1

Views: 667

Answers (1)

José Mancharo
José Mancharo

Reputation: 336

Sadly, there is no way to do exactly that.

I would use the file export with a few options to make your life easier. First, POST /surveys/{surveyId}/export-responses

{
  "format": "json",
  "compress": "false",
  "embeddedDataIds":[],
  "questionIds":[],
  "surveyMetadataIds":[]
}

Then GET /surveys/{surveyId}/export-responses/{exportProgressId}

you get that ID from the previous request. You can call this function in a loop until it is done. It should be pretty fast, though, if you pass in the empty arrays in the previous step.

Then GET /surveys/{surveyId}/export-responses/{fileId}/file]

It should come back as fairly usable JSON, though it's not exactly what you wanted. It will have the response Ids on it plus some other data you probably don't want.

There should be a JSON object with a key called "responses", which is an array of objects that each have a key called "ResponseId"

Upvotes: 1

Related Questions