Welcome to the LimeSurvey Community Forum

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

Using method set_survey_properties in R

  • migliorati
  • migliorati's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 months ago #235472 by migliorati
Using method set_survey_properties in R was created 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.

  • migliorati
  • migliorati's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #235741 by migliorati
Replied by migliorati on topic Using method set_survey_properties in R
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.

Lime-years ahead

Online-surveys for every purse and purpose