How do I use SurveyMonkey's API console?

≡放荡痞女 提交于 2019-12-11 04:54:20

问题


I am trying to use the SurveyMonkey API. The XXXYYYZZZ is where my key would normally go. How do I use the API console and what kind of output can I expect using it?

Request URI:

https://api.surveymonkey.net/v2/surveys/get_survey_list?api_key=xxxxyyyyzzzz

Request Headers:

{ 
    "X-Originating-Ip": "127.0.0.0", 
    "Content-Type": "application/json" 
}

Request body:

{
    "title":"",
    "page":1,
    "page_size":1000,
    "start_date":"1970-01-01 00:00:00",
    "end_date":"2038-01-01","order_asc":true,
    "fields":
        ["title","analysis_url","date_created","date_modified"]
 }

Response headers:

{ 
    "Content-Type": "text/xml", 
    "Date": "Fri, 27 Sep 2013 22:56:32 GMT", 
    "Server": "Mashery Proxy", 
    "X-Mashery-Error-Code": "ERR_403_DEVELOPER_INACTIVE", 
    "X-Mashery-Message-Id": "585a5090-0d11-47f8-a638-3a20c2d6140c", 
    "X-Mashery-Responder": "prod-j-worker-us-west-1c-17.mashery.com", 
    "Content-Length": "27", 
    "Connection": "keep-alive" 
}

Response body:

<h1>Developer Inactive</h1>

回答1:


Depending on what programming language you're using, there are a few 3rd party API wrappers that you can use to access the data and make it easier to use. I'm currently looking into writing something using the PHP wrapper: https://github.com/oori/php-surveymonkey. SurveyMonkey lists some 3rd party wrappers on their website: https://developer.surveymonkey.com/. Also, it was brought to my attention as an answer to one of my questions that there is a Survey Monkey API console, that allows you to see what data will be returned based on which method you call: https://developer.surveymonkey.com/api_console.

Hope this helps.




回答2:


All the API console does is allow you to make requests to the SurveyMonkey API without having to build or setup your own framework for making requests to it. This will let you see what kind of data you can get back from the API before having to make any serious investments in coding up an application, to see if it suits your needs.

Note that the developer inactive message above is what is returned when an invalid API key is used.

You can see some more information on what to expect back on this documentation page - https://developer.surveymonkey.com/mashery/requests_responses - make sure you look through the available API methods on the left.



来源:https://stackoverflow.com/questions/19061456/how-do-i-use-surveymonkeys-api-console

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!