View source: R/entity_versions.R
entity_versions | R Documentation |
entity_versions(
pid = get_default_pid(),
did = "",
eid = "",
conflict = FALSE,
url = get_default_url(),
un = get_default_un(),
pw = get_default_pw(),
retries = get_retries(),
odkc_version = get_default_odkc_version(),
orders = get_default_orders(),
tz = get_default_tz()
)
pid |
The numeric ID of the project, e.g.: 2. Default: Set default See |
did |
(chr) The name of the Entity List, internally called Dataset. The function will error if this parameter is not given. Default: "". |
eid |
(chr) The UUID of an Entity, which can be retrieved by
|
conflict |
(lgl) Whether to return all versions ( |
url |
The ODK Central base URL without trailing slash. Default: Set default See |
un |
The ODK Central username (an email address).
Default: |
pw |
The ODK Central password.
Default: |
retries |
The number of attempts to retrieve a web resource. This parameter is given to Default: 3. |
odkc_version |
The ODK Central version as a semantic version string
(year.minor.patch), e.g. "2023.5.1". The version is shown on ODK Central's
version page Default: Set default See |
orders |
(vector of character) Orders of datetime elements for lubridate. Default:
|
tz |
A timezone to convert dates and times to. Read |
This returns the Entity metadata and data for every version of this Entity in ascending creation order.
The ODK Central endpoint supports retrieving extended metadata which this function always returns.
There is an optional query flag relevantToConflict
that returns the subset
of past versions of an Entity that are relevant to the Entity's current
conflict. This includes the latest version, the base version, the previous
server version, and any other versions since the last time the Entity was
in a conflict-free state. If the Entity is not in conflict, zero versions
are returned.
A tibble with one row per version. List columns contain unstructured
data.
See https://docs.getodk.org/central-api-entity-management/#listing-versions
for the full schema.
Top level list elements are renamed from ODK's camelCase
to snake_case
.
Nested list elements have the original camelCase
.
https://docs.getodk.org/central-api-entity-management/#listing-versions
Other entity-management:
entity_audits()
,
entity_changes()
,
entity_create()
,
entity_delete()
,
entity_detail()
,
entity_list()
,
entity_update()
,
entitylist_detail()
,
entitylist_download()
,
entitylist_list()
,
entitylist_update()
,
odata_entitylist_data_get()
,
odata_entitylist_metadata_get()
,
odata_entitylist_service_get()
## Not run:
# See vignette("setup") for setup and authentication options
# ruODK::ru_setup(svc = "....svc", un = "me@email.com", pw = "...")
el <- entitylist_list()
# Entity List name (dataset ID, did)
did <- el$name[1]
# All Entities of Entity List
en <- entity_list(did = did)
ed <- entity_detail(did = did, eid = en$uuid[1])
# The current version of the first Entity
ev <- en$current_version_version[1]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.