[API] problem with answers

More
2 years 1 month ago #125622 by michal84
michal84 created the topic: [API] problem with answers
Hello,

I'm using limeurvey PHP api. I need to retrieve all questions. I have no problem with that - I use list_surveys nad list_questions method. But then I need to retrieve all the answers. As I can see I can only get the XML/PDF/HTML file from export_statistics method.

Is there any way to retrieve all answers by API ?

Please Log in to join the conversation.

More
2 years 1 month ago #125626 by DenisChenu
DenisChenu replied the topic: [API] problem with answers
Hi,

Use manual.limesurvey.org/RemoteControl_2_API#export_responses

And json (for example, because it's more easy to treat).

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
2 years 1 month ago #125659 by michal84
michal84 replied the topic: [API] problem with answers
ok I'm using export_responses to retrive html and it's ok. But in questions where user can type own answears there is a button called "Browse" (see attachment1). After click I should see answers typed manually but I don't see any method that deals with that.

In limesurvey panel I can see this after choosing question statistic -> export to html (see attachment 2)
After clicking the Browse button ajax is executed and this url:
limesurvey.local/index.php/admin/statist...28/column/19828X3X4/

this shows me answears typed manually. Can I get the same thing by API ?
Attachments:

Please Log in to join the conversation.

More
2 years 1 month ago #125666 by DenisChenu
DenisChenu replied the topic: [API] problem with answers
Hi,

html export method is done to export HTML, strangely here : seems to export stat.

But : i think it's better to use json OR csv and do "what you want" in your tool. Using json : json_decode give you the array with all answers, then you can do your own HTML.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now