2016-11-28 31 views
0

理想的情况下调用此API - https://api.surveymonkey.net/v2/surveys/get_responsesPOST:get_responses API没有给予必要的数据

应该给这样的JSON响应:

{ 
    "data": [ 
     { 
      "questions": [ 
       { 
        "answers": [ 
         { 
          "col": "3024965133", 
          "row": "3024965139" 
         }, 
         { 
          "col": "3024965134", 
          "row": "3024965140" 
         }, 
         { 
          "col": "3024965135", 
          "row": "3024965141" 
         }, 
         { 
          "row": "0", 
          "text": "Other!" 
         } 
        ], 
        "question_id": "316084770" 
       }, 
       { 
        "answers": [ 
         { 
          "col": "3024965125", 
          "row": "3024965122" 
         }, 
         { 
          "col": "3024965124", 
          "row": "3024965123" 
         } 
        ], 
        "question_id": "316084761" 
       }, 
       { 
        "answers": [ 
         { 
          "row": "3024959616" 
         } 
        ], 
        "question_id": "316083321" 
       }, 
       { 
        "answers": [ 
         { 
          "row": "0", 
          "text": "This is an open answer" 
         } 
        ], 
        "question_id": "316083320" 
       }, 
       { 
        "answers": [ 
         { 
          "col": "3024962639", 
          "row": "3024962638" 
         }, 
         { 
          "col": "3024962640", 
          "row": "3024962637" 
         }, 
         { 
          "col": "3024962639", 
          "row": "3024962636" 
         } 
        ], 
        "question_id": "316084090" 
       }, 
       { 
        "answers": [ 
         { 
          "row": "3024964761", 
          "text": "9" 
         }, 
         { 
          "row": "3024964762", 
          "text": "1" 
         } 
        ], 
        "question_id": "316084724" 
       } 
      ], 
      "respondent_id": "2500019027" 
     } 
    ], 
    "status": 0 
} 

但是,当我请求的API为我的调查答复由具体的受访者,我得到一个空白数组。

enter image description here

注:我能看到通过SurveyMonkey UI控制台适当的响应。

回答

0

如果您使用API​​第3版,你可能会得到一个更好的错误消息:

https://developer.surveymonkey.com/api/v3/#surveys-id-responses

看来你的问题可能是,你必须为调查超过100个回复,你只能访问第一100从我从日志中看到的基本计划。

如果是这样的情况下,解决办法是

  1. 升级你的计划
  2. 删除一些旧的回应
  3. 也许重复调查?

我再次建议转移到V3的API以获得更好的体验。

相关问题