Skip to content

About

Redcap External Module to manage the user allowlist via API

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User AllowList API - Redcap External Module

What does it do?

Exposes REDCap's External Module API for adding, removing, or searching for usernames in the REDCap allowlist. Requests require a super API token.

Version 2.0 breaking changes

Version 2.0 replaces the custom page endpoint used in version 1.x with REDCap's native External Module API. Existing integrations must be updated: requests to ?type=module&prefix=user_allowlist_api&page=api are no longer supported. Send requests to /api/ using content=externalModule, prefix=user_allowlist_api, and the desired action, as shown below.

The add, remove, and search actions and the user parameter are retained. Authentication is now handled by REDCap's API framework; requests must use a super API token as before.

Requests

curl --request POST \
  --url https://redcap.example.org/api/ \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data content=externalModule \
  --data prefix=user_allowlist_api \
  --data token=SUPER_API_TOKEN \
  --data format=json \
  --data returnFormat=json \
  --data action=add \
  --data-urlencode user=username

Responses

{
    "status": "string",  // 'success' or 'failure'
    "message": "string", // Explanation of the action
    "value": bool        // true or false; null for an application-level error
}

Use action=remove or action=search to remove or check a username. Project-scoped API tokens are not accepted.

Installing

You can install the module from the REDCap EM repo or drop it directly in your modules folder (i.e. redcap/modules/user_allowlist_api_v1.0.0).

About

Redcap External Module to manage the user allowlist via API

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages