Learn R Programming

redcapAPI (version 2.7.4)

deleteFiles: Delete a File attached to a Record

Description

This function allows you to remove a document that has been attached to an individual record

Usage

deleteFiles(rcon, record, field, event, ...)

# S3 method for redcapApiConnection deleteFiles( rcon, record = NULL, field = NULL, event = NULL, repeat_instance = NULL, ..., error_handling = getOption("redcap_error_handling"), config = list(), api_param = list() )

Arguments

rcon

A REDCap connection object as generated by redcapConnection

record

The record ID in which the desired file is stored. Must be length 1.

field

The field name in which the file is stored. Must be length 1.

event

The event name for the file. Must be length 1. This applies only to longitudinal projects. If the event is not supplied for a longitudinal project, the API will return an error message.

...

Arguments to be passed to other methods

repeat_instance

The repeat instance number of the repeating event or the repeating instrument. When available in your instance of REDCap, and passed as NULL, the API will assume a value of 1.

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

References

Please refer to your institution's API documentation.

Additional details on API parameters are found on the package wiki at https://github.com/vubiostat/redcapAPI/wiki/REDCap-API-Parameters