Skip to main content

We are using the latest Gainsight PX REST API · Apiary details and attempting to call all survey results for a particular engagement.

The Get Survey Responses appears to show me all of the completed surveys in a six-month window. (I think) Although the tengagementTrackType] only returns a value of ENGAGEMENT_VIEW, but I am assuming that is just a default value and that it does not indicate that this record is just of the views of the survey, as the API call is titled Get Survey Responses.

 

But this call does not return any of the actual response answers from the survey. This is great to count the number of responses, but if i want to connect survey responses to our Customer Service records, I would like the actual response details.

Does anyone have any recommendations on how to use the GPX REST API to pull answers to a specific survey? 

 

And to add to this challenge, what about when it is a multi-question survey? 

 

Any help would be greatly appreciated. 

@JPKelliher 

Hi, are you looking for this?

https://api.aptrinsic.com/v1/survey/responses?contentType===IN_APP_MULTIPLE_QUESTION_SURVEY&sort=-date&pageSize=500&filter=engagementId=={{engagementId}}

 

 

 


@lpicone , thank you for the feedback. This result will only show me the “who” and the “when”. It doesn’t include any information about the “what” the response was. 

 

I am looking for what my users responded in these surveys so we can analyze the feedback. 


@JPKelliher - I’ve been looking into the Rest API lately also to hopefully do some reporting that I can’t seem to get the PX UI to do.  Looking at the /v1/survey/responses, I do see the actual submitted values.   Not sure if it’s dependent upon the type of survey, but I’m using a “Rating” survey so my query looks like this:

GET {{baseURL}}/v1/survey/responses?pageSize=100&sort=-date&contentType=IN_APP_SURVEY_RATING

I’ve been able to further trim this down as follows:

GET {{baseURL}}/v1/engagement?contentTypes=IN_APP_RATING_SURVEY&pageSize=100

I use this to get the engagementId of the specific survey I want to get responses for, then I modify the responses call as follows:
 

/v1/survey/responses?filter=engagementId=={{GUID}}&pageSize=100&sort=-date&contentType=IN_APP_SURVEY_RATING

Note -- i found out the fieldname in the “{fieldName}{operator}{fieldValue}” filter is case-sensitive.

I’m still very early in trying this all out, but hoping this helps you.


@JPKelliher - Not sure if this would help you:
 

 

I also put a link to a slimmed down version of a script I created to dump survey resposes that i put in GitHub gist.  


Reply