Supplying file contents in POST to Import Surveys in V3 | XM Community
Question

Supplying file contents in POST to Import Surveys in V3

  • 12 December 2019
  • 5 replies
  • 24 views

Hi.
I'm tasked with upgrading a survey connector from V2 to V3, and need some assistance with the body of the POST.
In the version 2 code, it's using the importSurvey API call and the survey information is in the body of the post in a format I can't find documented anywhere.
It starts with the string '[[AdvancedFormat]]'. I presume it's QSF, but not sure.

Does the V3 POST also allow this same POST body? The documentation talks about files to upload as if the API pulls the file, rather than accepts the body as the file content. There are no good examples of a properly formed POST which includes the file contents for V3 even though it suggests a Multipart formatted body is acceptable.

Does anyone have some good examples of using the Import Survey functionality in V3 and perhaps a comparison one in V2?

Thanks!

5 replies

Userlevel 4
Badge +7
@MattRobinson - what file format do you intend to use when importing the survey? And, can you confirm that that API you're trying to use is: https://api.qualtrics.com/reference#import-survey-1 ?
Thanks for the response, @KierJ. I intend to use the same format as used in the V2 code I'm upgrading. I can't determine if that's QSF or not. I'm presuming it is, but I can't find documentation on it to check. Yes the API I'm trying to use is https://api.qualtrics.com/reference#import-survey-1.
Userlevel 4
Badge +7
@MattRobinson - Gotcha. Is it possible for you to set up the V3 version of the API call assuming that the source file is QSF format and then test if that works? If it does work, you can probably safely assume that the undocumented string '[[AdvancedFormat]]' indicates QSF. Sorry, I don't have any examples of V2 api.
Thanks @KeirJ. Yes, I'm proceeding with that idea. The documentation suggests I can supply the file in the post as a MultiPart formatted string, so I'm coding it up to generate a temporary file with the same content as V2 and posting it in MultiPart format to 'suck it and see'. 😀
Userlevel 4
Badge +7
Push the button and hope for the best!

Leave a Reply