Learn R Programming

redcapAPI (version 2.7.4)

deleteFromFileRepository: Delete a Single File from the File Repository

Description

Deletes a single file from the File Repository based on its document ID.

Usage

deleteFromFileRepository(rcon, doc_id, ...)

# S3 method for redcapApiConnection deleteFromFileRepository( rcon, doc_id, ..., refresh = TRUE, error_handling = getOption("redcap_error_handling"), config = list(), api_param = list() )

Arguments

rcon

A redcapConnection object.

doc_id

integerish(1) The document ID of the file to be deleted.

...

Arguments to pass to other 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 delete a single file in a project's File Repository. Once deleted, the file will remain in the Recycle Bin folder for up to 30 days.