Adsk.Platform.VaultData 0.3.16

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

Autodesk Vault Data SDK for .NET

NuGet

Unofficial package — not affiliated with or endorsed by Autodesk.

Namespace: Autodesk.Vault | Target: net8.0 | License: MIT Generated from OpenAPI specs via Microsoft Kiota.

A type-safe C# SDK for the Autodesk Vault Data REST API (v2). Covers sessions, vaults, files, folders, items, change orders, users, groups, roles, search, jobs, links, properties, and options — 60 methods across 11 service managers through a single unified client.

The SDK provides two access patterns:

  1. Manager API (recommended) — high-level methods with strongly-typed parameters and XML doc comments.
  2. Fluent URL API — mirrors the REST endpoint structure directly for full control over requests.

Installation

dotnet add package Adsk.Platform.VaultData
dotnet add package Adsk.Platform.Authentication

Quick Start

using Autodesk.Vault;

var client = new VaultClient(
    () => Task.FromResult("YOUR_ACCESS_TOKEN"),
    vaultServerUrl: "https://your-vault-server");

// Manager approach (recommended)
var vaults = await client.Informational.GetVaultsAsync();
foreach (var vault in vaults?.Data ?? [])
{
    Console.WriteLine($"Vault: {vault.Name} (ID: {vault.Id})");
}

// Fluent URL approach — mirrors the REST path directly
var serverInfo = await client.Api.ServerInfo.GetAsync();
Console.WriteLine($"Server Version: {serverInfo?.ServerVersion}");

Authentication with 2-Legged OAuth

For server-to-server communication with user impersonation, use the Adsk.Platform.Authentication package:

using Autodesk.Vault;
using Autodesk.Authentication;
using Autodesk.Authentication.Helpers.Models;

var authClient = new AuthenticationClient();
var tokenStore = new InMemoryTokenStore();

var getAccessToken = authClient.Helper.CreateTwoLeggedAutoRefreshToken(
    clientId: "YOUR_CLIENT_ID",
    clientSecret: "YOUR_CLIENT_SECRET",
    scopes: new[] { "data:read", "data:write" },
    tokenStore);

// 2-legged auth requires a userId for impersonation
var client = new VaultClient(
    getAccessToken,
    vaultServerUrl: "https://your-vault-server",
    userId: "user@company.com");

Authentication with 3-Legged OAuth

For user-context operations:

using Autodesk.Vault;

var client = new VaultClient(
    () => Task.FromResult("YOUR_3LEGGED_ACCESS_TOKEN"),
    vaultServerUrl: "https://your-vault-server");

Available Managers

Every manager is a property on VaultClient. All endpoints return Task<T?> — the Vault API uses server-side filtering and sorting via query parameters.

Manager Description Methods
Auth Session creation (standard and Windows auth), retrieval, deletion 4
Accounts Users, groups, roles, profile attributes, account info 11
Options System-wide options and per-vault options (CRUD) 10
Informational Server info, vault listing and details 3
Properties Property definitions for a vault 2
FilesAndFolders File versions, file details, folder contents, sub-folders, downloads, thumbnails 9
Items Items, item versions, associated files, bill of materials, thumbnails 8
ChangeOrders Change orders (ECOs), related files, associated entities, comments, attachments 6
Links Entity links and relationships 2
Search Basic search results and advanced search 2
Jobs Job creation, status, and queue management 3

Usage Examples

Create a Session

using Autodesk.Vault.Sessions;

var sessionData = new SessionsPostRequestBody
{
    VaultName = "MyVault",
    UserName = "myuser",
    Password = "mypassword"
};

var session = await client.Auth.CreateSessionAsync(sessionData);
Console.WriteLine($"Session ID: {session?.Id}");

Browse Files and Folders

var contents = await client.FilesAndFolders.GetFolderContentsAsync(vaultId, folderId);
foreach (var item in contents?.Data ?? [])
{
    Console.WriteLine($"Item: {item.Name}");
}

// Download file content
var fileStream = await client.FilesAndFolders.GetFileVersionContentAsync(vaultId, fileVersionId);

Work with Items and Bill of Materials

var items = await client.Items.GetItemsAsync(vaultId);
foreach (var item in items?.Data ?? [])
{
    Console.WriteLine($"Item: {item.Number} — {item.Title}");
}

var bom = await client.Items.GetItemVersionBillOfMaterialsAsync(vaultId, itemVersionId);

Manage Change Orders (ECOs)

var changeOrders = await client.ChangeOrders.GetChangeOrdersAsync(vaultId);
foreach (var eco in changeOrders?.Data ?? [])
{
    Console.WriteLine($"ECO: {eco.Number} — {eco.Title}");
}

var relatedFiles = await client.ChangeOrders.GetChangeOrderRelatedFilesAsync(vaultId, changeOrderId);
var comments = await client.ChangeOrders.GetChangeOrderCommentsAsync(vaultId, changeOrderId);
using Autodesk.Vault.Vaults.WithVaultIdAdvancedSearch;

var searchBody = new WithVaultIdAdvancedSearchPostRequestBody
{
    // Configure search criteria
};

var results = await client.Search.PerformAdvancedSearchAsync(vaultId, searchBody);
foreach (var entity in results?.Data ?? [])
{
    Console.WriteLine($"Found: {entity.Name}");
}

Using the Fluent URL API

// Get server information
var serverInfo = await client.Api.ServerInfo.GetAsync();

