-
Couldn't load subscription status.
- Fork 28
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
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.exportRecordssets 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
redcapAPIpackage always sets this to 'raw' and uses the data dictionary to internally convert data if requested with thelabelsargument inexportRecords. -
eventName is always passed to the API as 'unique'. Consequently, in the data frame obtained, the field
redcap_event_namewill 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 theRuser.
- overwriteBehavior
- data
- returnContent
-
token is provided to the API calls via a
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.exportRecordssets 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 theRuser.
- report_id
- exportCheckboxLabels
-
token is provided to the API calls via a
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.exportReportssets 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 theRuser.
-
token is provided to the API calls via a
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.exportMetaDatasets 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
redcapAPIpackage pulls the entire data dictionary. -
forms. This would allow the user to change the forms for which meta data is retrieved. By default, the
redcapAPIpackage 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 theRuser.
- record
- field
- event
-
token is provided to the API calls via a
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.exportFilessets 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 theRuser.
- record
- field
- event
- file
-
token is provided to the API calls via a
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.importFilessets 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 theRuser.
- record
- field
- event
-
token is provided to the API calls via a
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.deleteFilessets 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 theRuser.
Available after REDCap 5.9.
-
token is provided to the API calls via a
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.exportInstrumentssets 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
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.exportEventssets 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 theRuser.
- arms
-
token is provided to the API calls via a
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.exportArmssets 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 theRuser.
- arms
-
token is provided to the API calls via a
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.exportMappingssets 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 theRuser.
-
token is provided to the API calls via a
redcapConnectionobject. Thus, the user may not directly pass the token but must first alter theredcapConnectionobject 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
redcapAPIto correspond with the desired output.exportUserssets 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 theRuser.