Specification for current "Get Survey" is wrong on example page | XM Community
Question

Specification for current "Get Survey" is wrong on example page


Badge +2
https://api.qualtrics.com/reference#get-survey-1

I started writing this to say "JSON output on the current Get Survey doesn't work." However, I just figured out that it does work, but the specification as written is incorrect.

The specification indicates that it takes a string indicating how the response is to be formatted, either "qsf" or "json." A drop-down menu on the example output allows you to see what the two different output formats look like. However, if you actually pass the string "json" as specified, you get this:

```
[Metadata:]
https://env.qualtrics.com/API/v3/survey-definitions/[surveyid]?format=json

{
"meta":{
"requestId":"abb54a19-43a2-486e-a57f-de6f1ff1eded"
"httpStatus":"400 - Bad Request"
"error":{
"errorCode":"QVAL_8"
"errorMessage":"Parameter format should be one of [qsf], found json."
}
}
}
```

If you want JSON, you have to leave the format parameter BLANK, with no additional "format" parameter passed:

```
https://env.qualtrics.com/API/v3/survey-definitions/[surveyid]
```
at which point you receive output formatted consistent with the examples. This not what the specification as described seems to indicate, so it's quite confusing.

0 replies

Be the first to reply!

Leave a Reply