// Get all users
var users = await client.Api.Users.GetAsync();

// Get file by ID through the full path
var file = await client.Api.Vaults[vaultId].Files[fileId].GetAsync();

Rate Limiting

The SDK handles API rate limits automatically via built-in Kiota middleware. When the API returns a 429 Too Many Requests response, the SDK will:

  • Automatically retry with exponential backoff
  • Respect the Retry-After header
  • Retry up to a configurable number of times before failing

No custom retry logic is needed in your application.

Error Handling

By default, the SDK throws an HttpRequestException for any non-successful HTTP response (4xx or 5xx). The exception includes the request URI, HTTP status code, and the full HttpResponseMessage in the Data["context"] property.

try
{
    var items = await client.Items.GetItemsAsync(vaultId);
}
catch (HttpRequestException ex)
{
    Console.WriteLine($"Request failed: {ex.Message}");
    Console.WriteLine($"Status code: {ex.StatusCode}");

    if (ex.Data["context"] is HttpResponseMessage response)
    {
        Console.WriteLine($"Request URI: {response.RequestMessage?.RequestUri}");
        var body = await response.Content.ReadAsStringAsync();
        Console.WriteLine($"Response body: {body}");
    }
}

To disable the error handler for a specific request:

using Autodesk.Common.HttpClientLibrary.Middleware.Options;

var items = await client.Items.GetItemsAsync(vaultId,
    new() { Options = { new ErrorHandlerOption { Enabled = false } } });

Custom HTTP Client

var httpClient = new HttpClient();
// Configure your HttpClient (timeouts, handlers, etc.)

var client = new VaultClient(getAccessToken, "https://your-vault-server", userId, httpClient);

Constructors

// 2-legged: server-to-server with user impersonation
public VaultClient(Func<Task<string>> get2LeggedAccessToken, string vaultServerUrl, string userId, HttpClient? httpClient = null)

// 3-legged: user context
public VaultClient(Func<Task<string>> get3LeggedAccessToken, string vaultServerUrl, HttpClient? httpClient = null)
Parameter Type Description
get2LeggedAccessToken / get3LeggedAccessToken Func<Task<string>> Async function returning a valid OAuth bearer token
vaultServerUrl string Valid absolute HTTP/HTTPS URL to the Vault server
userId string (2-legged only) Email address of the Vault user to impersonate
httpClient HttpClient? Optional custom HTTP client (default includes retry + rate limiting)

The vaultServerUrl must be a valid absolute HTTP or HTTPS URL (e.g. "https://vaultserver.example.com" or "http://10.148.0.1"). An ArgumentException is thrown for invalid, relative, or non-HTTP URLs.

Conventions

Patterns useful for AI code generation:

  • Method naming: Get{Entity}Async, Get{Entity}ByIdAsync, Create{Entity}Async, Update{Entity}ByIdAsync, Delete{Entity}ByIdAsync, Get{Entity}{SubResource}Async
  • Return types: all methods return Task<T?> or Task (no IAsyncEnumerable<T> — Vault API does not use cursor-based pagination through manager methods)
  • RequestConfiguration parameter: all Manager methods accept RequestConfiguration<T>? requestConfiguration as an object — never Action<>. Configure via object initializer: new() { QueryParameters = { ... } }
  • Parameter types: all identifiers (vaultId, fileId, itemId, etc.) are string
  • Body types: request body types live in Kiota-generated namespaces (e.g. Autodesk.Vault.Sessions.SessionsPostRequestBody, Autodesk.Vault.Vaults.WithVaultIdAdvancedSearch.WithVaultIdAdvancedSearchPostRequestBody)
  • Model types: response model types are in Autodesk.Vault.Models (e.g. Session, FileObject, Item, ChangeOrder, Job)

Fluent URL Shortcut Properties

Property Base Path
client.Api.Sessions /sessions/*
client.Api.Groups /groups/*
client.Api.Users /users/*
client.Api.Roles /roles/*
client.Api.ServerInfo /serverInfo
client.Api.SystemOptions /systemOptions/*
client.Api.ProfileAttributeDefinitions /profileAttributeDefinitions/*
client.Api.Vaults /vaults/*
Package NuGet Purpose
Adsk.Platform.Authentication NuGet OAuth token management (2-legged and 3-legged)
Adsk.Platform.HttpClient NuGet Shared HTTP client with retry, rate limiting, DI support
Adsk.Platform.DataManagement NuGet Cloud-based data management (hubs, projects, folders, files)

For AI Assistants

A machine-readable API reference with all method signatures, return types, and REST endpoint mappings is available at llm.txt.

Requirements

Documentation

License

This project is licensed under the MIT License.

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 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. 
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
0.3.16 0 3/31/2026
0.3.15 0 3/30/2026
0.3.14 82 3/23/2026
0.3.13 77 3/19/2026
0.3.12 82 3/19/2026
0.3.11 94 3/19/2026
0.3.10 80 3/18/2026
0.3.9 78 3/17/2026
0.3.8 81 3/17/2026
0.3.7 86 3/12/2026
0.3.6 82 3/10/2026
0.3.5 80 3/8/2026
0.3.4 81 3/8/2026
0.3.3 79 3/6/2026
0.3.2 84 3/5/2026
0.3.1 82 3/2/2026
0.3.0 80 3/2/2026
0.2.9 96 2/11/2026
0.2.8 96 2/9/2026