DocMgt.RESTHelper 5.0.4487

dotnet add package DocMgt.RESTHelper --version 5.0.4487
                    
NuGet\Install-Package DocMgt.RESTHelper -Version 5.0.4487
                    
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="DocMgt.RESTHelper" Version="5.0.4487" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DocMgt.RESTHelper" Version="5.0.4487" />
                    
Directory.Packages.props
<PackageReference Include="DocMgt.RESTHelper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DocMgt.RESTHelper --version 5.0.4487
                    
#r "nuget: DocMgt.RESTHelper, 5.0.4487"
                    
#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.
#:package DocMgt.RESTHelper@5.0.4487
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DocMgt.RESTHelper&version=5.0.4487
                    
Install as a Cake Addin
#tool nuget:?package=DocMgt.RESTHelper&version=5.0.4487
                    
Install as a Cake Tool

DocMgt.RESTHelper

REST API client library for the DocMgt document management platform.

⚠️ Version 5.x Breaking Change

Version 5.x requires .NET 8.0 or higher. If your project targets .NET Framework 4.7.2 or .NET Standard 2.0, stay on version 4.x.

Your Project Targets Use Version
.NET Framework 4.7.2 4.x (latest 4.x release)
.NET Standard 2.0 4.x (latest 4.x release)
.NET 8.0 5.x
.NET 9.0 5.x
.NET 10.0 5.x

What changed in 5.x

  • Fully async API — all methods now return Task<T> with Async suffix
  • Replaced Newtonsoft.Json with System.Text.Json (no external dependencies)
  • Modern C# 12 syntax and nullable reference types
  • Multi-targets .NET 8, 9, and 10
  • Namespace changed from DocMgt to DocMgt.RESTHelper
  • Automatic v1/v2 API endpoint detection based on server version

Getting Started

Install

dotnet add package DocMgt.RESTHelper

Basic Usage

using DocMgt.RESTHelper;

// Connect with username/password
using var client = new dmRestHelper("https://yourserver.docmgt.com", "username", "password");

// Or connect with GUID token
using var client = new dmRestHelper("https://yourserver.docmgt.com", "your-guid");

// Login and get current user
var user = await client.LoginAsync();

// Get server info
var info = await client.GetInfoAsync();

Records

// Search records
var records = await client.SearchRecordsAsync("invoice", pageNum: 1, numPerPage: 25);

// Get a record by ID
var record = await client.GetRecordAsync(123);

// Create a new record
var newRecord = new Record();
newRecord.AddData("@NAME", "My New Record");
newRecord.AddData("Customer", "Acme Corp");
var saved = await client.SaveRecordAsync(newRecord);

// Delete a record
await client.DeleteRecordAsync(saved.ID);

Documents

// Get documents for a record
var docs = await client.GetDocumentsAsync(recordID: 123);

// Upload a document
var doc = new Document
{
    RecordID = 123,
    Name = "Invoice",
    FileName = "invoice.pdf",
    DocumentValue = File.ReadAllBytes("invoice.pdf")
};
var savedDoc = await client.SaveDocumentAsync(doc);

// Download a document
byte[] fileData = await client.DownloadDocumentAsync(savedDoc.ID);

// Download as PDF
byte[] pdfData = await client.DownloadDocumentAsPDFAsync(savedDoc.ID);

// Chunked upload for large files
await client.UploadDocumentAsync(docID, "largefile.pdf", fileData, chunkSizeMB: 10);

Workflow

// Get work items
var workItems = await client.GetWorkItemsAsync(pageNum: 1, numPerPage: 25);

// Complete a work item
await client.CompleteWorkItemAsync(workItemID: 456);

// Process with a specific option
await client.ProcessWorkItemAsync(workItemID: 456, optionGUID: "option-guid-here");

Users and Teams

// Get all users
var users = await client.GetUsersAsync();

// Find user by username
var user = await client.GetUserAsync("jsmith");

// Get all teams
var teams = await client.GetTeamsAsync();

Migrating from 4.x

Namespace Change

// 4.x
using DocMgt;

// 5.x
using DocMgt.RESTHelper;

Async Methods

All methods are now async. Add Async suffix and await:

// 4.x (synchronous)
var record = client.GetRecord(123);

// 5.x (async)
var record = await client.GetRecordAsync(123);

API Version Auto-Detection

The client automatically detects your server version on first call. Servers running 5.0+ use the new v2 endpoints (/rest/v2/), while older servers continue using v1 (/rest/). No code changes needed — it just works.

To manually override:

// Force v1 endpoints
client.ApiVersion = dmRestHelper.ApiVersionMode.V1;

// Force v2 endpoints
client.ApiVersion = dmRestHelper.ApiVersionMode.V2;

// Check what's being used
Console.WriteLine($"Server: {client.DetectedServerVersion}, Using v2: {client.UsingV2}");

Requirements

  • .NET 8.0, 9.0, or 10.0
  • DocMgt Server 3.05 or higher (some features require 3.33+)

Support

Visit docmgt.com for documentation and support.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
5.0.4487 97 4/15/2026
5.0.4486 89 4/14/2026
4.37.9518.27732 265 1/22/2026
4.37.9518.26492 125 1/22/2026
4.32.9249.27179 266 4/29/2025
4.26.9043.23549 248 10/4/2024
4.26.9043.23033 208 10/4/2024
3.66.8817.19627 332 2/21/2024
3.66.8817.17811 297 2/21/2024
3.66.8816.18984 296 2/20/2024
3.60.8616.18220 620 8/4/2023
3.55.8458.23112 715 2/27/2023
3.50.8264.27723 942 8/17/2022
3.48.8166.40738 984 5/12/2022
3.47.8153.4311 987 4/28/2022
3.42.7941.19693 909 9/28/2021
3.41.7849.22581 908 6/28/2021
3.39.7801.26729 888 5/11/2021
3.37.7716.17051 986 2/15/2021
3.37.7707.866 989 2/12/2021
Loading failed