surveyGetList
public static array surveyGetList(string token,string filter,string status,int pagenumber,int pagesize,string orderBy,string sortOrder)
Get the list of Surveys using the filter and paging limits, order by the name or date of the surveys.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| string filter | The filter you want to apply when fetching the survey |
| string status | The status of the survey |
| int pageNumber | The page number from which you want the list. |
| int pageSize | The number of results per page |
| string orderBy | The field you want to order by (list / date) |
| string sortOrder | The status of the survey |
| Returns |
| array | Returns an array with the results. |
- <?php
- /**
- This Example shows how to authenticate a user using XML-RPC.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.php';
- $client = XML_RPC2_Client::create($apiURL);
- $token = $client->login($apiLogin, $apiPassword);
- $SurveyLists = $client->surveyGetList($token, "", "", 1, 100, "", "");
-
- foreach($SurveyLists as $rec) {
- echo $rec['sequence'] . "] Survey Name: " . $rec['name'] . "(" . $rec['id'] . ")";
- echo "\t Url For accessing(previewing) the Survey:" . $rec['url'] . "(" . $rec['url'] . ")";
- echo "\t No of Questions:" . $rec['questions'] ;
- echo "\t Survey Live Date:" . $rec['livedate'] ;
- echo "\t Post-Back Url:" . $rec['successurl'] ;
- echo "\t Intro Msg:" . $rec['intro'] ;
- echo "\t Status:" . $rec['status'] ;
- echo "\t Created Date: " . $rec['createdDate'] ;
- echo "\t Updated Date: " . $rec['modifiedDate'];
- echo "<br />";
- }
-
- ?>