Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

API show list of existing surveys

More
6 years 3 months ago #184650 by jinformatique
Hello,


I'm using the API to add new participants.
I need to display a list of surveys from limesurvey with the API.

I saw that function "list_surveys" is only to list the survey belonging to a user.
In my case the user doesn't belong to the list yet.

How can I just display a list of existing surveys without passing the user as a parameter?

Thank you
The topic has been locked.
More
6 years 3 months ago #184667 by tpartner
What happens if you use a super-admin's credentials?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
6 years 3 months ago #184669 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 3 months ago - 6 years 3 months ago #184784 by jinformatique
Hello,


I'm using latest LimeSurvey Version 3.17.3+190429.
I activated debug logs. For the following code, here is what I get:
Code:
$surveys = list_surveys($sSessionKey, 1);
var_dump($surveys);
Code:
Fatal error: Uncaught Error: Call to undefined function list_surveys() in /web/www/alfred/qds/lmjsonAddParticipant.php:30 Stack trace:
#0 /web/www/alfred/qds/qds.php(11): addParticipants(616685, Object(stdClass))
#1 /web/www/alfred/index.php(121): include('/web/...')
#2 {main} thrown in /web/www/alfred/qds/lmjsonAddParticipant.php on line 30

So if I understand well,the function « list_surveys » does not belong to the API as described in the documentation:
api.limesurvey.org/classes/remotecontrol...#method_list_surveys
Last edit: 6 years 3 months ago by jinformatique.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose