RevitServerNet 1.4.0

dotnet add package RevitServerNet --version 1.4.0
                    
NuGet\Install-Package RevitServerNet -Version 1.4.0
                    
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="RevitServerNet" Version="1.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RevitServerNet" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="RevitServerNet" />
                    
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 RevitServerNet --version 1.4.0
                    
#r "nuget: RevitServerNet, 1.4.0"
                    
#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 RevitServerNet@1.4.0
                    
#: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=RevitServerNet&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=RevitServerNet&version=1.4.0
                    
Install as a Cake Tool

<p align="center"> <img src="https://raw.githubusercontent.com/mahach666/RevitServerNet/master/docs/images/revitservernet-banner.png" alt="RevitServerNet" width="640"> </p>

A .NET library for working with Revit Server REST API. Provides easy access to Revit Server operations including folder management, project operations, locking, and history tracking.

NuGet NuGet downloads CI Docs Ask DeepWiki

Documentation: https://mahach666.github.io/RevitServerNet/

Features

  • Server Management: Get server information and status
  • Folder Operations: Create, delete, and manage folders on Revit Server
  • Project Information: Read a model's project information parameters
  • Locking: Lock and unlock models and folders, cancel in-progress locks, list or delete descendent locks, and query server-wide and per-model locks
  • History Tracking: Access project history and version information
  • Copy / Move: Copy and move items on the server (CopyItemAsync, MoveItemAsync)
  • Recursive traversal: WalkAsync, GetAllModelsRecursiveAsync, GetAllFoldersRecursiveAsync
  • Admin UI API: RevitServerUiApi for RevitServerAdmin{YEAR}/api/... (model details, lock data, histories, tree, rename/delete, copy/move, lock/unlock, create folder)
  • Direct Export: Export Revit Server models to RVT files over the Revit Server ModelService (net.tcp), without RevitServerTool.exe (net48/net6/net8)
  • RevitServerTool wrapper: RevitServerToolClient.CreateLocalModelAsync for exporting through RevitServerTool.exe
  • Multi-Version Support: REST and Admin UI clients for Revit Server 2012 and later; direct export for any server year that exposes /ModelService{year}/, with one bundled set of Autodesk client assemblies (verified live against Revit Server 2022-2025)
  • Async Operations: All API calls are asynchronous for better performance

Installation

Via Package Manager Console:

Install-Package RevitServerNet

Or via NuGet Package Manager:

RevitServerNet

Or via .NET CLI:

dotnet add package RevitServerNet

Quick Start

using RevitServerNet;
using RevitServerNet.Extensions; // GetServerInfoAsync, ListFoldersAsync, GetFolderContentsAsync are extension methods

// Initialize API client
// serverVersion defaults to "2019": set it to your Revit Server year
var api = new RevitServerApi("your-server-host", "your-username", serverVersion: "2024");

// Get server information
var serverInfo = await api.GetServerInfoAsync();

// List subfolders of a folder (List<FolderInfo>, Path is filled in)
var folders = await api.ListFoldersAsync("|path|to|folder");

// Or everything in the folder (Folders, Models, Files)
var contents = await api.GetFolderContentsAsync("|path|to|folder");

Supported versions

REST API and Admin UI API: Revit Server 2012 and later. Direct export: any server year that exposes net.tcp://{host}/ModelService{year}/ModelService.svc/, verified live on Revit Server 2022 to 2025. The package targets .NET Framework 4.8, .NET 6 and .NET 8; the direct export needs Windows. Details, requirements and the exact limits: Versions and compatibility.

Documentation

Build and test

dotnet build RevitServerNet.sln -c Release
dotnet test RevitServerNet.sln -c Release

The tests that need a live Revit Server are skipped unless the RSN_TEST_RS_* environment variables are set; see Testing. Building needs Windows (net48 and the direct export).

Contributing

Contributions are welcome. See CONTRIBUTING.md.

Security

Report vulnerabilities privately, see SECURITY.md.

Support

If you encounter any issues or have questions, please open an issue at https://github.com/mahach666/RevitServerNet/issues.

License

This project is licensed under the MIT License - see the LICENSE file for details.

RevitServerNet is not affiliated with, endorsed by or sponsored by Autodesk. Autodesk, Revit and Revit Server are trademarks of Autodesk, Inc. The package bundles unmodified Autodesk Revit Server client assemblies (the Revit 2024 set).

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 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 was computed.  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 was computed.  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. 
.NET Framework net48 is compatible.  net481 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.4.0 68 11/14/2026
1.3.0 139 9/24/2026
1.2.1 351 1/31/2026
1.2.0 155 1/31/2026
1.1.2 303 12/26/2025
1.1.1 391 10/7/2025
1.1.0 282 10/7/2025
1.0.8 291 10/1/2025
1.0.7 252 10/1/2025
1.0.6 270 9/25/2025
1.0.5 356 7/28/2025
1.0.3 302 7/26/2025
1.0.1 301 7/26/2025

Fixes checked against live Revit Server 2022 and 2025. History Version/Size, ModelInfo.Size and ServerInfo.Roles map the real server fields (were always 0/null). Lock queries use endpoints that exist (IsModelLockedAsync was always false). RenameFolderAsync with an empty name no longer deletes the folder; DeleteFolderAsync really deletes; Copy/Move/CancelLock/DeleteDescendentLocks report success correctly; 500-after-success of some names is verified. No sync-over-async deadlock (ConfigureAwait(false)); non-ASCII user names are sent percent-encoded; RevitServerApi.Timeout and CancellationToken overloads. RevitServerUiApi throws on HTTP 200 error descriptors and refuses an empty new name. Export checks the destination before downloading, accepts paths with extra separators, and cancels promptly while connecting. RevitServerToolResult.Success is false on an ERROR: line. Several error behaviours changed (exists checks, WalkAsync, lock queries throw instead of returning false); see CHANGES.md.