Query Related to Data Pull using API | XM Community
Question

Query Related to Data Pull using API

  • 15 January 2024
  • 4 replies
  • 66 views

Badge +2

I understand that by setting up useLabels as true we can export data in choice label format through APIs.
But i have a requirement where for few questions i need to values in numeric format while for rest variables i need values in choice label format. Will it be possible to achieve using APIs or any other way?
 


4 replies

Userlevel 6
Badge +27

Try changing the variable naming of the questions where we need numbers. Please note this will also change the value shown in data analysis and dashboard.

Badge +2

Thanks for your inputs @Shashi.

But if i follow your suggestion, i have to do variable naming at many places in the survey which will be quite time consuming process. Do you have any other suggestion here? Is there any way we can pull partial records using useLabels=true while remaining keeping useLabels=false.

Userlevel 6
Badge +27

Thanks for your inputs @Shashi.

But if i follow your suggestion, i have to do variable naming at many places in the survey which will be quite time consuming process. Do you have any other suggestion here? Is there any way we can pull partial records using useLabels=true while remaining keeping useLabels=false.

In that case not so good approach but we need to call the API twice with using question id as parameter and then meger them outside using some middleware.

Userlevel 6
Badge +27

@Salim - For new surveys which are not yet live, you can make use of embedded data to pipe in label or recode values of the questions response. This will give you desired output in the API irrespective if useLabels is true or false.

Leave a Reply