lsgs / redcap-rest

REDCap external module enabling additional API functionality e.g. outbound calls
GNU General Public License v3.0
2 stars 0 forks source link
mcri murdoch-childrens redcap redcap-external-module redcap-repo

REDCap REST

Luke Stevens, Murdoch Children's Research Institute https://www.mcri.edu.au

https://github.com/lsgs/redcap-redcap-rest

Description

An external module enabling REDCap to send outbound API calls when saving data entry or survey forms and specified conditions are met. This can facilitate copying of data from your REDCap project to another application via its API, or to another REDCap project in either the same or a different instance of REDCap.

v1.4.0 introduces the facility for configuring sensitive configuration such as API or Autorization tokens at system level rather than hard-coding tokens into project module configuration. Use the placeholder [token-ref:someref] in place of your sensitive configuration value, and have your system administrator configure someref at system level. Tokens configured this way are also masked in logging.

Limitations

Configuration in Projects

Multiple outbound API messages can be configured via the External Modules Configure dialog.

Enabled?

Trigger form(s)

Trigger condition

Destination URL

Payload

Content Type

Additional Headers

cURL Options

Capture of Return Data

API response data can be captured into fields within the same event as the triggering form.

Result Field

Response HTTP Code

Map JSON Response Data to Fields

Examples

REDCap API

Call a REDCap API endpoint to obtain the value of field [fieldtogetvaluefor] for the record id piped in from field [recordtofind]:

Australia/New Zealand Clinical Trial Registry (https://anzctr.org.au/)

Obtain published details of a clinical trial identified using its ANZCTR ID (piped into paylod using [anzctrid]):

Basic Authentication

Send a payload to an API endpoint secured with Basic Auth, uncluding an encoded token as an HTTP header:

Configuration of Sensitive Parameters at System Level (From v1.4.0)

Configure sensitive configuration such as API or Autorization tokens at system level rather than hard-coding tokens into project module configuration. Use the placeholder [token-ref:someref] in place of your sensitive configuration value, and have your system administrator configure someref at system level. Tokens configured this way are also masked in logging.

Token Reference

Token Destination URL

Token Lookup Option

Token Lookup Option "Lookup": Project

Token Lookup Option "Lookup": Username

Token Lookup Option Specify