Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Getting responses for a survey via Remote Control 2 API

Getting responses for a survey via Remote Control 2 API 1 Jahr 22 Stunden her #98642

  • Anurag
  • Anurags Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 22
  • Karma: 0
I'm struggling with getting responses for a non-anonymized survey that has a tokens table properly initialized and that has some valid responses as well. The problem is:
  1. There doesn't seem to be a direct method in the API to get survey responses. There is export_responses, but that's not what I want as it exports responses to a file.
  2. A potential solution seems to exist in get_summary (completed_responses and full_responses stats), but even that isn't working for me. But it may be that I'm calling it in the wrong way. I pass as arguments to this method -- session key, survey id and the stat name. What I get in response is this JSON object --
    { "id": "1", "result": "1", "error": null }

And no, I'm not calling the JSON-RPC webservice the wrong way. Several other methods, like list_questions, list_participants, etc., are working fine.

Could someone help me out here?
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Getting responses for a survey via Remote Control 2 API 11 Monate 4 Wochen her #98675

  • Anurag
  • Anurags Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 22
  • Karma: 0
A gentle bump :)
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Getting responses for a survey via Remote Control 2 API 11 Monate 4 Wochen her #98709

  • Anurag
  • Anurags Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 22
  • Karma: 0
Another gentle bump. Anybody home? :whistle:
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Getting responses for a survey via Remote Control 2 API 11 Monate 4 Wochen her #98714

  • mdekker
  • mdekkers Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 341
  • Dank erhalten: 68
  • Karma: 38
What are you trying to do? Do you know the token or responseid you would like to request? Exporting to csv would result in something easy to parse after receiving it.

What exact calls are you using (minus the sessionid)? What version (build) are you using?
---
Menno Dekker
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Getting responses for a survey via Remote Control 2 API 11 Monate 4 Wochen her #98715

  • Anurag
  • Anurags Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 22
  • Karma: 0
mdekker schrieb:
What are you trying to do? Do you know the token or responseid you would like to request? Exporting to csv would result in something easy to parse after receiving it.

What exact calls are you using (minus the sessionid)? What version (build) are you using?

I'm trying to retrieve all responses to the survey as they would appear in an exported file. I do not want to retrieve info for a particular token, but for the entire respondents. Hence, token info is not required in my request.

Exporting to CSV is not an option as I want to get data in JSON format. As I mentioned before, I'm calling the get_summary function with these arguments -- session key, survey id and the stat name (full_responses).

Limesurvey Version 2.00+ Build 130611

Thanks
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Getting responses for a survey via Remote Control 2 API 11 Monate 4 Wochen her #98722

  • mdekker
  • mdekkers Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 341
  • Dank erhalten: 68
  • Karma: 38
The get_summary will only report how many responses are available, not the response itself. So if you want responses, the only option you have is to use export_responses and parse csv output.
---
Menno Dekker
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.147 Sekunden
Donation Image