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

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

  • October 11, 2019
  • 3 replies
  • 352 views

Forum|alt.badge.img
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

KeirJ
QPN Level 2 ●●
Forum|alt.badge.img+7
  • QPN Level 2 ●●
  • October 16, 2019
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.

  • November 15, 2019
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.',

KeirJ
QPN Level 2 ●●
Forum|alt.badge.img+7
  • QPN Level 2 ●●
  • November 19, 2019
Hi @ssapeds - can you please post a screenshot of how you've coded the request? (You can obscure any sensitive information). Thank you!