How do I find the body parameters for collaboration/survey-sharing permissions of the API? | XM Community
Solved

How do I find the body parameters for collaboration/survey-sharing permissions of the API?

  • 27 August 2020
  • 4 replies
  • 101 views

Badge +7

Hi everybody!
I am new to using the Qualtrics API and already managed to duplicate surveys and activate them. Now I want to share them with a user group. With the information given in the API documentation, I was able to do so in principle, but all of the individual permissions (Edit Survey, Translate Survey, Copy Survey Questions, Set Survey Options, ...) are unchecked. How do I check them using the API? More specifically, what do I have to include in the body/payload of the API call?
As a side question: Is the API documentation really working correctly? I looked up the "[post] Share Survey" documentation but only found a very generic "permissions" line under [Docs | Body] and a couple of lines that look like placeholders ("property1", "property2") under [Try It | Body | Raw]. How can I find the correct names for all permissions? I even tried the placeholders as well as some stuff I took from inspecting the UI ([Survey Editor | Tools | Collaborate], leading to some "PP_..." items plus items like ".editSurvey"), but nothing has worked so far.

icon

Best answer by TomG 27 August 2020, 22:20

View original

4 replies

Userlevel 7
Badge +27

I think the following is what you are looking for. After going to the link, click on the 'example' tab.
https://api.qualtrics.com/guides/reference/surveys.json/components/schemas/ShareSurveyBody

Badge +7

Thanks a lot, Tom!
I already accepted the answer, but am still curious: Is there any effective way for me to find such information on my own? Or in other words: How did you find that page? The documentation site seems to have been rebuilt and I often find it extremely difficult to get the information I need.
Further, there are a couple of (new?) settings not covered by the example, but I hope I can add them to the list by trial and error.

Userlevel 7
Badge +27

https://www.qualtrics.com/community/discussion/comment/29800#Comment_29800I did a search at https://api.qualtrics.com/api-reference/

Badge +3

I found a little hack that can be helpful since the docs don't reference every single permission that can be set. If you go to the collaborate modal on a survey and click details to pull up the full lists of permissions, you can inspect the html of each permission and in the label attributes, the "for" attribute contains the parameter field name. Here's how I found it for "View Text Analysis"
image.pngimage.png
Unfortunately there is still a little bit of trial and error because each permission falls under a certain category (surveyDefinitionManipulation, surveyManagement, response, result) and this doesn't tell you which one, but for most of them it can be guessed easily.

Leave a Reply