Usage
project_replace(
pid = get_default_pid(),
name,
description = "",
archived = FALSE,
url = get_default_url(),
un = get_default_un(),
pw = get_default_pw(),
retries = get_retries()
)Arguments
- pid
The numeric ID of the project, e.g.: 2.
Default:
get_default_pid.Set default
pidthroughru_setup(pid="...").See
vignette("Setup", package = "ruODK").- name
(character) The desired name of the Project.
- description
(character) The desired description of the Project.
- archived
(lgl) Archive the Project.
- url
The ODK Central base URL without trailing slash.
Default:
get_default_url.Set default
urlthroughru_setup(url="...").See
vignette("Setup", package = "ruODK").- un
The ODK Central username (an email address). Default:
get_default_un. Set defaultunthroughru_setup(un="..."). Seevignette("Setup", package = "ruODK").- pw
The ODK Central password. Default:
get_default_pw. Set defaultpwthroughru_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.
Value
A tibble with one row holding the replaced Project's metadata as columns, as per the ODK Central API docs.
Details
This endpoint allows a deep update of Project metadata, Form metadata,
and Form Assignment metadata at once and transactionally using a
nested data format.
This function replaces the top-level Project metadata.
Each call sends the complete name, description and archived
flag.
Omitted Form detail is left as-is, but this function sends no Form
detail.
Form states and assignments need a direct call to the ODK Central
API.
See also
https://docs.getodk.org/central-api-project-management/#deep-updating-project-and-form-details
Other project-management:
form_assignment_role_list(),
project_assignment_actors(),
project_assignment_grant(),
project_assignment_revoke(),
project_create(),
project_delete(),
project_detail(),
project_enable_encryption(),
project_list(),
project_update()
Examples
if (FALSE) { # \dontrun{
# See vignette("setup") for setup and authentication options
# ruODK::ru_setup(svc = "....svc", un = "me@email.com", pw = "...")
p <- project_create("Test Project")
p <- project_replace(
pid = p$id,
name = "Renamed Project",
description = "A test project.",
archived = FALSE
)
p$name
# > "Renamed Project"
} # }
