Creates a folder in the file repository. This can be made a subfolder of an existing folder, given the folder ID of the parent folder.
createFileRepositoryFolder(
rcon,
name,
folder_id = numeric(0),
dag_id = numeric(0),
role_id = numeric(0),
...
)# S3 method for redcapApiConnection
createFileRepositoryFolder(
rcon,
name,
folder_id = numeric(0),
dag_id = numeric(0),
role_id = numeric(0),
...,
refresh = TRUE,
error_handling = getOption("redcap_error_handling"),
config = list(),
api_param = list()
)
A redcapConnection
object.
character(1)
The name of the folder. If a folder by
this name already exists, no action will be taken.
integerish(0/1)
. The ID of the parent folder. If
length is 0, the new folder is placed in the top-level.
integerish(0/1)
The ID of a data access group. If
provided, access to the folder will be restricted to the DAG.
integerish(0/1)
The ID of a role. If provided,
access to the folder will be restricted to users with that role.
Additional arguments to be passed between methods
logical(1)
When TRUE
(default), the cached
File Repository data on rcon
will be refreshed.
An option for how to handle errors returned by the API.
see redcap_error
list
Additional configuration parameters to pass to
POST
. These are appended to any parameters in
rcon$config
.
list
Additional API parameters to pass into the
body of the API call. This provides users to execute calls with options
that may not otherwise be supported by redcapAPI
.
Benjamin Nutter
This method allows you to create a new folder in the File Repository. You may optionally provide the folder_id of the parent folder under which you wish this folder to be created. Providing a dag_id and/or role_id will allow you to restrict access to only users within a specific DAG (Data Access Group) or User Role, respectively.