-
Notifications
You must be signed in to change notification settings - Fork 12
/
attachment_list.Rd
102 lines (79 loc) · 2.93 KB
/
attachment_list.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/attachment_list.R
\name{attachment_list}
\alias{attachment_list}
\title{List all attachments for a list of submission instances.}
\usage{
attachment_list(
iid,
pid = get_default_pid(),
fid = get_default_fid(),
url = get_default_url(),
un = get_default_un(),
pw = get_default_pw(),
retries = get_retries()
)
}
\arguments{
\item{iid}{A list of submission instance IDs, e.g. from
\code{\link{submission_list}$instance_id}.}
\item{pid}{The numeric ID of the project, e.g.: 2.
Default: \code{\link{get_default_pid}}.
Set default \code{pid} through \code{ru_setup(pid="...")}.
See \code{vignette("Setup", package = "ruODK")}.}
\item{fid}{The alphanumeric form ID, e.g. "build_Spotlighting-0-8_1559885147".
Default: \code{\link{get_default_fid}}.
Set default \code{fid} through \code{ru_setup(fid="...")}.
See \code{vignette("Setup", package = "ruODK")}.}
\item{url}{The ODK Central base URL without trailing slash.
Default: \code{\link{get_default_url}}.
Set default \code{url} through \code{ru_setup(url="...")}.
See \code{vignette("Setup", package = "ruODK")}.}
\item{un}{The ODK Central username (an email address).
Default: \code{\link{get_default_un}}.
Set default \code{un} through \code{ru_setup(un="...")}.
See \code{vignette("Setup", package = "ruODK")}.}
\item{pw}{The ODK Central password.
Default: \code{\link{get_default_pw}}.
Set default \code{pw} through \code{ru_setup(pw="...")}.
See \code{vignette("Setup", package = "ruODK")}.}
\item{retries}{The number of attempts to retrieve a web resource.
This parameter is given to \code{\link[httr]{RETRY}(times = retries)}.
Default: 3.}
}
\value{
A tibble containing some high-level details of the submission
attachments.
One row per submission attachment, columns are submission attributes:
\if{html}{\out{<div class="sourceCode">}}\preformatted{ * name: The attachment filename, e.g. 12345.jpg
* exists: Whether the attachment for that submission exists on the
server.
}\if{html}{\out{</div>}}
}
\description{
List all attachments for a list of submission instances.
}
\examples{
\dontrun{
# Step 1: Setup ruODK with OData Service URL (has url, pid, fid)
ruODK::ru_setup(svc = "...")
# Step 2: List all submissions of form
sl <- submission_list()
# Step 3a: Get attachment list for first submission
al <- get_one_submission_att_list(sl$instance_id[[1]])
# Ste 3b: Get all attachments for all submissions
all <- attachment_list(sl$instance_id)
}
}
\seealso{
\url{https://docs.getodk.org/central-api-submission-management/#listing-expected-submission-attachments}
\url{https://docs.getodk.org/central-api-form-management/#listing-form-attachments}
Other submission-management:
\code{\link{encryption_key_list}()},
\code{\link{submission_audit_get}()},
\code{\link{submission_detail}()},
\code{\link{submission_export}()},
\code{\link{submission_get}()},
\code{\link{submission_list}()}
}
\concept{submission-management}