API not returning formats other than JSON?

0

Hello.

I’m trying to export my (sandbox) surveyresponses via V4 API.

If I submit this, it works fine:

https://restapi.surveygizmo.com/v4/survey/3557611/surveyresponse/22.json

If I submit this (xml or csv), 

https://restapi.surveygizmo.com/v4/survey/3557611/surveyresponse/22.xml

I get the following error:

Exception in thread “main” org.json.JSONException: A JSONObject text must begin with ‘{‘ at 1 [character 2 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:432)
at org.json.JSONObject.<init>(JSONObject.java:185)
at org.json.JSONObject.<init>(JSONObject.java:311)
at com.firstlink.utility.rest.GizmoInterface.resourceRead(GizmoInterface.java:53)
at com.firstlink.utility.client.GizmoClient.main(GizmoClient.java:81)

What am I doing wrong?

Thanks for any help.
-eric-

Community Admin answered
    0

    Hi Eric,

    I am not able to replicate what you are seeing. If you continue to run into trouble, please reach out to our support team so that they can get you sorted!

    https://help.surveygizmo.com/help/surveygizmo-support-hours

    Bri Hillmer
    Documentation Coordinator
    SurveyGizmo Customer Experience Team

    Community Admin commented
      • Thanks, Bri.
        My bad .. A hidden little function was trying to load the result into a json object. Your API works perfectly.
        Thanks very much for your help.

        • Thanks for following up Jeff and Eric. I’m sure “perfectly” is a little generous 😉

          Bri Hillmer
          Documentation Coordinator
          SurveyGizmo Customer Experience Team

      ×

      Login

      Question stats

      • Active
      • Views3034 times
      • Answers1 answer
      • Followers1 follower