Request

Response

    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.

    1. Within the NuGet Package Manager locate the Autodesk.DataManagement library.
    2. 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 Hubs Browser tutorial on the Autodesk Platform Services (APS) website demonstrates how to use this library to browse content that authenticated users can access in APS-based applications like BIM 360 Docs, Autodesk Docs, or Fusion Team.

    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

    REST API to SDK Cross Reference

    Operation CategoryOperationHTTP RequestMethod

    Commands

    Check Permission POST /projects/{project_id}/commands ExecuteCheckPermissionAsync
    Publish Model POST /projects/{project_id}/commands ExecutePublishModelAsync
    Publish Without Links POST /projects/{project_id}/commands ExecutePublishWithoutLinksAsync
    Get Publish Model Job POST /projects/{project_id}/commands ExecuteGetPublishModelJobAsync
    List Refs POST /projects/{project_id}/commands ExecuteListRefsAsync
    List Items POST /projects/{project_id}/commands ExecuteListItemsAsync

    Hubs

    List Hubs GET /hubs GetHubsAsync
    Get a Hub GET /hubs/{hub_id} GetHubAsync

    Projects

    Get Projects GET /hubs/{hub_id}/projects GetHubProjectsAsync
    Get a Project GET /hubs/{hub_id}/projects/{project_id} GetProjectAsync
    Get Hub for Project GET /hubs/{hub_id}/projects/{project_id}/hub GetProjectHubAsync
    List Top-level Project Folders GET /hubs/{hub_id}/projects/{project_id}/topFolders GetProjectTopFoldersAsync
    Create a Storage Location in OSS POST /projects/{project_id}/storage CreateStorageAsync
    Get Download Details GET /projects/{project_id}/downloads/{download_id} GetDownloadAsync
    Create Download POST /projects/{project_id}/downloads CreateDownloadAsync
    Check Download Creation Progress GET /projects/{project_id}/jobs/{job_id} GetDownloadJobAsync

    Folders

    Get a Folder GET /projects/{project_id}/folders/{folder_id} GetFolderAsync
    Modify a Folder PATCH /projects/{project_id}/folders/{folder_id} PatchFolderAsync
    Get Parent of a Folder GET /projects/{project_id}/folders/{folder_id}/parent GetFolderParentAsync
    List Folder Contents GET /projects/{project_id}/folders/{folder_id}/contents GetFolderContentsAsync
    List Related Resources for a Folder GET /projects/{project_id}/folders/{folder_id}/refs GetFolderRefsAsync
    List Folder and Subfolder Contents GET /projects/{project_id}/folders/{folder_id}/search GetFolderSearchAsync
    List Custom Relationships for a Folder GET /projects/{project_id}/folders/{folder_id}/relationships/refs GetFolderRelationshipsRefsAsync
    Create a Custom Relationship for a Folder POST /projects/{project_id}/folders/{folder_id}/relationships/refs CreateFolderRelationshipsRefAsync
    List Relationship Links for a Folder GET /projects/{project_id}/folders/{folder_id}/relationships/links GetFolderRelationshipsLinksAsync
    Create a Folder POST /projects/{project_id}/folders CreateFolderAsync

    Items

    Get an Item GET /projects/{project_id}/items/{item_id} GetItemAsync
    Update an Item PATCH /projects/{project_id}/items/{item_id} PatchItemAsync
    Get Parent of an Item GET /projects/{project_id}/items/{item_id}/parent GetItemParentFolderAsync
    List Custom Relationships for an Item GET /projects/{project_id}/items/{item_id}/relationships/refs GetItemRelationshipsRefsAsync
    Create a Custom Relationship for an Item POST /projects/{project_id}/items/{item_id}/relationships/refs CreateItemRelationshipsRefAsync
    List Related Resources for an Item GET /projects/{project_id}/items/{item_id}/refs GetItemRefsAsync
    List Relationship Links for an Item GET /projects/{project_id}/items/{item_id}/relationships/links GetItemRelationshipsLinksAsync
    Get Tip Version of an Item GET /projects/{project_id}/items/{item_id}/tip GetItemTipAsync
    List all Versions of an Item GET /projects/{project_id}/items/{item_id}/versions GetItemVersionsAsync
    Create an Item POST /projects/{project_id}/items CreateItemAsync

    Versions

    Get a Version GET /projects/{project_id}/versions/{version_id} GetVersionAsync
    Update a Version PATCH /projects/{project_id}/versions/{version_id} PatchVersionAsync
    Get Item by Version GET /projects/{project_id}/versions/{version_id}/item GetVersionItemAsync
    List Related Resources for a Version GET /projects/{project_id}/versions/{version_id}/refs GetVersionRefsAsync
    List Custom Relationships for a Version LIST /projects/{project_id}/versions/{version_id}/relationships/refs GetVersionRelationshipsRefsAsync
    Create Custom Relationship for a Version POST /projects/{project_id}/versions/{version_id}/relationships/refs CreateVersionRelationshipsRefAsync
    List Links for a Version GET /projects/{project_id}/versions/{version_id}/relationships/links GetVersionRelationshipsLinksAsync
    Create a Version POST /projects/{project_id}/versions CreateVersionAsync
    List Supported Download Formats GET /projects/{project_id}/versions/{version_id}/downloadFormats GetVersionDownloadFormatsAsync
    List Available Download Formats GET /projects/{project_id}/versions/{version_id}/downloads GetVersionDownloadsAsync