Get new responses of a survey based on time

More
3 months 2 weeks 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
}

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
3 months 2 weeks ago #183911 by someuser99
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?

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #183915 by DenisChenu
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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
3 months 2 weeks ago #183918 by someuser99
@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

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!