Welcome to the LimeSurvey Community Forum

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

API show list of existing surveys

  • jinformatique
  • jinformatique's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 10 months ago #184650 by jinformatique
API show list of existing surveys was created 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.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #184667 by tpartner
Replied by tpartner on topic API show list of existing surveys
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.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 10 months ago #184669 by DenisChenu
Replied by DenisChenu on topic API show list of existing surveys

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • jinformatique
  • jinformatique's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 10 months ago - 4 years 10 months ago #184784 by jinformatique
Replied by jinformatique on topic API show list of existing surveys
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: 4 years 10 months ago by jinformatique.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose