Welcome to the LimeSurvey Community Forum

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

Get new responses of a survey based on time

  • someuser99
  • someuser99's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 11 months ago #183901 by someuser99
I have written a backend application that gets the data of all the responses of my lime survey and adds them to another data bank. I am using lime survey RPC to accomplish it.

Right now, I am using 'export_responses' and it gives me all the responses every time i make a query. What I would like is to have only the newly added responses based on the date/time that i provide.

I am trying to accomplish it using export_timeline method. Is it the correct method to achieve it? I am unable to find any examples on using this method. I try the following, get a status 200 OK in postman but no data.

{
"method": "export_timeline",
"params": [
"DQbrX4RSessionKeyBiCUR7SKK", //sesssion key
"777857", //survey id
"day",
"01-01-2019",
"01-01-2020"
],
"id": 1
}
The topic has been locked.
  • someuser99
  • someuser99's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 11 months ago #183911 by someuser99
Replied by someuser99 on topic Get new responses of a survey based on time
So i got the export _timeline to work by changing the date format like this:

{
"method": "export_timeline",
"params": [
"DQbrX4RSessionKeyBiCUR7SKK", //sesssion key
"777857", //survey id
"day",
"2019-01-01",
"2019-12-31"
],
"id": 1
}

It gives me only the date of on which the response was made and the auto increment number (but not the response id). like this

{"id":1,"result":{"2019-01-02":1},"error":null}

Can i get a response id from a method?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 11 months ago #183915 by DenisChenu
Replied by DenisChenu on topic Get new responses of a survey based on time
Response ID and Time ID are the same (must be).

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.
  • someuser99
  • someuser99's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 11 months ago #183918 by someuser99
Replied by someuser99 on topic Get new responses of a survey based on time
@DenisChenu My survey id's start with 15 for some reason. Could it be that the colleague who set limesurvey up, tested 14 first surveys, deleted them and hence now the number starts from 15? I will have to ask him
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose