Homepage / Doc / List Available Surveys

List Available Surveys

The ListAvailableSurveys method can be used to pull a list of all surveys that the user has access to. This method will pull any survey the user has access to, even if they just have access to complete a response for the survey. They may not have edit or management access to the surveys that are returned.

This method is the same utilized on the Available Surveys page within Checkbox.

class Test
{
    static void Main()
    {
            var client = new SurveyManagementServiceClient();
            var availableSurveys = client.ListAvailableSurveys(authToken, 1, 10, null, false, null, null);

            if (!availableSurveys.CallSuccess)
            {
                Console.WriteLine(availableSurveys.FailureMessage);
                return;
            }

            foreach (var survey in availableSurveys.ResultData.ResultPage)
            {
                // You can access any data related to individual surveys or folders here
                var output = string.Format("Survey name : {0}  Created By : {1} , survey.Name, survey.Creator");
                Console.WriteLine(output);
            }
            client.Close();
    }
}

 

Input Parameters

Parameter Type Description
authToken string Authentication token to validate permission over the data requested
pageNumber int Page number to pull from responses supplying 0 will pull all pages at once
pageSize int Number of results to pull into a single page of responses
sortField string Field to sort the data returned on. Valid values are : Name, ID, GUID, CreatedBy
sortAscending bool True will sort the data ascending, false will sort the data descending
filterField string Field to filter response data on. Valid values are : Name, ID, GUID, CreatedBy
filterValue string Value to filter the FilterField on
November 15, 2016