updateSurvey: Update Survey

Description Usage Arguments Value Examples

View source: R/legacy_crud.R

Description

Updates a survey
https://api.qualtrics.com/reference#update-survey [] not all args handled atm

Usage

1
2
3
4
5
6
7
8
9
updateSurvey(
  surveyId,
  name = NULL,
  isActive = c(TRUE, FALSE),
  expirationStartDate = NULL,
  expirationEndDate = NULL,
  ownerID = NULL,
  yourapitoken = Sys.getenv("QSI_TOKEN")
)

Arguments

surveyId

String. Survey ID

name

String. New survey name

isActive

Boolean. Survey status

expirationStartDate

String. Defines the active time range for the survey. Example: "startDate":"2016-01-01T01:00:00Z", "endDate":"2016-03-01T01:00:00Z". See Dates and Times for more information on the date and time format.

expirationEndDate

String. See expirationStartDate

ownerID

String. The new owner of the survey. Note that the caller must own the survey to set a new owner.

yourapitoken

String from renviron

Value

response() object

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(qualtRics)
to_deactivate <- all_surveys() %>%
  mutate(lastMod = as.Date(lastModified)) %>%
  filter(isActive == TRUE & lastMod <= "2017-01-01")

updateSurvey(to_deactivate$id[1], isActive=FALSE)

## End(Not run)

derring-do/qualtricks documentation built on April 25, 2021, 12:38 a.m.