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 |
\Autodesk\Forge\Client\Model\Item getItem($project_id, $item_id)
Returns a resource item by ID for any item within a given project. Resource items represent word documents, fusion design files, drawings, spreadsheets, etc.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\ItemsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$item_id = "item_id_example"; // string | the `item id`
try {
$result = $apiInstance->getItem($project_id, $item_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ItemsApi->getItem: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
item_id | string | the `item id` |
\Autodesk\Forge\Client\Model\Item
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Autodesk\Forge\Client\Model\Folder getItemParentFolder($project_id, $item_id)
Returns the "parent" folder for the given item.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\ItemsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$item_id = "item_id_example"; // string | the `item id`
try {
$result = $apiInstance->getItemParentFolder($project_id, $item_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ItemsApi->getItemParentFolder: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
item_id | string | the `item id` |
\Autodesk\Forge\Client\Model\Folder
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Autodesk\Forge\Client\Model\JsonApiCollection getItemRefs($project_id, $item_id, $filter_type, $filter_id, $filter_extension_type)
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).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\ItemsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$item_id = "item_id_example"; // string | the `item id`
$filter_type = array("filter_type_example"); // string[] | filter by the `type` of the `ref` target
$filter_id = array("filter_id_example"); // string[] | filter by the `id` of the `ref` target
$filter_extension_type = array("filter_extension_type_example"); // string[] | filter by the extension type
try {
$result = $apiInstance->getItemRefs($project_id, $item_id, $filter_type, $filter_id, $filter_extension_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ItemsApi->getItemRefs: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
item_id | string | the `item id` | |
filter_type | string[] | filter by the `type` of the `ref` target | [optional] |
filter_id | string[] | filter by the `id` of the `ref` target | [optional] |
filter_extension_type | string[] | filter by the extension type | [optional] |
\Autodesk\Forge\Client\Model\JsonApiCollection
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Autodesk\Forge\Client\Model\Refs getItemRelationshipsRefs($project_id, $item_id, $filter_type, $filter_id, $filter_ref_type, $filter_direction, $filter_extension_type)
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).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\ItemsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$item_id = "item_id_example"; // string | the `item id`
$filter_type = array("filter_type_example"); // string[] | filter by the `type` of the `ref` target
$filter_id = array("filter_id_example"); // string[] | filter by the `id` of the `ref` target
$filter_ref_type = array("filter_ref_type_example"); // string[] | filter by `refType`
$filter_direction = "filter_direction_example"; // string | filter by the direction of the reference
$filter_extension_type = array("filter_extension_type_example"); // string[] | filter by the extension type
try {
$result = $apiInstance->getItemRelationshipsRefs($project_id, $item_id, $filter_type, $filter_id, $filter_ref_type, $filter_direction, $filter_extension_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ItemsApi->getItemRelationshipsRefs: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
item_id | string | the `item id` | |
filter_type | string[] | filter by the `type` of the `ref` target | [optional] |
filter_id | string[] | filter by the `id` of the `ref` target | [optional] |
filter_ref_type | string[] | filter by `refType` | [optional] |
filter_direction | string | filter by the direction of the reference | [optional] |
filter_extension_type | string[] | filter by the extension type | [optional] |
\Autodesk\Forge\Client\Model\Refs
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Autodesk\Forge\Client\Model\Version getItemTip($project_id, $item_id)
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\ItemsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$item_id = "item_id_example"; // string | the `item id`
try {
$result = $apiInstance->getItemTip($project_id, $item_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ItemsApi->getItemTip: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
item_id | string | the `item id` |
\Autodesk\Forge\Client\Model\Version
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Autodesk\Forge\Client\Model\Versions getItemVersions($project_id, $item_id, $filter_type, $filter_id, $filter_extension_type, $filter_version_number, $page_number, $page_limit)
Returns versions for the given item. Multiple versions of a resource item can be uploaded in a project.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\ItemsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$item_id = "item_id_example"; // string | the `item id`
$filter_type = array("filter_type_example"); // string[] | filter by the `type` of the `ref` target
$filter_id = array("filter_id_example"); // string[] | filter by the `id` of the `ref` target
$filter_extension_type = array("filter_extension_type_example"); // string[] | filter by the extension type
$filter_version_number = array(56); // int[] | filter by `versionNumber`
$page_number = 56; // int | specify the page number
$page_limit = 56; // int | specify the maximal number of elements per page
try {
$result = $apiInstance->getItemVersions($project_id, $item_id, $filter_type, $filter_id, $filter_extension_type, $filter_version_number, $page_number, $page_limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ItemsApi->getItemVersions: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
item_id | string | the `item id` | |
filter_type | string[] | filter by the `type` of the `ref` target | [optional] |
filter_id | string[] | filter by the `id` of the `ref` target | [optional] |
filter_extension_type | string[] | filter by the extension type | [optional] |
filter_version_number | int[] | filter by `versionNumber` | [optional] |
page_number | int | specify the page number | [optional] |
page_limit | int | specify the maximal number of elements per page | [optional] |
\Autodesk\Forge\Client\Model\Versions
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Autodesk\Forge\Client\Model\ItemCreated postItem($project_id, $body)
Creates a new item in the 'data' domain service.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\ItemsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$body = new \Autodesk\Forge\Client\Model\CreateItem(); // \Autodesk\Forge\Client\Model\CreateItem | describe the item to be created
try {
$result = $apiInstance->postItem($project_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ItemsApi->postItem: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
body | \Autodesk\Forge\Client\Model\CreateItem | describe the item to be created |
\Autodesk\Forge\Client\Model\ItemCreated
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
postItemRelationshipsRef($project_id, $item_id, $body)
Creates a custom relationship between an item and another resource within the 'data' domain service (folder, item, or version).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\ItemsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$item_id = "item_id_example"; // string | the `item id`
$body = new \Autodesk\Forge\Client\Model\CreateRef(); // \Autodesk\Forge\Client\Model\CreateRef | describe the ref to be created
try {
$apiInstance->postItemRelationshipsRef($project_id, $item_id, $body);
} catch (Exception $e) {
echo 'Exception when calling ItemsApi->postItemRelationshipsRef: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
item_id | string | the `item id` | |
body | \Autodesk\Forge\Client\Model\CreateRef | describe the ref to be created |
void (empty response body)
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]