RedcapAPI 1.0.9
See the version list below for details.
dotnet add package RedcapAPI --version 1.0.9
NuGet\Install-Package RedcapAPI -Version 1.0.9
<PackageReference Include="RedcapAPI" Version="1.0.9" />
paket add RedcapAPI --version 1.0.9
#r "nuget: RedcapAPI, 1.0.9"
// Install RedcapAPI as a Cake Addin #addin nuget:?package=RedcapAPI&version=1.0.9 // Install RedcapAPI as a Cake Tool #tool nuget:?package=RedcapAPI&version=1.0.9
Project Feedback, using REDCap of course: https://redcap.vcu.edu/surveys/?s=KJLHWRTJYA
REDCap API Library for .NET
The REDCap Api Library for .NET provides the ability to interact with REDCap programmatically using various .NET languages(C#,F#,VB.NET);
Prerequisites
- Local redcap instance installed (visit https://project-redcap.org) if you need to download files(assuming you have access)
- Create a new project with "Demographics" for the template; this gives you a basic project to work with.
- Create an api token for yourself, replace that with the tokens you see on the "RedcapApiTests.cs" files, and others
- You'll may need to add a field type of "file_upload" so that you can test the file upload interface of the API
- Build the solution, then run the tests
API METHODS SUPPORTED (Not all listed)
- ExportArmsAsync
- ImportArmsAsync
- DeleteArmsAsync
- ExportEventAsync
- ImportEventAsync
- ExportFileAsync
- ImportFileAsync
- DeleteFileAsync
- ExportMetaDataAsync
- ExportRecordsAsync
- ImportRecordsAsync
- ExportRedcapVersionAsync
- ExportUsersAsync
Usage:
- dotnet restore
- Add reference to the library in your project, or download from nuget into project
- Add "using Redcap" namespace
- Add "using Redcap.Models" for convenience
- Replace the demo api token with your test project or you can import the data dictionary in \Docs thats provided for convenience.
- Feel free to contribute
Sample / Example
using System;
using Newtonsoft.Json;
using Redcap;
using Redcap.Models;
namespace RedcapApiDemo
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Redcap Api Demo Started!");
// Use your own API Token here...
var apiToken = "3D57A7FA57C8A43F6C8803A84BB3957B";
var redcap_api = new RedcapApi("http://localhost/redcap/api/");
Console.WriteLine("Exporting all records from project.");
var result = redcap_api.ExportRecordsAsync(apiToken).Result;
var data = JsonConvert.DeserializeObject(result);
Console.WriteLine(data);
Console.ReadLine();
}
}
}
Install directly in Package Manager Console or Command Line Interface
Package Manager
Install-Package RedcapAPI -Version 1.0.9
.NET CLI
dotnet add package RedcapAPI --version 1.0.9
Paket CLI
paket add RedcapAPI --version 1.0.9
Example Project
A console project has been included with the source code to get started. Some examples of method usage. You can use this to get started potentially.
Test Project
A project with associated test cases is included. Make sure to change the api token
Please Cite Us
Publications resulting from the use of this software should cite the Wright Center's Clinical and Translational Science Award (CTSA) grant #UL1TR002649, National Center for Advancing Translational Sciences, NIH.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 11.0.2)
- Serilog (>= 2.7.1)
- System.ComponentModel.Annotations (>= 4.5.0)
- System.ValueTuple (>= 4.5.0)
- xunit.extensibility.core (>= 2.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
- add improvements to 'ImportRecordsAsync'
Add ability to declare csv delimiter to match REDCap's API paramters
- minor update documentation
- Minor version bump