Skip to content

Latest commit

 

History

History
255 lines (155 loc) · 8.52 KB

ItemsApi.md

File metadata and controls

255 lines (155 loc) · 8.52 KB

ForgeSdk.ItemsApi

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

Method HTTP request Description
getItem GET /data/v1/projects/{project_id}/items/{item_id}
getItemParentFolder GET /data/v1/projects/{project_id}/items/{item_id}/parent
getItemRefs GET /data/v1/projects/{project_id}/items/{item_id}/refs
getItemRelationshipsRefs GET /data/v1/projects/{project_id}/items/{item_id}/relationships/refs
getItemTip GET /data/v1/projects/{project_id}/items/{item_id}/tip
getItemVersions GET /data/v1/projects/{project_id}/items/{item_id}/versions
postItem POST /data/v1/projects/{project_id}/items
postItemRelationshipsRef POST /data/v1/projects/{project_id}/items/{item_id}/relationships/refs

getItem

Item getItem(projectId, itemId, oauth2client, credentials)

Returns a resource item by ID for any item within a given project. Resource items represent word documents, fusion design files, drawings, spreadsheets, etc.

Parameters

Name Type Description Notes
projectId String the `project id`
itemId String the `item id`

Return type

Item

Authorization

oauth2_access_code

HTTP request headers

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

getItemParentFolder

Folder getItemParentFolder(projectId, itemId, oauth2client, credentials)

Returns the "parent" folder for the given item.

Parameters

Name Type Description Notes
projectId String the `project id`
itemId String the `item id`

Return type

Folder

Authorization

oauth2_access_code

HTTP request headers

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

getItemRefs

JsonApiCollection getItemRefs(projectId, itemId, opts, oauth2client, credentials)

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

Parameters

Name Type Description Notes
projectId String the `project id`
itemId String the `item 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

getItemRelationshipsRefs

Refs getItemRelationshipsRefs(projectId, itemId, opts, oauth2client, credentials)

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

Parameters

Name Type Description Notes
projectId String the `project id`
itemId String the `item 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

getItemTip

Version getItemTip(projectId, itemId, oauth2client, credentials)

Returns the "tip" version for the given item. Multiple versions of a resource item can be uploaded in a project. The tip version is the most recent one.

Parameters

Name Type Description Notes
projectId String the `project id`
itemId String the `item id`

Return type

Version

Authorization

oauth2_access_code

HTTP request headers

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

getItemVersions

Versions getItemVersions(projectId, itemId, opts, oauth2client, credentials)

Returns versions for the given item. Multiple versions of a resource item can be uploaded in a project.

Parameters

Name Type Description Notes
projectId String the `project id`
itemId String the `item 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]
filterVersionNumber [Integer] filter by `versionNumber` [optional]
pageNumber Integer specify the page number [optional]
pageLimit Integer specify the maximal number of elements per page [optional]

Return type

Versions

Authorization

oauth2_access_code

HTTP request headers

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

postItem

ItemCreated postItem(projectId, body, oauth2client, credentials)

Creates a new item in the 'data' domain service.

Parameters

Name Type Description Notes
projectId String the `project id`
body CreateItem describe the item to be created

Return type

ItemCreated

Authorization

oauth2_access_code

HTTP request headers

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

postItemRelationshipsRef

postItemRelationshipsRef(projectId, itemId, body, oauth2client, credentials)

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

Parameters

Name Type Description Notes
projectId String the `project id`
itemId String the `item 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