How to get question labels from v3 API's Retrieve Survey Response | XM Community
Question

How to get question labels from v3 API's Retrieve Survey Response

  • 11 October 2019
  • 3 replies
  • 162 views

Badge
My application used the v2.5 api as it relied on inserting questions into a database using the question's labels as fields.
However with the deprecation of v2 I am forced to use v3 and can't seem to locate any way of getting the custom named question labels, I can only retrieve the internal question IDs and their answers.
Any way of retrieving the question labels from the api response?

3 replies

Userlevel 4
Badge +7
The List Questions API might have what you need. I believe what you're looking for can be found in the `DataExportTag` item that is returned with the API response.
When I use the ListQuestionsAPI , I get the following error
{u'meta': {u'httpStatus': u'400 - Bad Request', u'error': {u'errorCode': u'QMST_1', u'validationErrors': [{u'Field': u'', u'Value': None, u'Description': u'Error getting schema name: failed to get question type from json: QuestionType was empty', u'Context': u'', u'Element': u''}], u'message': u'Data validation failure', u'errorMessage': u'The request was invalid.',
Userlevel 4
Badge +7
Hi @ssapeds - can you please post a screenshot of how you've coded the request? (You can obscure any sensitive information).

Thank you!

Leave a Reply