All URIs are relative to https://developer.api.autodesk.com/
Method | HTTP request | Description |
---|---|---|
getFolder | GET /data/v1/projects/{project_id}/folders/{folder_id} | |
getFolderContents | GET /data/v1/projects/{project_id}/folders/{folder_id}/contents | |
getFolderParent | GET /data/v1/projects/{project_id}/folders/{folder_id}/parent | |
getFolderRefs | GET /data/v1/projects/{project_id}/folders/{folder_id}/refs | |
getFolderRelationshipsRefs | GET /data/v1/projects/{project_id}/folders/{folder_id}/relationships/refs | |
postFolderRelationshipsRef | POST /data/v1/projects/{project_id}/folders/{folder_id}/relationships/refs |
FolderResponse getFolder(projectIdfolderId, )
Returns the folder by ID for any folder within a given project. All folders or sub-folders within a project are associated with their own unique ID, including the root folder.
var ForgeDataManagement = require('forge-data-management');
var defaultClient = ForgeDataManagement.ApiClient.default;
// Configure OAuth2 access token for authorization: oauth2_access_code
var oauth2_access_code = defaultClient.authentications['oauth2_access_code'];
oauth2_access_code.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new ForgeDataManagement.FoldersApi();
var projectId = "projectId_example"; // String | the `project id`
var folderId = "folderId_example"; // String | the `folder id`
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getFolder(projectIdfolderId, , callback);
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | the `project id` | |
folderId | String | the `folder id` |
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
JsonApiCollection getFolderContents(projectIdfolderId, , opts)
Returns a collection of items and folders within a folder. Items represent word documents, fusion design files, drawings, spreadsheets, etc.
var ForgeDataManagement = require('forge-data-management');
var defaultClient = ForgeDataManagement.ApiClient.default;
// Configure OAuth2 access token for authorization: oauth2_access_code
var oauth2_access_code = defaultClient.authentications['oauth2_access_code'];
oauth2_access_code.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new ForgeDataManagement.FoldersApi();
var projectId = "projectId_example"; // String | the `project id`
var folderId = "folderId_example"; // String | the `folder id`
var opts = {
'filterType': ["filterType_example"], // [String] | filter by the `type` of the `ref` target
'filterId': ["filterId_example"], // [String] | filter by the `id` of the `ref` target
'filterExtensionType': ["filterExtensionType_example"] // [String] | filter by the extension type
'pageNumber': 56, // Integer | specify the page number
'pageLimit': 56 // Integer | specify the maximal number of elements per page
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getFolderContents(projectIdfolderId, , opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | the `project id` | |
folderId | String | the `folder 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] |
pageNumber | Integer | specify the page number | [optional] |
pageLimit | Integer | specify the maximal number of elements per page | [optional] |
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
FolderResponse getFolderParent(projectIdfolderId, )
Returns the parent folder (if it exists). In a project, subfolders and resource items are stored under a folder except the root folder which does not have a parent of its own.
var ForgeDataManagement = require('forge-data-management');
var defaultClient = ForgeDataManagement.ApiClient.default;
// Configure OAuth2 access token for authorization: oauth2_access_code
var oauth2_access_code = defaultClient.authentications['oauth2_access_code'];
oauth2_access_code.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new ForgeDataManagement.FoldersApi();
var projectId = "projectId_example"; // String | the `project id`
var folderId = "folderId_example"; // String | the `folder id`
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getFolderParent(projectIdfolderId, , callback);
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | the `project id` | |
folderId | String | the `folder id` |
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
JsonApiCollection getFolderRefs(projectIdfolderId, , opts)
Returns the resources (`items`, `folders`, and `versions`) which have a custom relationship with the given `folder_id`. Custom relationships can be established between a folder and other resources within the 'data' domain service (folders, items, and versions).
var ForgeDataManagement = require('forge-data-management');
var defaultClient = ForgeDataManagement.ApiClient.default;
// Configure OAuth2 access token for authorization: oauth2_access_code
var oauth2_access_code = defaultClient.authentications['oauth2_access_code'];
oauth2_access_code.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new ForgeDataManagement.FoldersApi();
var projectId = "projectId_example"; // String | the `project id`
var folderId = "folderId_example"; // String | the `folder id`
var opts = {
'filterType': ["filterType_example"], // [String] | filter by the `type` of the `ref` target
'filterId': ["filterId_example"], // [String] | filter by the `id` of the `ref` target
'filterExtensionType': ["filterExtensionType_example"] // [String] | filter by the extension type
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getFolderRefs(projectIdfolderId, , opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | the `project id` | |
folderId | String | the `folder 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] |
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
RefsResponse getFolderRelationshipsRefs(projectIdfolderId, , opts)
Returns the custom relationships that are associated to the given `folder_id`. Custom relationships can be established between a folder and other resources within the 'data' domain service (folders, items, and versions).
var ForgeDataManagement = require('forge-data-management');
var defaultClient = ForgeDataManagement.ApiClient.default;
// Configure OAuth2 access token for authorization: oauth2_access_code
var oauth2_access_code = defaultClient.authentications['oauth2_access_code'];
oauth2_access_code.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new ForgeDataManagement.FoldersApi();
var projectId = "projectId_example"; // String | the `project id`
var folderId = "folderId_example"; // String | the `folder id`
var opts = {
'filterType': ["filterType_example"], // [String] | filter by the `type` of the `ref` target
'filterId': ["filterId_example"], // [String] | filter by the `id` of the `ref` target
'filterRefType': ["filterRefType_example"], // [String] | filter by `refType`
'filterDirection': "filterDirection_example", // String | filter by the direction of the reference
'filterExtensionType': ["filterExtensionType_example"] // [String] | filter by the extension type
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getFolderRelationshipsRefs(projectIdfolderId, , opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | the `project id` | |
folderId | String | the `folder 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] |
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
postFolderRelationshipsRef(projectIdfolderId, body)
Creates a custom relationship between a folder and another resource within the 'data' domain service (folder, item, or version).
var ForgeDataManagement = require('forge-data-management');
var defaultClient = ForgeDataManagement.ApiClient.default;
// Configure OAuth2 access token for authorization: oauth2_access_code
var oauth2_access_code = defaultClient.authentications['oauth2_access_code'];
oauth2_access_code.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new ForgeDataManagement.FoldersApi();
var projectId = "projectId_example"; // String | the `project id`
var folderId = "folderId_example"; // String | the `folder id`
var body = new ForgeDataManagement.CreateRef(); // CreateRef | describe the ref to be created
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.postFolderRelationshipsRef(projectIdfolderId, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | the `project id` | |
folderId | String | the `folder id` | |
body | CreateRef | describe the ref to be created |
null (empty response body)
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json