Get survey JSON from library | XM Community
Skip to main content
Question

Get survey JSON from library

  • May 11, 2020
  • 4 replies
  • 60 views

I see the API "GET $API_BASE_URL/libraries/$LIBRARY_ID/survey/surveys" is able to get the surveys in the library. But, I don't see any APIs that gets the survey JSON of the library. How to get it?

4 replies

Forum|alt.badge.img+2
  • Level 2 ●●
  • May 20, 2020

once you have the surveyID, you can call this to get the survey's JSON
https://env.qualtrics.com/API/v3/survey-definitions/surveyId
https://api.qualtrics.com/reference#get-survey-1



Forum|alt.badge.img+2
  • Level 2 ●●
  • May 26, 2020

If you look at this link: The response contain the survey ID. You can also find the survey ID in your qualtircs account ( Account Settings, Qualtrics IDs, Surveys)
Get Organizationimage.png


BDT
Forum|alt.badge.img+5
  • October 1, 2020

I was trying to find CRUD access to my Library surveys and came across this post. I figured it would be a start, at least, but I did not have success running the request on Library surveys. My redacted request:
{
  "method": "get",
  "url": "https://iad1.qualtrics.com/API/v3/surveys/LS_0I...",
  "headers": {
    "X-API-TOKEN": "VP..."
  }
}
This is the redacted return.
{
"meta":
{
"httpStatus":"400 - Bad Request",
"error":{
"errorMessage":"Invalid surveyId.",
"errorCode":"GSI_1"
},
"requestId":"1ead..."
}
}
I tried in Python and using the "Try It" API: https://api.qualtrics.com/guides/reference/surveys.json/paths/~1surveys~1%7BsurveyId%7D/get