-
Notifications
You must be signed in to change notification settings - Fork 27
REDCap API Parameters
Shawn Garbett edited this page Jan 25, 2023
·
1 revision
Each API function accepts a set of parameters that may or may not be accessible via the redcapAPI
package. This page lists all of the parameters for each API function, whether it is accessible to the R user, and the rationale for excluding it (if it was excluded).
- Export Records
- Import Records
- Export Reports
- Export Metadata (i.e. Data Dictionary)
- Export a File
- Import a File
- Delete a File
- Export Instruments
- Export Events
- Export Arms
- Export Form-Event Mappings
- Export Users
- fields
- forms
- events
-
exportSurveyFields appears as the argument
survey
-
exportDataAccessGroups appears as the argument
dag
- exportCheckboxLabels (Available only after REDCap 6.0)
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.exportRecords
sets the content value to 'record'. -
format. Since the intent is to return an analysis-ready data frame, this is always set to 'csv' as it is the easiest to read into a data frame within
R
. - type. Always set to flat for the convenience of converting to a data frame.
-
rawOrLabel. This option determines if the API returns coded or labeled data. The
redcapAPI
package always sets this to 'raw' and uses the data dictionary to internally convert data if requested with thelabels
argument inexportRecords
. -
eventName is always passed to the API as 'unique'. Consequently, in the data frame obtained, the field
redcap_event_name
will always give the unique event name. If you really wish to use the labeled event name, it may be obtained by merging with the events table obtained throughexportEvents
. -
returnFormat is always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.
- overwriteBehavior
- data
- returnContent
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.exportRecords
sets the content value to 'record'. -
format. Since the intent is to return an analysis-ready data frame, this is always set to 'csv' as it is the easiest to read into a data frame within
R
. - type. Always set to flat for the convenience of converting to a data frame.
-
returnFormatis always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.
- report_id
- exportCheckboxLabels
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.exportReports
sets the content value to 'report'. -
format. Since the intent is to return an analysis-ready data frame, this is always set to 'csv' as it is the easiest to read into a data frame within
R
. -
returnFormatis always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.exportMetaData
sets the content value to 'metadata'. -
format. Since the intent is to return an analysis-ready data frame, this is always set to 'csv' as it is the easiest to read into a data frame within
R
. -
fields. This would allow the user to change the fields for which meta data is retrieved. By default, the
redcapAPI
package pulls the entire data dictionary. -
forms. This would allow the user to change the forms for which meta data is retrieved. By default, the
redcapAPI
package pulls the entire data dictionary. -
returnFormat is always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.
- record
- field
- event
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.exportFiles
sets the content value to 'file'. - action. For file export, this is always set to 'export'.
-
returnFormatis always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.
- record
- field
- event
- file
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.importFiles
sets the content value to 'file'. - action. For file export, this is always set to 'import'.
-
returnFormatis always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.
- record
- field
- event
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.deleteFiles
sets the content value to 'file'. - action. For file export, this is always set to 'delete'.
-
returnFormatis always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.
Available after REDCap 5.9.
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.exportInstruments
sets the content value to 'instrument'. -
format Since the intent is to return an analysis-ready data frame, this is always set to 'csv' as it is the easiest to read into a data frame within
R
.
- arms
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.exportEvents
sets the content value to 'event'. -
format Since the intent is to return an analysis-ready data frame, this is always set to 'csv' as it is the easiest to read into a data frame within
R
. -
returnFormatis always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.
- arms
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.exportArms
sets the content value to 'arm'. -
format Since the intent is to return an analysis-ready data frame, this is always set to 'csv' as it is the easiest to read into a data frame within
R
. -
returnFormatis always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.
- arms
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.exportMappings
sets the content value to 'formEventMapping'. -
format Since the intent is to return an analysis-ready data frame, this is always set to 'csv' as it is the easiest to read into a data frame within
R
. -
returnFormatis always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.
-
token is provided to the API calls via a
redcapConnection
object. Thus, the user may not directly pass the token but must first alter theredcapConnection
object in order to change the token.
-
content. This option specifies the type of content returned (records, events, arms, files, etc). It is hard-coded within each function in
redcapAPI
to correspond with the desired output.exportUsers
sets the content value to 'user'. -
format Since the intent is to return an analysis-ready data frame, this is always set to 'csv' as it is the easiest to read into a data frame within
R
. -
returnFormat is always set to 'csv'. This option governs how messages from the API are returned to
R
. The 'csv' option gives the most convenient format for displaying those messages to theR
user.