Using method set_survey_properties in R

More
1 month 4 weeks ago #235472 by migliorati
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.3
Own server or LimeSurvey hosting: own server
Survey theme/template:
==================
Hi guys. I'm trying to set via API the expires date for a survey, and to do this I'm using the method set_survey_properties in R, but it seems not working.
Please, has someone a working example of invoking set_survey_properties in R?
Thank you so much
Manlio

Please Log in to join the conversation.

More
1 month 4 weeks ago #235741 by migliorati
Solved, here a working example code in R:

charDate="2022-11-24 12:00:00"
prop.list=list(aSurveyData=list("datecreated"=charDate))
par <- c(key.list, id.list,prop.list)
m="set_survey_properties"
body.json <- list(method = m, id = " ", params = par)
r <- httr::POST(getOption("lime_api"),
httr::content_type_json(),
body = jsonlite::toJSON(body.json, auto_unbox = TRUE))
text_content(r)
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now