### GetHubProjectsAsync - C# SDK Example Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves all projects within a specific hub, with support for filtering and pagination. Projects organize design files and documents. ```csharp using Autodesk.DataManagement; using Autodesk.DataManagement.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); DataManagementClient dataManagementClient = new DataManagementClient(authenticationProvider: staticAuthenticationProvider); string hubId = "b.a4f95080-84fe-4281-8d0a-bd8c885695e0"; Projects projects = await dataManagementClient.GetHubProjectsAsync( hubId: hubId, pageNumber: 0, pageLimit: 50 ); foreach (var project in projects.Data) { Console.WriteLine($"Project: {project.Attributes.Name}"); Console.WriteLine($"ID: {project.Id}"); } ``` -------------------------------- ### GetProjectTopFoldersAsync - C# SDK Example Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves the top-level folders for a project, such as Plans or Project Files. These serve as entry points for navigating project content. ```csharp using Autodesk.DataManagement; using Autodesk.DataManagement.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); DataManagementClient dataManagementClient = new DataManagementClient(authenticationProvider: staticAuthenticationProvider); TopFolders topFolders = await dataManagementClient.GetProjectTopFoldersAsync( hubId: hub_id, projectId: project_id, excludeDeleted: true, projectFilesOnly: false ); foreach (var topFolder in topFolders.Data) { Console.WriteLine($"Folder: {topFolder.Attributes.Name}"); Console.WriteLine($"ID: {topFolder.Id}"); } ``` -------------------------------- ### Get All Properties Async with .NET SDK Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Fetches all properties for all objects within a model view. This is useful for comprehensive data extraction and analysis. The SDK requires proper authentication setup. ```csharp using Autodesk.ModelDerivative; using Autodesk.ModelDerivative.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); ModelDerivativeClient modelDerivativeClient = new ModelDerivativeClient(authenticationProvider: staticAuthenticationProvider); string modelGuid = "your-model-guid"; try { Properties allProperties = await modelDerivativeClient.GetAllPropertiesAsync(urn, modelGuid); if (allProperties.IsProcessing) { Console.WriteLine("Properties are still being extracted..."); } else { foreach (var item in allProperties.Data.Collection) { Console.WriteLine($"Object ID: {item.ObjectId}"); Console.WriteLine($"Name: {item.Name}"); } } } catch (Exception ex) { Console.WriteLine(ex.Message); } ``` -------------------------------- ### Get Buckets Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves a list of all buckets owned by the authenticated application. Supports pagination for accounts with many buckets. ```csharp using Autodesk.Oss; using Autodesk.Oss.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); OssClient ossClient = new OssClient(authenticationProvider: staticAuthenticationProvider); Buckets response = await ossClient.GetBucketsAsync(); foreach (var bucket in response.Items) { Console.WriteLine($"Bucket: {bucket.BucketKey}"); } ``` -------------------------------- ### GetHubsAsync - C# SDK Example Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves a list of all hubs accessible to the authenticated user. Hubs represent top-level containers like BIM 360 or ACC accounts. ```csharp using Autodesk.DataManagement; using Autodesk.DataManagement.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); DataManagementClient dataManagementClient = new DataManagementClient(authenticationProvider: staticAuthenticationProvider); Hubs hubs = await dataManagementClient.GetHubsAsync(); foreach (var hub in hubs.Data) { Console.WriteLine($"Hub: {hub.Attributes.Name}"); Console.WriteLine($"ID: {hub.Id}"); Console.WriteLine($"Region: {hub.Attributes.Region}"); Console.WriteLine($"Type: {hub.Attributes.Extension.Type}"); } ``` -------------------------------- ### Get User Info Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves profile information for the authenticated user, including email, name, and user ID. Requires a valid accessToken. ```csharp using Autodesk.Authentication; using Autodesk.Authentication.Model; try { UserInfo userInfo = await authenticationClient.GetUserInfoAsync(accessToken); string userEmail = userInfo.Email; string userName = userInfo.Name; } catch (AuthenticationApiException ex) { Console.WriteLine(ex.Message); } ``` -------------------------------- ### GetFolderContentsAsync - C# SDK Example Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves all items and subfolders within a specific folder, with support for filtering by type and pagination. Essential for building file browsers. ```csharp using Autodesk.DataManagement; using Autodesk.DataManagement.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); DataManagementClient dataManagementClient = new DataManagementClient(authenticationProvider: staticAuthenticationProvider); List filterType = new List { FilterType.Items, FilterType.Folders }; FolderContents folderContents = await dataManagementClient.GetFolderContentsAsync( projectId: project_id, folderId: folder_id, filterType: filterType ); foreach (var item in folderContents.Data) { if (item is FolderData folder) { Console.WriteLine($"Folder: {folder.Attributes.Name}, ID: {folder.Id}"); } else if (item is ItemData fileItem) { Console.WriteLine($"File: {fileItem.Attributes.DisplayName}, ID: {fileItem.Id}"); } } ``` -------------------------------- ### Get Bucket Details Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves metadata about a specific bucket, including its key, owner, creation date, and retention policy. Requires a token for authentication and the bucketKey. ```csharp using Autodesk.Oss; using Autodesk.Oss.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); OssClient ossClient = new OssClient(authenticationProvider: staticAuthenticationProvider); Bucket bucket = await ossClient.GetBucketDetailsAsync(bucketKey); string bucketkey = bucket.BucketKey; string bucketOwner = bucket.BucketOwner; Console.WriteLine($"Bucket: {bucketkey}, Owner: {bucketOwner}"); ``` -------------------------------- ### Start Translation Job with .NET SDK Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Initiates a translation job to convert design files into viewable formats. Specify output formats like SVF2 or thumbnails, and provide input file details. Requires setting up authentication and the ModelDerivativeClient. ```csharp using Autodesk.ModelDerivative; using Autodesk.ModelDerivative.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); ModelDerivativeClient modelDerivativeClient = new ModelDerivativeClient(authenticationProvider: staticAuthenticationProvider); // Set output formats List payloadFormats = new List() { new JobPayloadFormatSVF2() { Views = new List() { View._2d, View._3d }, Advanced = new JobPayloadFormatSVF2AdvancedRVT() { GenerateMasterViews = true } }, new JobPayloadFormatThumbnail() { Advanced = new JobPayloadFormatAdvancedThumbnail() { Width = Width.NUMBER_100, Height = Height.NUMBER_100 } } }; // Create job payload JobPayload jobPayload = new JobPayload() { Input = new JobPayloadInput() { Urn = urn, CompressedUrn = false, RootFilename = "model.rvt" }, Output = new JobPayloadOutput() { Formats = payloadFormats } }; // Start translation try { Job jobResponse = await modelDerivativeClient.StartJobAsync( jobPayload: jobPayload, region: Region.US ); Console.WriteLine($"Job URN: {jobResponse.Urn}"); Console.WriteLine($"Result: {jobResponse.Result}"); } catch (Exception ex) { Console.WriteLine(ex.Message); } ``` -------------------------------- ### Get Model Views with .NET SDK Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves a list of model views (viewables) for a translated model. Each view has a unique GUID necessary for accessing object trees and properties. Requires the URN of the translated file. ```csharp using Autodesk.ModelDerivative; using Autodesk.ModelDerivative.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); ModelDerivativeClient modelDerivativeClient = new ModelDerivativeClient(authenticationProvider: staticAuthenticationProvider); try { ModelViews modelViewsResponse = await modelDerivativeClient.GetModelViewsAsync( urn, region: Region.US ); // Get GUID from first view string modelGuid = modelViewsResponse.Data.Metadata.First().Guid; string viewName = modelViewsResponse.Data.Metadata.First().Name; Console.WriteLine($"View: {viewName}, GUID: {modelGuid}"); } catch (Exception ex) { Console.WriteLine(ex.Message); } ``` -------------------------------- ### Get Issue Types Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves issue types and their subtypes for a given project. Ensure you have the correct project ID and authentication token. ```csharp using Autodesk.Construction.Issues; using Autodesk.Construction.Issues.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); IssuesClient issuesClient = new IssuesClient(authenticationProvider: staticAuthenticationProvider); IssueTypesPage issueTypes = await issuesClient.GetIssuesTypesAsync( projectId: project_id, include: "subtypes", xAdsRegion: Region.US ); foreach (var type in issueTypes.Results) { Console.WriteLine($"Category: {type.Title}"); foreach (var subtype in type.Subtypes) { Console.WriteLine($" Type: {subtype.Title}"); } } ``` -------------------------------- ### Get 2-Legged Token Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Obtains a 2-legged OAuth access token for server-to-server authentication. Requires client ID, client secret, and desired scopes. Handles Base64 encoding and returns token details. ```csharp using Autodesk.Authentication; using Autodesk.Authentication.Model; using Autodesk.SDKManager; // Initialize SDK Manager and Authentication Client SDKManager sdkManager = SdkManagerBuilder.Create().Build(); AuthenticationClient authenticationClient = new AuthenticationClient(sdkManager); // Get environment variables for credentials string clientId = Environment.GetEnvironmentVariable("clientId"); string clientSecret = Environment.GetEnvironmentVariable("clientSecret"); // Obtain 2-legged token with specific scopes try { TwoLeggedToken twoLeggedToken = await authenticationClient.GetTwoLeggedTokenAsync( clientId, clientSecret, new List() { Scopes.DataRead, Scopes.BucketRead } ); string accessToken = twoLeggedToken.AccessToken; long? expiresAt = twoLeggedToken.ExpiresAt; // Unix timestamp DateTime expiryLocalTime = DateTimeOffset.FromUnixTimeSeconds(expiresAt!.Value).LocalDateTime; } catch (AuthenticationApiException ex) { Console.WriteLine(ex.Message); } ``` -------------------------------- ### Get Derivative Download URL Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Generates a downloadable URL for a specific derivative. Use this to download translated outputs like DWG exports or OBJ files. Requires a valid token and derivative URN. ```csharp using Autodesk.ModelDerivative; using Autodesk.ModelDerivative.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); ModelDerivativeClient modelDerivativeClient = new ModelDerivativeClient(authenticationProvider: staticAuthenticationProvider); string derivativeUrn = "derivative-urn-from-manifest"; try { DerivativeDownload derivativeDownload = await modelDerivativeClient.GetDerivativeUrlAsync( derivativeUrn, urn, Region.US ); string downloadUrl = derivativeDownload.Url; Console.WriteLine($"Download URL: {downloadUrl}"); } catch (Exception ex) { Console.WriteLine(ex.Message); } ``` -------------------------------- ### Get User Profile Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Fetches the current user's permissions and profile information for the issues service. This helps determine user capabilities within the service. ```csharp using Autodesk.Construction.Issues; using Autodesk.Construction.Issues.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); IssuesClient issuesClient = new IssuesClient(authenticationProvider: staticAuthenticationProvider); User userProfile = await issuesClient.GetUserProfileAsync( projectId: project_id, xAdsRegion: Region.US ); Console.WriteLine($"User ID: {userProfile.Id}"); Console.WriteLine($"Can create issues: {userProfile.CanCreate}"); ``` -------------------------------- ### Get Item Versions Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves all versions of a specific item, allowing access to version history. This is essential for version comparison, rollback functionality, and audit trails. ```csharp using Autodesk.DataManagement; using Autodesk.DataManagement.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); DataManagementClient dataManagementClient = new DataManagementClient(authenticationProvider: staticAuthenticationProvider); Versions versions = await dataManagementClient.GetItemVersionsAsync( projectId: project_id, itemId: item_id ); foreach (var version in versions.Data) { Console.WriteLine($"Version: {version.Attributes.VersionNumber}"); Console.WriteLine($"ID: {version.Id}"); Console.WriteLine($"Created: {version.Attributes.CreateTime}"); } ``` -------------------------------- ### Get Thumbnail Async with .NET SDK Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Downloads a model thumbnail in specified dimensions. This is useful for previewing models in applications. The code includes saving the stream to a file. ```csharp using Autodesk.ModelDerivative; using Autodesk.ModelDerivative.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); ModelDerivativeClient modelDerivativeClient = new ModelDerivativeClient(authenticationProvider: staticAuthenticationProvider); try { Stream thumbnail = await modelDerivativeClient.GetThumbnailAsync( urn, Width.NUMBER_400, Height.NUMBER_400, Region.US ); // Save thumbnail to file using (var fileStream = new FileStream("/path/to/thumbnail.png", FileMode.Create, FileAccess.Write)) { thumbnail.CopyTo(fileStream); } } catch (Exception ex) { Console.WriteLine(ex.Message); } ``` -------------------------------- ### Get All Webhooks Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves a paginated list of all webhooks accessible to the current token. This is useful for webhook management dashboards and monitoring active integrations. Requires a valid token. ```csharp using Autodesk.Webhooks; using Autodesk.Webhooks.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); WebhooksClient webhooksClient = new WebhooksClient(authenticationProvider: staticAuthenticationProvider); Hooks hooks = await webhooksClient.GetHooksAsync(region: Region.US); Console.WriteLine($"Next page: {hooks.Links.Next}"); foreach (var hook in hooks.Data) { Console.WriteLine($"Hook ID: {hook.HookId}"); Console.WriteLine($"Event: {hook.Event}"); Console.WriteLine($"Callback: {hook.CallbackUrl}"); Console.WriteLine($"Status: {hook.Status}"); Console.WriteLine($"Created: {hook.CreatedDate}"); } ``` -------------------------------- ### Get Object Details Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves detailed metadata about a specific object including size, content type, SHA1 hash, and upload timestamp. Use to verify file integrity or check object existence. ```csharp using Autodesk.Oss; using Autodesk.Oss.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); OssClient ossClient = new OssClient(authenticationProvider: staticAuthenticationProvider); ObjectFullDetails response = await ossClient.GetObjectDetailsAsync(bucketKey, objectKey); Console.WriteLine($"Size: {response.Size}"); Console.WriteLine($"SHA1: {response.Sha1}"); ``` -------------------------------- ### Get 3-Legged Token Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Exchanges an authorization code for a 3-legged access token after user consent. Completes the OAuth flow by exchanging the authorization code for a long-lived access token. Requires client ID, authorization code, redirect URI, and client secret. ```csharp using Autodesk.Authentication; using Autodesk.Authentication.Model; using Autodesk.SDKManager; SDKManager sdkManager = SdkManagerBuilder.Create().Build(); AuthenticationClient authenticationClient = new AuthenticationClient(sdkManager); string clientId = Environment.GetEnvironmentVariable("clientId"); string clientSecret = Environment.GetEnvironmentVariable("clientSecret"); string redirectUri = Environment.GetEnvironmentVariable("redirectUri"); string authorizationCode = Environment.GetEnvironmentVariable("authorizationCode"); try { ThreeLeggedToken threeLeggedToken = await authenticationClient.GetThreeLeggedTokenAsync( clientId, authorizationCode, redirectUri, clientSecret: clientSecret ); string accessToken = threeLeggedToken.AccessToken; } catch (AuthenticationApiException ex) { Console.WriteLine(ex.Message); } ``` -------------------------------- ### Create Signed Resource Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates a pre-signed URL for temporary access to an object without requiring authentication. Ideal for sharing files with external users. ```csharp using Autodesk.Oss; using Autodesk.Oss.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); OssClient ossClient = new OssClient(authenticationProvider: staticAuthenticationProvider); CreateObjectSigned response = await ossClient.CreateSignedResourceAsync( bucketKey, objectKey, new CreateSignedResource() { MinutesExpiration = 60, SingleUse = true } ); string signedUrl = response.SignedUrl; ``` -------------------------------- ### Create Storage Bucket Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates a new storage bucket in a specified region with a defined retention policy. Buckets must have globally unique keys. Requires a token for authentication. ```csharp using Autodesk.Oss; using Autodesk.Oss.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); OssClient ossClient = new OssClient(authenticationProvider: staticAuthenticationProvider); string bucketKey = "my-unique-bucket-key"; Bucket response = await ossClient.CreateBucketAsync( Region.US, new CreateBucketsPayload() { BucketKey = bucketKey, PolicyKey = PolicyKey.Temporary } ); Console.WriteLine($"Bucket created: {response.BucketKey}"); Console.WriteLine($"Owner: {response.BucketOwner}"); ``` -------------------------------- ### Create System Webhook for All Events Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates webhooks for all events in a system at once. This is efficient when you need to monitor multiple event types and prefer a single callback endpoint for all notifications. Requires a callback URL and system scope. ```csharp using Autodesk.Webhooks; using Autodesk.Webhooks.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); WebhooksClient webhooksClient = new WebhooksClient(authenticationProvider: staticAuthenticationProvider); HookPayload hookPayload = new HookPayload(); hookPayload.CallbackUrl = "https://your-server.com/webhook/all-events"; hookPayload.Scope = new { workflow = "my-workflow-id" }; Hook response = await webhooksClient.CreateSystemHookAsync( system: Systems.Derivative, hookPayload: hookPayload ); foreach (var hook in response.Hooks) { Console.WriteLine($"Hook ID: {hook.HookId}"); Console.WriteLine($"Event: {hook.Event}"); Console.WriteLine($"Status: {hook.Status}"); } ``` -------------------------------- ### Get Attachments Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves all file attachments for a specific issue. Requires both the project ID and the issue ID. ```csharp using Autodesk.Construction.Issues; using Autodesk.Construction.Issues.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); IssuesClient issuesClient = new IssuesClient(authenticationProvider: staticAuthenticationProvider); Attachments attachments = await issuesClient.GetAttachmentsAsync( projectId: project_id, issueId: issue_id ); foreach (var attachment in attachments.Results) { Console.WriteLine($"Attachment: {attachment.Name}"); Console.WriteLine($"URN: {attachment.Urn}"); } ``` -------------------------------- ### Create Folder in Project Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates a new folder within a project at a specified parent location. Ensure you have the necessary authentication token and project ID. ```csharp using Autodesk.DataManagement; using Autodesk.DataManagement.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); DataManagementClient dataManagementClient = new DataManagementClient(authenticationProvider: staticAuthenticationProvider); FolderPayload folderPayload = new FolderPayload() { Jsonapi = new JsonApiVersion() { VarVersion = JsonApiVersionValue._10 }, Data = new FolderPayloadData() { Type = TypeFolder.Folders, Attributes = new FolderPayloadDataAttributes() { Name = "New Project Folder", Extension = new FolderPayloadDataAttributesExtension() { Type = "folders:autodesk.bim360:Folder", VarVersion = "1.0" } }, Relationships = new FolderPayloadDataRelationships() { Parent = new FolderPayloadDataRelationshipsParent() { Data = new FolderPayloadDataRelationshipsParentData() { Type = TypeFolder.Folders, Id = parentFolderId } } } } }; Folder folder = await dataManagementClient.CreateFolderAsync( projectId: project_id, folderPayload: folderPayload ); Console.WriteLine($"Created folder: {folder.Data.Id}"); ``` -------------------------------- ### StartJobAsync - Initiate Translation Job Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Initiates a translation job to convert design files into viewable formats (SVF2, thumbnails, etc.) for the Viewer. This is the core method for preparing files for web-based viewing and extracting design metadata. ```APIDOC ## StartJobAsync ### Description Initiates a translation job to convert design files into viewable formats (SVF2, thumbnails, etc.) for the Viewer. This is the core method for preparing files for web-based viewing and extracting design metadata. ### Method POST ### Endpoint /modelderivative/v2/designdata/:urn/jobs ### Parameters #### Path Parameters - **urn** (string) - Required - The URN of the design file to translate. #### Query Parameters - **region** (string) - Optional - The region where the job should be processed (e.g., "US", "EMEA"). Defaults to "US" if not specified. #### Request Body - **Input** (object) - Required - Specifies the input file details. - **Urn** (string) - Required - The URN of the input file. - **CompressedUrn** (boolean) - Optional - Set to true if the URN refers to a compressed file (e.g., ZIP). - **RootFilename** (string) - Optional - The name of the root file within a compressed archive. - **Output** (object) - Required - Specifies the desired output formats. - **Formats** (array) - Required - A list of format configurations. - **Type** (string) - Required - The type of output format (e.g., "svf2", "thumbnail"). - **Views** (array) - Optional (for SVF2) - Specifies the views to generate (e.g., "2d", "3d"). - **Advanced** (object) - Optional - Advanced settings for the format. - **GenerateMasterViews** (boolean) - Optional (for SVF2/RVT) - Whether to generate master views. - **Width** (number) - Optional (for Thumbnail) - The desired width of the thumbnail. - **Height** (number) - Optional (for Thumbnail) - The desired height of the thumbnail. ### Request Example ```json { "input": { "urn": "your_urn", "compressedUrn": false, "rootFilename": "model.rvt" }, "output": { "formats": [ { "type": "svf2", "views": ["2d", "3d"], "advanced": { "generateMasterViews": true } }, { "type": "thumbnail", "advanced": { "width": 100, "height": 100 } } ] } } ``` ### Response #### Success Response (200) - **urn** (string) - The URN of the translation job. - **result** (string) - The status of the job (e.g., "success", "pending"). #### Response Example ```json { "urn": "dXJuOmFkc2sub2JqZWN0OnN0b3JhZ2UvZmlsZW5hbWUucnZ0", "result": "success" } ``` ``` -------------------------------- ### Get Root Cause Categories Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Fetches available root cause categories and their associated root causes for issue analysis. Requires the project ID. ```csharp using Autodesk.Construction.Issues; using Autodesk.Construction.Issues.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); IssuesClient issuesClient = new IssuesClient(authenticationProvider: staticAuthenticationProvider); RootCauseCategoriesPage rootCauses = await issuesClient.GetRootCauseCategoriesAsync( projectId: project_id, include: "rootcauses", xAdsRegion: Region.US ); foreach (var category in rootCauses.Results) { Console.WriteLine($"Category: {category.Title}"); } ``` -------------------------------- ### Webhooks API - Get Hooks Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves a paginated list of all webhooks accessible to the current token. This is useful for webhook management dashboards and monitoring active integrations. ```APIDOC ## GET /webhooks/v1/hooks ### Description Retrieves a paginated list of all webhooks accessible to the current token. This is useful for webhook management dashboards and monitoring active integrations. ### Method GET ### Endpoint `/webhooks/v1/hooks` ### Parameters #### Query Parameters - **region** (Region) - Required - The region to retrieve hooks from (e.g., Region.US). ### Request Example ```csharp // C# Example using Autodesk.Webhooks; using Autodesk.Webhooks.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); WebhooksClient webhooksClient = new WebhooksClient(authenticationProvider: staticAuthenticationProvider); Hooks hooks = await webhooksClient.GetHooksAsync(region: Region.US); Console.WriteLine($"Next page: {hooks.Links.Next}"); foreach (var hook in hooks.Data) { Console.WriteLine($"Hook ID: {hook.HookId}"); Console.WriteLine($"Event: {hook.Event}"); Console.WriteLine($"Callback: {hook.CallbackUrl}"); Console.WriteLine($"Status: {hook.Status}"); Console.WriteLine($"Created: {hook.CreatedDate}"); } ``` ### Response #### Success Response (200) - **Data** (array) - A list of webhooks. - **HookId** (string) - The ID of the webhook. - **Event** (string) - The event the webhook is subscribed to. - **CallbackUrl** (string) - The callback URL for the webhook. - **Status** (string) - The status of the webhook. - **CreatedDate** (string) - The date and time the webhook was created. - **Links** (object) - **Next** (string) - URL for the next page of results. ``` -------------------------------- ### CreateItemAsync Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates a new item (file) in a project folder after uploading content to a storage location. This links the uploaded file to the Data Management system with proper versioning and metadata. ```APIDOC ## POST /items ### Description Creates a new item (file) in a project folder after uploading content to a storage location. This links the uploaded file to the Data Management system with proper versioning and metadata. ### Method POST ### Endpoint /items ### Parameters #### Path Parameters - **projectId** (string) - Required - The ID of the project where the item will be created. #### Request Body - **itemPayload** (ItemPayload) - Required - The payload containing details for the new item. ### Request Example ```json { "jsonapi": {"version": "1.0"}, "data": { "type": "items", "attributes": { "displayName": "drawing.rvt", "extension": { "type": "items:autodesk.bim360:File", "version": "1.0" } }, "relationships": { "tip": { "data": { "type": "versions", "id": "1" } }, "parent": { "data": { "type": "folders", "id": "folder_id" } } } }, "included": [ { "type": "versions", "id": "1", "attributes": { "name": "drawing.rvt", "extension": { "type": "versions:autodesk.bim360:File", "version": "1.0" } }, "relationships": { "storage": { "data": { "type": "objects", "id": "storageUrn" } } } } ] } ``` ### Response #### Success Response (200) - **CreatedItem** (object) - The newly created item object. #### Response Example ```json { "//": "Example response structure for CreatedItem" } ``` ``` -------------------------------- ### Download Object Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Downloads an object from a bucket to a local file path or returns it as a stream. Handles large file downloads efficiently. ```csharp using Autodesk.Oss; using Autodesk.Oss.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); OssClient ossClient = new OssClient(authenticationProvider: staticAuthenticationProvider); string bucketKey = "my-bucket"; string objectKey = "models/building.rvt"; string filePath = "/path/to/save/file.rvt"; // Download to file await ossClient.DownloadObjectAsync(bucketKey, objectKey, filePath); // Or download as stream Stream fileStream = await ossClient.DownloadObjectAsync(bucketKey, objectKey); ``` -------------------------------- ### CreateSignedResourceAsync Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates a pre-signed URL for temporary access to an object without requiring authentication. Ideal for sharing files. ```APIDOC ## POST /signed/resource ### Description Creates a pre-signed URL for temporary access to an object without requiring authentication. This is ideal for sharing files with external users or systems that don't have APS credentials. ### Method POST ### Endpoint /signed/resource ### Parameters #### Request Body - **bucketKey** (string) - Required - The key of the bucket containing the object. - **objectKey** (string) - Required - The key of the object to create a signed URL for. - **minutesExpiration** (integer) - Optional - The number of minutes until the signed URL expires. Defaults to 60. - **singleUse** (boolean) - Optional - If true, the signed URL can only be used once. Defaults to false. ### Request Example ```json { "bucketKey": "my-bucket", "objectKey": "models/building.rvt", "minutesExpiration": 60, "singleUse": true } ``` ### Response #### Success Response (200) - **signedUrl** (string) - The generated pre-signed URL. ### Response Example ```json { "signedUrl": "https://my-signed-url.com/object?signature=abcdef12345" } ``` ``` -------------------------------- ### GetModelViewsAsync - Retrieve Model Views Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves the list of model views (viewables) available for a translated model. Each view has a GUID that's required for extracting object trees and properties specific to that view. ```APIDOC ## GetModelViewsAsync ### Description Retrieves the list of model views (viewables) available for a translated model. Each view has a GUID that's required for extracting object trees and properties specific to that view. ### Method GET ### Endpoint /modelderivative/v2/designdata/:urn/metadata ### Parameters #### Path Parameters - **urn** (string) - Required - The URN of the design file. #### Query Parameters - **region** (string) - Optional - The region where the metadata is stored (e.g., "US", "EMEA"). Defaults to "US" if not specified. ### Response #### Success Response (200) - **data** (object) - Contains metadata about the model views. - **metadata** (array) - A list of metadata objects for each view. - **guid** (string) - The unique identifier for the model view. - **name** (string) - The name of the model view. #### Response Example ```json { "data": { "metadata": [ { "guid": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "3D View" }, { "guid": "f0e9d8c7-b6a5-4321-fedc-ba9876543210", "name": "2D Floor Plan" } ] } } ``` ``` -------------------------------- ### Model Derivative API - Get Derivative URL Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Generates a downloadable URL for a specific derivative, including authentication cookies. Use this to download translated outputs like DWG exports or OBJ files. ```APIDOC ## GET /derivatives/{derivativeUrn} ### Description Generates a downloadable URL for a specific derivative including authentication cookies. Use this to download translated outputs like DWG exports or OBJ files. ### Method GET ### Endpoint `/derivatives/{derivativeUrn}` ### Parameters #### Path Parameters - **derivativeUrn** (string) - Required - The URN of the derivative to download. - **urn** (string) - Required - The URN of the source file. - **region** (Region) - Required - The region where the derivative is stored (e.g., Region.US). ### Request Example ```csharp // C# Example using Autodesk.ModelDerivative; using Autodesk.ModelDerivative.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); ModelDerivativeClient modelDerivativeClient = new ModelDerivativeClient(authenticationProvider: staticAuthenticationProvider); string derivativeUrn = "derivative-urn-from-manifest"; string urn = "source-urn"; try { DerivativeDownload derivativeDownload = await modelDerivativeClient.GetDerivativeUrlAsync( derivativeUrn, urn, Region.US ); string downloadUrl = derivativeDownload.Url; Console.WriteLine($"Download URL: {downloadUrl}"); } catch (Exception ex) { Console.WriteLine(ex.Message); } ``` ### Response #### Success Response (200) - **Url** (string) - The downloadable URL for the derivative. ``` -------------------------------- ### CreateFolderAsync Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates a new folder within a project at a specified parent location. Folders help organize project content and support the BIM 360/ACC folder extension types. ```APIDOC ## POST /folders ### Description Creates a new folder within a project at a specified parent location. Folders help organize project content and support the BIM 360/ACC folder extension types. ### Method POST ### Endpoint /folders ### Parameters #### Path Parameters - **projectId** (string) - Required - The ID of the project where the folder will be created. - **folder_id** (string) - Required - The ID of the parent folder. #### Request Body - **folderPayload** (object) - Required - Payload containing folder details. - **Jsonapi** (object) - Optional - JSON API version information. - **VarVersion** (string) - Optional - The JSON API version, typically "1.0". - **Data** (object) - Required - Folder data. - **Type** (string) - Required - The type of the object, must be "folders". - **Attributes** (object) - Required - Folder attributes. - **Name** (string) - Required - The name of the new folder. - **Extension** (object) - Optional - Extension details for the folder. - **Type** (string) - Required - The type of the extension, e.g., "folders:autodesk.bim360:Folder". - **VarVersion** (string) - Required - The version of the extension, e.g., "1.0". - **Relationships** (object) - Required - Relationships for the folder. - **Parent** (object) - Required - Parent folder relationship. - **Data** (object) - Required - Parent folder data. - **Type** (string) - Required - The type of the parent, must be "folders". - **Id** (string) - Required - The ID of the parent folder. ### Request Example ```json { "jsonapi": { "version": "1.0" }, "data": { "type": "folders", "attributes": { "name": "New Project Folder", "extension": { "type": "folders:autodesk.bim360:Folder", "version": "1.0" } }, "relationships": { "parent": { "data": { "type": "folders", "id": "{parentFolderId}" } } } } } ``` ### Response #### Success Response (201 Created) - **Data** (object) - Information about the created folder. - **Id** (string) - The ID of the newly created folder. #### Response Example ```json { "jsonapi": { "version": "1.0" }, "data": { "type": "folders", "id": "urn:adsk.wipp:fs.dm.prod:folder-id", "attributes": { "name": "New Project Folder", "createTime": "2023-10-27T10:00:00Z", "modifiedTime": "2023-10-27T10:00:00Z", "extension": { "type": "folders:autodesk.bim360:Folder", "version": "1.0" } }, "relationships": { "project": { "data": { "type": "projects", "id": "{projectId}" } }, "parent": { "data": { "type": "folders", "id": "{parentFolderId}" } } } } } ``` ``` -------------------------------- ### Create Item in BIM 360 Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates a new item (file) in a project folder after uploading content. This links the uploaded file to the Data Management system with proper versioning and metadata. ```csharp using Autodesk.DataManagement; using Autodesk.DataManagement.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); DataManagementClient dataManagementClient = new DataManagementClient(authenticationProvider: staticAuthenticationProvider); ItemPayload itemPayload = new ItemPayload() { Jsonapi = new JsonApiVersion() { VarVersion = JsonApiVersionValue._10 }, Data = new ItemPayloadData() { Type = TypeItem.Items, Attributes = new ItemPayloadDataAttributes() { DisplayName = "drawing.rvt", Extension = new ItemPayloadDataAttributesExtension() { Type = "items:autodesk.bim360:File", VarVersion = "1.0" } }, Relationships = new ItemPayloadDataRelationships() { Tip = new ItemPayloadDataRelationshipsTip() { Data = new ItemPayloadDataRelationshipsTipData() { Type = TypeVersion.Versions, Id = "1" } }, Parent = new ItemPayloadDataRelationshipsParent() { Data = new ItemPayloadDataRelationshipsParentData() { Type = TypeFolder.Folders, Id = folder_id } } } }, Included = new List() { new ItemPayloadIncluded() { Type = TypeVersion.Versions, Id = "1", Attributes = new ItemPayloadIncludedAttributes() { Name = "drawing.rvt", Extension = new ItemPayloadIncludedAttributesExtension() { Type = "versions:autodesk.bim360:File", VarVersion = "1.0" } }, Relationships = new ItemPayloadIncludedRelationships() { Storage = new ItemPayloadIncludedRelationshipsStorage() { Data = new ItemPayloadIncludedRelationshipsStorageData() { Type = TypeObject.Objects, Id = storageUrn } } } } } }; CreatedItem item = await dataManagementClient.CreateItemAsync( projectId: project_id, itemPayload: itemPayload ); ``` -------------------------------- ### Create New Issue Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates a new issue with specified details like title, description, status, assignee, and due date. Requires project ID and issue payload. ```csharp using Autodesk.Construction.Issues; using Autodesk.Construction.Issues.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); IssuesClient issuesClient = new IssuesClient(authenticationProvider: staticAuthenticationProvider); IssuePayload newIssue = new IssuePayload(); newIssue.Title = "Foundation crack detected"; newIssue.Description = "Crack observed in northwest corner of building foundation"; newIssue.Status = Status.Open; newIssue.AssignedTo = "user-id"; newIssue.AssignedToType = AssignedToType.User; newIssue.IssueSubtypeId = "issue-subtype-id"; newIssue.DueDate = "2024-06-15"; Issue createdIssue = await issuesClient.CreateIssueAsync( projectId: project_id, issuePayload: newIssue, xAdsRegion: Region.US ); Console.WriteLine($"Created issue: {createdIssue.Id}"); ``` -------------------------------- ### Get Object Tree Async with .NET SDK Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves the hierarchical object tree for a model view. Use this to understand model structure for selection and navigation. Ensure the Model Derivative API is initialized with a valid token. ```csharp using Autodesk.ModelDerivative; using Autodesk.ModelDerivative.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); ModelDerivativeClient modelDerivativeClient = new ModelDerivativeClient(authenticationProvider: staticAuthenticationProvider); string modelGuid = "your-model-guid"; try { ObjectTree objectTree = await modelDerivativeClient.GetObjectTreeAsync( urn, modelGuid, Region.US ); if (objectTree.IsProcessing) { // 202 response - call again later Console.WriteLine("Object tree is still processing..."); } else { foreach (var obj in objectTree.Data.Objects) { Console.WriteLine($"Object: {obj.Name}, ID: {obj.ObjectId}"); } } } catch (Exception ex) { Console.WriteLine(ex.Message); } ``` -------------------------------- ### Create Storage for File Upload Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates a storage location for uploading a new file to a project. This reserves a storage URN used with the OSS API for file content upload. ```csharp using Autodesk.DataManagement; using Autodesk.DataManagement.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); DataManagementClient dataManagementClient = new DataManagementClient(authenticationProvider: staticAuthenticationProvider); StoragePayload storagePayload = new StoragePayload() { Jsonapi = new JsonApiVersion() { VarVersion = JsonApiVersionValue._10 }, Data = new StoragePayloadData() { Type = TypeObject.Objects, Attributes = new StoragePayloadDataAttributes() { Name = "drawing.dwg" }, Relationships = new StoragePayloadDataRelationships() { Target = new StoragePayloadDataRelationshipsTarget() { Data = new StoragePayloadDataRelationshipsTargetData() { Type = TypeFolderItemsForStorage.Folders, Id = folder_id } } } } }; Storage storage = await dataManagementClient.CreateStorageAsync( projectId: project_id, storagePayload: storagePayload ); string storageUrn = storage.Data.Id; ``` -------------------------------- ### Retrieve System Event Hooks Async Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Retrieves webhooks filtered by a specific system and event type. Use this to manage and monitor specific integration points. ```csharp using Autodesk.Webhooks; using Autodesk.Webhooks.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); WebhooksClient webhooksClient = new WebhooksClient(authenticationProvider: staticAuthenticationProvider); Hooks hooks = await webhooksClient.GetSystemEventHooksAsync( system: Systems.Data, _event: Events.DmFolderCopied, status: StatusFilter.Active ); foreach (var hook in hooks.Data) { Console.WriteLine($"Hook: {hook.HookId}, Event: {hook.Event}"); } ``` -------------------------------- ### Webhooks API - Create System Hook Source: https://context7.com/autodesk-platform-services/aps-sdk-net/llms.txt Creates webhooks for all events in a system at once. This is efficient when you need to monitor multiple event types and prefer a single callback endpoint for all notifications. ```APIDOC ## POST /webhooks/v1/systems/{system} ### Description Creates webhooks for all events in a system at once. This is efficient when you need to monitor multiple event types and prefer a single callback endpoint for all notifications. ### Method POST ### Endpoint `/webhooks/v1/systems/{system}` ### Parameters #### Path Parameters - **system** (Systems) - Required - The system for which to create webhooks (e.g., Systems.Derivative). #### Request Body - **CallbackUrl** (string) - Required - The URL to which event notifications will be sent. - **Scope** (object) - Optional - Defines the scope of the webhook (e.g., workflow IDs). ### Request Example ```csharp // C# Example using Autodesk.Webhooks; using Autodesk.Webhooks.Model; using Autodesk.SDKManager; StaticAuthenticationProvider staticAuthenticationProvider = new StaticAuthenticationProvider(token); WebhooksClient webhooksClient = new WebhooksClient(authenticationProvider: staticAuthenticationProvider); HookPayload hookPayload = new HookPayload(); hookPayload.CallbackUrl = "https://your-server.com/webhook/all-events"; hookPayload.Scope = new { workflow = "my-workflow-id" }; Hook response = await webhooksClient.CreateSystemHookAsync( system: Systems.Derivative, hookPayload: hookPayload ); foreach (var hook in response.Hooks) { Console.WriteLine($"Hook ID: {hook.HookId}"); Console.WriteLine($"Event: {hook.Event}"); Console.WriteLine($"Status: {hook.Status}"); } ``` ### Response #### Success Response (200) - **Hooks** (array) - A list of created webhooks. - **HookId** (string) - The ID of the webhook. - **Event** (string) - The event the webhook is subscribed to. - **Status** (string) - The status of the webhook. ```