Add a response to the survey responses collection

lsAddResponse(
  surveyID,
  response,
  lsAPIurl = getOption("lsAPIurl"),
  sessionKey = NULL
)

Arguments

surveyID

ID of the survey

response

The actual response. A list of answers, where the keys must follow the format paste0(surveyID, "X", groupID, "X", questionID) e.g. "527317X1X11". To obtain these group and question IDs, see lsListGroups() and lsListQuestions()

lsAPIurl

(optional) The URL of the LimeSurvey RemoteControl 2 JSON-RPC API

sessionKey

(optional) Authentication token, see lsGetSessionKey()

Value

The response ID or an list with status message (can include result_id)

References

https://api.limesurvey.org/classes/remotecontrol_handle.html#method_add_response

Examples

if (FALSE) { lsAddResponse("123456", list("326623X37X288" = "This answer comes via RPC", "326623X38X289" = "This one also")) }