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 |
\Autodesk\Forge\Client\Model\Version getVersion($project_id, $version_id)
Returns the version with the given version_id
.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\VersionsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$version_id = "version_id_example"; // string | the `version id`
try {
$result = $apiInstance->getVersion($project_id, $version_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VersionsApi->getVersion: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
version_id | string | the `version 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\Item getVersionItem($project_id, $version_id)
Returns the item the given version is associated with.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\VersionsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$version_id = "version_id_example"; // string | the `version id`
try {
$result = $apiInstance->getVersionItem($project_id, $version_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VersionsApi->getVersionItem: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
version_id | string | the `version 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\JsonApiCollection getVersionRefs($project_id, $version_id, $filter_type, $filter_id, $filter_extension_type)
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).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\VersionsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$version_id = "version_id_example"; // string | the `version 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->getVersionRefs($project_id, $version_id, $filter_type, $filter_id, $filter_extension_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VersionsApi->getVersionRefs: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
version_id | string | the `version 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 getVersionRelationshipsRefs($project_id, $version_id, $filter_type, $filter_id, $filter_ref_type, $filter_direction, $filter_extension_type)
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).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\VersionsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$version_id = "version_id_example"; // string | the `version 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->getVersionRelationshipsRefs($project_id, $version_id, $filter_type, $filter_id, $filter_ref_type, $filter_direction, $filter_extension_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VersionsApi->getVersionRelationshipsRefs: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
version_id | string | the `version 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\VersionCreated postVersion($project_id, $body)
Creates a new version of an item in the 'data' domain service.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Autodesk\Forge\Client\Api\VersionsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$body = new \Autodesk\Forge\Client\Model\CreateVersion(); // \Autodesk\Forge\Client\Model\CreateVersion | describe the version to be created
try {
$result = $apiInstance->postVersion($project_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VersionsApi->postVersion: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
body | \Autodesk\Forge\Client\Model\CreateVersion | describe the version to be created |
\Autodesk\Forge\Client\Model\VersionCreated
- 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]
postVersionRelationshipsRef($project_id, $version_id, $body)
Creates a custom relationship between a version 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\VersionsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$version_id = "version_id_example"; // string | the `version id`
$body = new \Autodesk\Forge\Client\Model\CreateRef(); // \Autodesk\Forge\Client\Model\CreateRef | describe the ref to be created
try {
$apiInstance->postVersionRelationshipsRef($project_id, $version_id, $body);
} catch (Exception $e) {
echo 'Exception when calling VersionsApi->postVersionRelationshipsRef: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
project_id | string | the `project id` | |
version_id | string | the `version 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]