Learn R Programming

redcapAPI (version 2.7.4)

createFileRepositoryFolder: Create a Folder in the File Repository

Description

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.

Usage

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() )

Arguments

rcon

A redcapConnection object.

name

character(1) The name of the folder. If a folder by this name already exists, no action will be taken.

folder_id

integerish(0/1). The ID of the parent folder. If length is 0, the new folder is placed in the top-level.

dag_id

integerish(0/1) The ID of a data access group. If provided, access to the folder will be restricted to the DAG.

role_id

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

refresh

logical(1) When TRUE (default), the cached File Repository data on rcon will be refreshed.

error_handling

An option for how to handle errors returned by the API. see redcap_error

config

list Additional configuration parameters to pass to POST. These are appended to any parameters in rcon$config.

api_param

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.

Author

Benjamin Nutter

Details

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.