Reference Guide
.NET SDK Reference for the Data Management API
Resource Information
Namespace: | Autodesk.DataManagement |
Assembly: | Autodesk.DataManagement.dll |
Version: | 1.0.0 |
Installing this Library
The recommended way of installing this library to your .NET project is to use the NuGet Package Manager.
- Within the NuGet Package Manager locate the Autodesk.DataManagement library.
- Follow the instructions on the NuGet documentation site to install the library.
Alternatively, from Visual Studio IDE or CLI tools:
dotnet add package Autodesk.DataManagement
Learning Resources
Source Code
The source code for this library is available at https://github.com/autodesk-platform-services/aps-sdk-net.
Tutorials
The ACC Administrator tutorial on the https://tutorials.autodesk.io/ site illustrates how to use this library to browse through hubs and projects.
Code Sample
string? token = Environment.GetEnvironmentVariable("token");
string? folder_id = Environment.GetEnvironmentVariable("folder_id");
string? project_top_folder_one_id = Environment.GetEnvironmentVariable("project_top_folder_one_id");
string? project_top_folder_two_id = Environment.GetEnvironmentVariable("project_top_folder_two_id");
string? hub_id = Environment.GetEnvironmentVariable("hub_id");
string? project_id = Environment.GetEnvironmentVariable("project_id");
string? download_id = Environment.GetEnvironmentVariable("download_id");
string? job_id = Environment.GetEnvironmentVariable("job_id");
string? item_id = Environment.GetEnvironmentVariable("item_id");
string? version_id = Environment.GetEnvironmentVariable("version_id");
string? storage_urn = Environment.GetEnvironmentVariable("storage_urn");
DataManagementClient dataManagementClient = null!;
public void Initialise()
{
// Optionally initialise SDKManager to pass custom configurations, logger, etc.
// SDKManager sdkManager = SdkManagerBuilder.Create().Build();
StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token);
dataManagementClient = new DataManagementClient(authenticationProvider: staticAuthenticationProvider);
}
#region hubs
public async Task GetHubsAsync()
{
List<string> filter_id = new List<string> { "<filterID >" };
List<string> filter_name = new List<string> { "<filterName>" };
List<string> filter_extension_type = new List<string> { "<filterExtensionType>" };
Hubs hubs = await dataManagementClient.GetHubsAsync(filterId: filter_id, filterName: filter_name, filterExtensionType: filter_extension_type);
List<HubData> hubsData = hubs.Data;
foreach (var hub in hubsData)
{
TypeHub hubsType = hub.Type;
string HubsId = hub.Id;
Console.WriteLine(hubsType);
Console.WriteLine(HubsId);
Console.WriteLine(hub.Attributes.Name);
Console.WriteLine(hub.Attributes.Extension.Type);
}
}
Show More