Skip to content

About

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.

Topics

Resources

Contributing

Security policy

Stars

11 stars

Watchers

1 watching

Forks

Latest commit

 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RevitServerNet

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).

About

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.

Topics

Resources

Contributing

Security policy

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages