Usage
submission_list(
pid = get_default_pid(),
fid = get_default_fid(),
url = get_default_url(),
un = get_default_un(),
pw = get_default_pw(),
retries = get_retries(),
orders = get_default_orders(),
tz = get_default_tz()
)
Arguments
- pid
The numeric ID of the project, e.g.: 2.
Default:
get_default_pid
.Set default
pid
throughru_setup(pid="...")
.See
vignette("Setup", package = "ruODK")
.- fid
The alphanumeric form ID, e.g. "build_Spotlighting-0-8_1559885147".
Default:
get_default_fid
.Set default
fid
throughru_setup(fid="...")
.See
vignette("Setup", package = "ruODK")
.- url
The ODK Central base URL without trailing slash.
Default:
get_default_url
.Set default
url
throughru_setup(url="...")
.See
vignette("Setup", package = "ruODK")
.- un
The ODK Central username (an email address). Default:
get_default_un
. Set defaultun
throughru_setup(un="...")
. Seevignette("Setup", package = "ruODK")
.- pw
The ODK Central password. Default:
get_default_pw
. Set defaultpw
throughru_setup(pw="...")
. Seevignette("Setup", package = "ruODK")
.- retries
The number of attempts to retrieve a web resource.
This parameter is given to
RETRY(times = retries)
.Default: 3.
- orders
(vector of character) Orders of datetime elements for lubridate.
Default:
c("YmdHMS", "YmdHMSz", "Ymd HMS", "Ymd HMSz", "Ymd", "ymd")
.- tz
A timezone to convert dates and times to.
Read
vignette("setup", package = "ruODK")
to learn howruODK
's timezone can be set globally or per function.
Value
A tibble containing some high-level details of the form submissions. One row per submission, columns are submission attributes:
See also
https://docs.getodk.org/central-api-submission-management/#listing-all-submissions-on-a-form
Other submission-management:
attachment_list()
,
encryption_key_list()
,
submission_audit_get()
,
submission_detail()
,
submission_export()
,
submission_get()
Examples
if (FALSE) { # \dontrun{
# Set default credentials, see vignette("setup")
ruODK::ru_setup(
svc = ...,
un = "me@email.com",
pw = "..."
)
sl <- submission_list()
sl %>% knitr::kable(.)
fl <- form_list()
# submission_list returns a tibble
class(sl)
# > c("tbl_df", "tbl", "data.frame")
# Submission attributes are the tibble's columns
names(sl)
# > "instance_id" "submitter_id" "device_id" "created_at" "updated_at"
# Number of submissions (rows) is same as advertised in form_list
form_list_nsub <- fl %>%
filter(fid == get_test_fid()) %>%
magrittr::extract2("submissions") %>%
as.numeric()
nrow(sl) == form_list_nsub
# > TRUE
} # }