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.
Documentation: https://mahach666.github.io/RevitServerNet/
- 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:
RevitServerUiApiforRevitServerAdmin{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.CreateLocalModelAsyncfor 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
Via Package Manager Console:
Install-Package RevitServerNetOr via NuGet Package Manager:
RevitServerNet
Or via .NET CLI:
dotnet add package RevitServerNetusing 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");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.
- Getting started
- REST API:
RevitServerApiand the extension methods - Admin UI API:
RevitServerUiApi - Direct export: how it works, locks,
CreateLocal, cancellation, bundled assemblies, timeouts - RevitServerTool wrapper
- Error handling
- Versions and compatibility
- Testing: unit, wire and live tests
- API reference
- DeepWiki: an automatically generated overview of the repository
- Changelog
dotnet build RevitServerNet.sln -c Release
dotnet test RevitServerNet.sln -c ReleaseThe 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).
Contributions are welcome. See CONTRIBUTING.md.
Report vulnerabilities privately, see SECURITY.md.
If you encounter any issues or have questions, please open an issue at https://github.com/mahach666/RevitServerNet/issues.
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).
