Table of Contents

Class VersionsRequestBuilder

Namespace
Autodesk.DataManagement.Data.V1.Projects.Item.Versions
Assembly
Autodesk.DataManagement.dll

Builds and executes requests for operations under \data\v1\projects{project_id}\versions

public class VersionsRequestBuilder : BaseRequestBuilder
Inheritance
BaseRequestBuilder
VersionsRequestBuilder
Inherited Members
BaseRequestBuilder.PathParameters
BaseRequestBuilder.RequestAdapter
BaseRequestBuilder.UrlTemplate

Constructors

VersionsRequestBuilder(Dictionary<string, object>, IRequestAdapter)

Instantiates a new VersionsRequestBuilder and sets the default values.

public VersionsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter)

Parameters

pathParameters Dictionary<string, object>

Path parameters for the request

requestAdapter IRequestAdapter

The request adapter to use to execute the requests.

VersionsRequestBuilder(string, IRequestAdapter)

Instantiates a new VersionsRequestBuilder and sets the default values.

public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter)

Parameters

rawUrl string

The raw URL to use for the request builder.

requestAdapter IRequestAdapter

The request adapter to use to execute the requests.

Properties

this[string]

Gets an item from the Autodesk.DataManagement.data.v1.projects.item.versions.item collection

public WithVersion_ItemRequestBuilder this[string position] { get; }

Parameters

position string

The unique identifier of a version.

Property Value

WithVersion_ItemRequestBuilder

A WithVersion_ItemRequestBuilder

Methods

PostAsync(CreateVersion, Action<RequestConfiguration<VersionsRequestBuilderPostQueryParameters>>?, CancellationToken)

Creates new versions of a file (item), except for the first version of the item. To create the first version of the item, use POST items.Before creating each version you need to create a new storage location for the version, and upload the file to the storage object. For more details about the workflow, see the tutorial on uploading a file.This endpoint also copies versions of items to exisitng items in other folders. The endpoint creates a new version of the existing item in the target folder. You cannot copy versions of items across different projects and accounts.To copy versions of items to other folders and create a new item and a first version of the item in the target folder, use POST versions.This endpoint can also be used to delete files on BIM360 Document Management. For more information, please refer to the delete and restore a file turorial.Note that to access BIM 360 Docs files using the Data Management API you need to provision your app in the BIM 360 Account Administrator portal. For more details, see the Manage Access to Docs tutorial.New! Autodesk Construction Cloud platform (ACC). Note that this endpoint is compatible with ACC projects. For more information about the Autodesk Construction Cloud APIs, see the Autodesk Construction Cloud documentation.

public Task<CreatedVersion?> PostAsync(CreateVersion body, Action<RequestConfiguration<VersionsRequestBuilder.VersionsRequestBuilderPostQueryParameters>>? requestConfiguration = null, CancellationToken cancellationToken = default)

Parameters

body CreateVersion

Describe the version to be created.

requestConfiguration Action<RequestConfiguration<VersionsRequestBuilder.VersionsRequestBuilderPostQueryParameters>>

Configuration for the request such as headers, query parameters, and middleware options.

cancellationToken CancellationToken

Cancellation token to use when cancelling requests

Returns

Task<CreatedVersion>

A CreatedVersion

Exceptions

CreatedVersion400Error

When receiving a 400 status code

CreatedVersion403Error

When receiving a 403 status code

CreatedVersion404Error

When receiving a 404 status code

CreatedVersion423Error

When receiving a 423 status code

ToPostRequestInformation(CreateVersion, Action<RequestConfiguration<VersionsRequestBuilderPostQueryParameters>>?)

Creates new versions of a file (item), except for the first version of the item. To create the first version of the item, use POST items.Before creating each version you need to create a new storage location for the version, and upload the file to the storage object. For more details about the workflow, see the tutorial on uploading a file.This endpoint also copies versions of items to exisitng items in other folders. The endpoint creates a new version of the existing item in the target folder. You cannot copy versions of items across different projects and accounts.To copy versions of items to other folders and create a new item and a first version of the item in the target folder, use POST versions.This endpoint can also be used to delete files on BIM360 Document Management. For more information, please refer to the delete and restore a file turorial.Note that to access BIM 360 Docs files using the Data Management API you need to provision your app in the BIM 360 Account Administrator portal. For more details, see the Manage Access to Docs tutorial.New! Autodesk Construction Cloud platform (ACC). Note that this endpoint is compatible with ACC projects. For more information about the Autodesk Construction Cloud APIs, see the Autodesk Construction Cloud documentation.

public RequestInformation ToPostRequestInformation(CreateVersion body, Action<RequestConfiguration<VersionsRequestBuilder.VersionsRequestBuilderPostQueryParameters>>? requestConfiguration = null)

Parameters

body CreateVersion

Describe the version to be created.

requestConfiguration Action<RequestConfiguration<VersionsRequestBuilder.VersionsRequestBuilderPostQueryParameters>>

Configuration for the request such as headers, query parameters, and middleware options.

Returns

RequestInformation

A Microsoft.Kiota.Abstractions.RequestInformation

WithUrl(string)

Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.

public VersionsRequestBuilder WithUrl(string rawUrl)

Parameters

rawUrl string

The raw URL to use for the request builder.

Returns

VersionsRequestBuilder

A VersionsRequestBuilder