Returns list of Surveys the user has permission to view. List provides only the metadata about the survey, and does not include the questions for each survey.
Client Servlet | Server Servlet | HTTP Methods Supported | Requires Authentication |
---|---|---|---|
CRSurveyAPI | None. | GET, POST | No. |
Use this client-only method to retrieve a list of all the surveys available to that user. The user must have permission to view a survey in order for it to be returned by this method.
Sorting or Filtering by Column:
See topic Common Parameters.
Required. Parameter indicating whether or not to list only published surveys. Default is true.
Type xsd:boolean.
Default is true.
Optional. Whether the list should be sorted in ascending order.
Type xsd:boolean.
Default is true.
Optional. Security Category filter.
Type xsd:integer.
Optional. The database column that will be used to match the filter text (used with "list_filter_text").
Type xsd:string.
Optional. The text that will be used to filter results.
Type xsd:string.
Optional. The requested page number (used with "list_page_size"). The first page (default) is zero. Only one of "list_record_offset" or "list_page_offset" should be used in a request.
Type xsd:integer.
Optional. The number of results in each page (used with "list_record_offset" or "list_page_offset").
Type xsd:integer.
Default is 25.
Optional. The requested initial record number (used with "list_page_size"). The first record (default) is zero. Only one of "list_record_offset" or "list_page_offset" should be used in a request.
Type xsd:integer.
Optional. The column to sort with (used with "list_ascending").
Type xsd:string.
See topic HTTP Status Codes.
XML response<?xml version="1.0" encoding="UTF-8"?> <listSurveysResponse xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd" xmlns="http://convio.com/crm/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <pagingMetadata> <currentSize>3</currentSize> <isFinalSize>true</isFinalSize> </pagingMetadata> <surveys> <surveyId>1001</surveyId> <surveyName>New User Survey</surveyName> <viewSecurityCategory> <id>1</id> <label>General</label> </viewSecurityCategory> <reportSecurityCategory> <id>2</id> <label>Administrators Only</label> </reportSecurityCategory> <surveyIntroduction>Welcome to our site! Please take a few moments to tell us about your experience:</surveyIntroduction> <resetButtonLabel>Clear Response</resetButtonLabel> <skipButtonLabel>No, Thanks</skipButtonLabel> <submitButtonLabel>Tell us</submitButtonLabel> <isAllowMultipleSubmission>false</isAllowMultipleSubmission> <isSecureSurvey>false</isSecureSurvey> <isNumberQuestions>true</isNumberQuestions> <submitSurveyUrl>http://www.yourdomain.org/site/PageServer?pagename=thank_you</submitSurveyUrl> <cancelSurveyUrl>http://www.yourdomain.org/site/PageServer</cancelSurveyUrl> <state>PUBLISHED</state> <publishedDate>2016-02-01T09:43:44.925-06:00</publishedDate> <stopDate>2021-02-01T09:43:44.925-06:00</stopDate> </surveys> <surveys> <surveyId>1002</surveyId> <surveyName>January 2009 User Engagement</surveyName> <viewSecurityCategory> <id>1</id> <label>General</label> </viewSecurityCategory> <reportSecurityCategory> <id>2</id> <label>Administrators Only</label> </reportSecurityCategory> <surveyIntroduction/> <resetButtonLabel>Clear Response</resetButtonLabel> <skipButtonLabel>No, Thanks</skipButtonLabel> <submitButtonLabel>Tell us</submitButtonLabel> <isAllowMultipleSubmission>false</isAllowMultipleSubmission> <isSecureSurvey>false</isSecureSurvey> <isNumberQuestions>true</isNumberQuestions> <submitSurveyUrl>http://www.yourdomain.org/site/PageServer?pagename=thank_you</submitSurveyUrl> <cancelSurveyUrl>http://www.yourdomain.org/site/PageServer</cancelSurveyUrl> <state>PUBLISHED</state> <publishedDate>2016-02-01T09:43:44.925-06:00</publishedDate> <stopDate>2021-02-01T09:43:44.925-06:00</stopDate> </surveys> <surveys> <surveyId>1003</surveyId> <surveyName>Fun Event Survey</surveyName> <viewSecurityCategory> <id>1</id> <label>General</label> </viewSecurityCategory> <reportSecurityCategory> <id>2</id> <label>Administrators Only</label> </reportSecurityCategory> <surveyIntroduction/> <resetButtonLabel>Clear Response</resetButtonLabel> <skipButtonLabel>No, Thanks</skipButtonLabel> <submitButtonLabel>Tell us</submitButtonLabel> <isAllowMultipleSubmission>false</isAllowMultipleSubmission> <isSecureSurvey>false</isSecureSurvey> <isNumberQuestions>true</isNumberQuestions> <submitSurveyUrl>http://www.yourdomain.org/site/PageServer?pagename=thank_you</submitSurveyUrl> <cancelSurveyUrl>http://www.yourdomain.org/site/PageServer</cancelSurveyUrl> <state>PUBLISHED</state> <publishedDate>2016-02-01T09:43:44.925-06:00</publishedDate> <stopDate>2021-02-01T09:43:44.925-06:00</stopDate> </surveys> </listSurveysResponse>JSON response
{"listSurveysResponse":{"pagingMetadata":{"isFinalSize":"true","currentSize":"3"},"surveys":[{"stopDate":"2021-02-01T09:43:44.927-06:00","resetButtonLabel":"Clear Response","surveyIntroduction":"Welcome to our site! Please take a few moments to tell us about your experience:","state":"PUBLISHED","surveyName":"New User Survey","submitSurveyUrl":"http://www.yourdomain.org/site/PageServer?pagename=thank_you","cancelSurveyUrl":"http://www.yourdomain.org/site/PageServer","skipButtonLabel":"No, Thanks","reportSecurityCategory":{"id":"2","label":"Administrators Only"},"submitButtonLabel":"Tell us","isAllowMultipleSubmission":"false","isNumberQuestions":"true","publishedDate":"2016-02-01T09:43:44.927-06:00","viewSecurityCategory":{"id":"1","label":"General"},"surveyId":"1001","isSecureSurvey":"false"},{"stopDate":"2021-02-01T09:43:44.927-06:00","resetButtonLabel":"Clear Response","surveyIntroduction":{},"state":"PUBLISHED","surveyName":"January 2009 User Engagement","submitSurveyUrl":"http://www.yourdomain.org/site/PageServer?pagename=thank_you","cancelSurveyUrl":"http://www.yourdomain.org/site/PageServer","skipButtonLabel":"No, Thanks","reportSecurityCategory":{"id":"2","label":"Administrators Only"},"submitButtonLabel":"Tell us","isAllowMultipleSubmission":"false","isNumberQuestions":"true","publishedDate":"2016-02-01T09:43:44.927-06:00","viewSecurityCategory":{"id":"1","label":"General"},"surveyId":"1002","isSecureSurvey":"false"},{"stopDate":"2021-02-01T09:43:44.927-06:00","resetButtonLabel":"Clear Response","surveyIntroduction":{},"state":"PUBLISHED","surveyName":"Fun Event Survey","submitSurveyUrl":"http://www.yourdomain.org/site/PageServer?pagename=thank_you","cancelSurveyUrl":"http://www.yourdomain.org/site/PageServer","skipButtonLabel":"No, Thanks","reportSecurityCategory":{"id":"2","label":"Administrators Only"},"submitButtonLabel":"Tell us","isAllowMultipleSubmission":"false","isNumberQuestions":"true","publishedDate":"2016-02-01T09:43:44.927-06:00","viewSecurityCategory":{"id":"1","label":"General"},"surveyId":"1003","isSecureSurvey":"false"}]}}
To retrieve a list of only published surveys:
https://demo-secure.convio.net/demo829/site/CRSurveyAPI?method=listSurveys&v=1.0&api_key=MyAPIKey&published_only=true
To retrieve a list of published and unpublished surveys, perhaps if you are integrating with a 3rd party CMS and want to provide a means of embedding a survey using the getSurvey method, but you want the CMS administrator to see all surveys, including ones that users will not be able to take:
https://demo-secure.convio.net/demo829/site/CRSurveyAPI?method=listSurveys&v=1.0&api_key=MyAPIKey&published_only=false