Skip to content

Latest commit

 

History

History
191 lines (115 loc) · 6.39 KB

VersionsApi.md

File metadata and controls

191 lines (115 loc) · 6.39 KB

ForgeSdk.VersionsApi

All URIs are relative to https://developer.api.autodesk.com/

Method HTTP request Description
getVersion GET /data/v1/projects/{project_id}/versions/{version_id}
getVersionItem GET /data/v1/projects/{project_id}/versions/{version_id}/item
getVersionRefs GET /data/v1/projects/{project_id}/versions/{version_id}/refs
getVersionRelationshipsRefs GET /data/v1/projects/{project_id}/versions/{version_id}/relationships/refs
postVersion POST /data/v1/projects/{project_id}/versions
postVersionRelationshipsRef POST /data/v1/projects/{project_id}/versions/{version_id}/relationships/refs

getVersion

Version getVersion(projectId, versionId, oauth2client, credentials)

Returns the version with the given `version_id`.

Parameters

Name Type Description Notes
projectId String the `project id`
versionId String the `version id`

Return type

Version

Authorization

oauth2_access_code

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json, application/json

getVersionItem

Item getVersionItem(projectId, versionId, oauth2client, credentials)

Returns the item the given version is associated with.

Parameters

Name Type Description Notes
projectId String the `project id`
versionId String the `version id`

Return type

Item

Authorization

oauth2_access_code

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json, application/json

getVersionRefs

JsonApiCollection getVersionRefs(projectId, versionId, opts, oauth2client, credentials)

Returns the resources (`items`, `folders`, and `versions`) which have a custom relationship with the given `version_id`. Custom relationships can be established between a version of an item and other resources within the 'data' domain service (folders, items, and versions).

Parameters

Name Type Description Notes
projectId String the `project id`
versionId String the `version id`
filterType [String] filter by the `type` of the `ref` target [optional]
filterId [String] filter by the `id` of the `ref` target [optional]
filterExtensionType [String] filter by the extension type [optional]

Return type

JsonApiCollection

Authorization

oauth2_access_code

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json, application/json

getVersionRelationshipsRefs

Refs getVersionRelationshipsRefs(projectId, versionId, opts, oauth2client, credentials)

Returns the custom relationships that are associated to the given `version_id`. Custom relationships can be established between a version of an item and other resources within the 'data' domain service (folders, items, and versions).

Parameters

Name Type Description Notes
projectId String the `project id`
versionId String the `version id`
filterType [String] filter by the `type` of the `ref` target [optional]
filterId [String] filter by the `id` of the `ref` target [optional]
filterRefType [String] filter by `refType` [optional]
filterDirection String filter by the direction of the reference [optional]
filterExtensionType [String] filter by the extension type [optional]

Return type

Refs

Authorization

oauth2_access_code

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json, application/json

postVersion

VersionCreated postVersion(projectId, body, oauth2client, credentials)

Creates a new version of an item in the 'data' domain service.

Parameters

Name Type Description Notes
projectId String the `project id`
body CreateVersion describe the version to be created

Return type

VersionCreated

Authorization

oauth2_access_code

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json, application/json

postVersionRelationshipsRef

postVersionRelationshipsRef(projectId, versionId, body, oauth2client, credentials)

Creates a custom relationship between a version and another resource within the 'data' domain service (folder, item, or version).

Parameters

Name Type Description Notes
projectId String the `project id`
versionId String the `version id`
body CreateRef describe the ref to be created

Return type

null (empty response body)

Authorization

oauth2_access_code

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json, application/json