Using the cURL API to Import Registry or Study Data

Importing Data Using the cURL API in Ripple Science

The Import cURL API enables Site Admins and Site Managers to efficiently import data from third-party systems into the Registry or a specific study in bulk. This method allows for automated data synchronization without manually using the Ripple Import Tool.

πŸ“Œ Key Benefits of Using the Import cURL API

βœ… Bulk Data Import – Load large datasets without manual intervention.
βœ… Automated & On-Demand – Run the command anytime to update data.
βœ… System Integration – Sync Ripple with external databases or CRMs.
βœ… Improved Data Harmonization – Keep data consistent across systems.

What You Need Before You Start

1️⃣ Ripple Site URL – The API endpoint for data import.
2️⃣ Study ID – Use the Study ID or "global" for Registry imports.
3️⃣ Update Options – Define what happens to existing participants.
4️⃣ Authorization Key – A valid API key for authentication.
5️⃣ Formatted Excel File (XLSX) – Ensure data aligns with the Ripple Data Dictionary.
6️⃣ Import cURL Command – A properly formatted command based on your OS.

Import cURL Command Format

Mac Users

Windows Users

πŸ“Œ Update Options for Existing Participants

Tables can't be imported directly. Please insert an image of your table which can be found here.

Option How to Write in cURL Command

Step-by-Step Instructions

1️⃣ Open Terminal (Mac) or Command Prompt (Windows)

  • Mac Users β†’ Open Terminal
  • Windows Users β†’ Open Command Prompt (cmd.exe)

2️⃣ Paste in the Import cURL Command

  • Copy and paste the relevant command (Mac or Windows format).

3️⃣ Replace Placeholders with Actual Values
βœ… RippleSiteURL β†’ Enter your Ripple API URL.
βœ… StudyId β†’ Enter your Study ID or "global" for Registry.
βœ… UpdateOption β†’ Choose from "all", "nocontact", or "noexisting".
βœ… AuthorizationKey β†’ Replace with your actual API key.
βœ… LocationAndNameOfExcel.xlsx β†’ Provide the full path to your Excel file.4️⃣ Execute the Command

  • Press Enter to start the import process.

5️⃣ Verify the Import in Ripple

  • Log into Ripple and confirm that the data has been imported correctly.

πŸ“Œ Example: Importing Event Completion Data

Scenario

A Study Data Analyst needs to import Event Completion Data and Custom Variables from CTMS into the Ancillary A Study in Ripple.

  • All participants already exist
  • Updating all participant data

Mac/Linux cURL Command

Windows cURL Command

πŸ“Œ Notes & Best Practices

βœ… Ensure Data is Properly Formatted

  • The Excel file must match Ripple’s Data Dictionary formatting.
  • Only existing fields in Ripple can be imported.

βœ… Check Special Characters in File Paths

  • Mac/Linux β†’ Use /Users/username/path/to/file.xlsx
  • Windows β†’ Use C:\Users\username\path\to\file.xlsx

βœ… Automate Importing Data

  • Schedule imports using cron jobs (Mac/Linux) or Task Scheduler (Windows).

βœ… Troubleshooting Errors

  • Authentication Error? β†’ Check if the API key is correct.
  • Invalid File Path? β†’ Ensure the file location is correct.
  • Data Not Importing? β†’ Confirm that all column names match Ripple’s Data Dictionary.