RedcapAPI 1.3.3

dotnet add package RedcapAPI --version 1.3.3
NuGet\Install-Package RedcapAPI -Version 1.3.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RedcapAPI" Version="1.3.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RedcapAPI --version 1.3.3
#r "nuget: RedcapAPI, 1.3.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RedcapAPI as a Cake Addin
#addin nuget:?package=RedcapAPI&version=1.3.3

// Install RedcapAPI as a Cake Tool
#tool nuget:?package=RedcapAPI&version=1.3.3

Build Status

NuGet license

Project Feedback, using REDCap of course: https://redcap.vcu.edu/surveys/?s=KJLHWRTJYA #Update 1.3.3

  • Added support for .NET 7.0
  • multiple bug fixes

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

  1. Local redcap instance installed (visit https://project-redcap.org) if you need to download files(assuming you have access)
  2. Create a new project with "Demographics" for the template; this gives you a basic project to work with.
  3. Create an api token for yourself, replace that with the tokens you see on the "RedcapApiTests.cs" files, and others
  4. You'll may need to add a field type of "file_upload" so that you can test the file upload interface of the API
  5. Build the solution, then run the tests

API METHODS SUPPORTED (Not all listed)

  • ExportLoggingAsync
  • ExportDagsAsync
  • ImportDagsAsync
  • DeleteDagsAsync
  • ExportArmsAsync
  • ImportArmsAsync
  • DeleteArmsAsync
  • ExportEventAsync
  • ImportEventAsync
  • ExportFileAsync
  • ImportFileAsync
  • DeleteFileAsync
  • ExportMetaDataAsync
  • ExportRecordsAsync
  • ImportRecordsAsync
  • ExportRedcapVersionAsync
  • ExportUsersAsync

Usage:

  1. dotnet restore
  2. Add reference to the library in your project, or download from nuget into project
  3. Add "using Redcap" namespace
  4. Add "using Redcap.Models" for convenience
  5. Replace the demo api token with your test project or you can import the data dictionary in \Docs thats provided for convenience.
  6. 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("https://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.3.3

.NET CLI

dotnet add package RedcapAPI --version 1.3.3

Paket CLI

paket add RedcapAPI --version 1.3.3

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 Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.3 1,583 10/13/2023
1.3.2 603 5/20/2023
1.3.1 590 1/9/2023
1.3.0 277 1/7/2023
1.1.0 1,631 2/5/2021
1.0.9 700 10/3/2020
1.0.8 2,468 1/27/2020
1.0.7 1,108 2/24/2019
1.0.6 698 2/13/2019
1.0.5 667 2/12/2019
1.0.4-beta 619 9/28/2018
1.0.1-beta 680 7/3/2018
0.4.0-alpha 820 9/22/2017
0.3.0-alpha 821 9/15/2017
0.2.8-alpha 965 9/13/2017
0.2.6-alpha-release 842 8/31/2017
0.2.1 1,169 8/2/2017

- .NET 7.0
- Bug fixes