Fetch form metadata from a SurveyCTO server
Source:R/scto_get_form_metadata.R
scto_get_form_metadata.Rd
This function fetches metadata, including form definitions, for deployed and previous versions of one or more forms.
Arguments
- auth
scto_auth()
object.- form_ids
Character vector indicating the form ids.
NULL
indicates all forms.- deployed_only
Logical indicating whether to fetch metadata for all versions of each form, or only for the deployed version.
- get_defs
Logical indicating whether to fetch form definitions.
Value
A data.table
with one row per form (and per version, if
deployed_only
is FALSE
). Definitions are returned as nested
data.table
s, which can be unnested using
scto_unnest_form_definitions()
.
Examples
if (FALSE) { # \dontrun{
auth = scto_auth('scto_auth.txt')
form_metadata = scto_get_form_metadata(auth, 'my_form')
form_defs = scto_unnest_form_definitions(form_metadata)
} # }