Welcome to the LimeSurvey Community Forum

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

API calls

  • jorgesinval
  • jorgesinval's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
More
11 hours 29 minutes ago - 11 hours 27 minutes ago #270912 by jorgesinval
API calls was created by jorgesinval
Hi LimeSurvey Community,

I'm currently working on a project where I need to dynamically build question interfaces in LimeSurvey (android and iOS app), such as a 5-point answer scale. My current process involves the following steps:

1. Call list_groups: Retrieve the list of groups in the survey.
2. Call list_questions: Retrieve the list of questions, either by filtering the JSON based on groupID or by passing the groupID parameter into the list_questions API function.
3. Call get_question_properties: Get the full properties of each question to build the appropriate question interface.

Here's my sequence of operations:

- Retrieve groups using list_groups.
- For each group, retrieve questions using list_questions.
- For each question, retrieve properties using get_question_properties.

While this approach works, I wonder if there's a more efficient way to achieve this. My goal is to optimize the process and reduce the number of API calls.

Specific Questions:

1. Is there a way to batch API calls in LimeSurvey to retrieve multiple resources in a single call?
2. Are there any existing plugins or extensions that could streamline the retrieval of survey data?
3. Could direct database queries be a feasible alternative for retrieving this information more efficiently?
4. Are there any community-recommended practices for caching responses to avoid repetitive API calls?

Any advice or insights would be greatly appreciated!

Thank you so much for your attention.

Sinval
Last edit: 11 hours 27 minutes ago by jorgesinval. Reason: remove code chunks

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose