Get the Service Document from the OData Dataset Service.
Source:R/odata_entitylist_service_get.R
odata_entitylist_service_get.Rd
Usage
odata_entitylist_service_get(
pid = get_default_pid(),
did = "",
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()
)
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")
.- did
(chr) The name of the Entity List, internally called Dataset. The function will error if this parameter is not given. Default: "".
- 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.
- 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
/version.txt
. Discard the "v".ruODK
uses this parameter to adjust for breaking changes in ODK Central.Default:
get_default_odkc_version
or "2023.5.1" if unset.Set default
get_default_odkc_version
throughru_setup(odkc_version="2023.5.1")
.See
vignette("Setup", package = "ruODK")
.- 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
An S3 class odata_entitylist_service_get
with two list items:
context
The URL for the OData metadata documentvalue
A tibble of EntitySets available in this EntityList
Details
ODK Central presents one OData service for every Dataset (Entity List)
as a way to get an OData feed of Entities.
To access the OData service, add .svc
to the resource URL for the given
Dataset (Entity List).
The Service Document provides a link to the main source of information in this OData service: the list of Entities in this Dataset, as well as the Metadata Document describing the schema of this information.
This document is available only in JSON format.
See also
https://docs.getodk.org/central-api-odata-endpoints/#odata-dataset-service
Other entity-management:
entity_audits()
,
entity_changes()
,
entity_create()
,
entity_delete()
,
entity_detail()
,
entity_list()
,
entity_update()
,
entity_versions()
,
entitylist_detail()
,
entitylist_download()
,
entitylist_list()
,
entitylist_update()
,
odata_entitylist_data_get()
,
odata_entitylist_metadata_get()
Examples
if (FALSE) { # \dontrun{
# See vignette("setup") for setup and authentication options
# ruODK::ru_setup(svc = "....svc", un = "me@email.com", pw = "...")
ds <- entitylist_list(pid = get_default_pid())
ds1 <- odata_entitylist_service_get(pid = get_default_pid(), did = ds$name[1])
ds1
ds1$context
ds1$value
} # }