Skip to content

Latest commit

 

History

History
250 lines (166 loc) · 8.24 KB

ProjectsApi.md

File metadata and controls

250 lines (166 loc) · 8.24 KB

Autodesk\Forge\Client\ProjectsApi

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

Method HTTP request Description
getHubProjects GET /project/v1/hubs/{hub_id}/projects
getProject GET /project/v1/hubs/{hub_id}/projects/{project_id}
getProjectHub GET /project/v1/hubs/{hub_id}/projects/{project_id}/hub
getProjectTopFolders GET /project/v1/hubs/{hub_id}/projects/{project_id}/topFolders
postStorage POST /data/v1/projects/{project_id}/storage

getHubProjects

\Autodesk\Forge\Client\Model\Projects getHubProjects($hub_id, $filter_id, $filter_extension_type)

Returns a collection of projects for a given hub_id. A project represents an A360 project or a BIM 360 project which is set up under an A360 hub or BIM 360 account, respectively. Within a hub or an account, multiple projects can be created to be used.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Autodesk\Forge\Client\Api\ProjectsApi($authObject);
$hub_id = "hub_id_example"; // string | the `hub id` for the current operation
$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->getHubProjects($hub_id, $filter_id, $filter_extension_type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->getHubProjects: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
hub_id string the `hub id` for the current operation
filter_id string[] filter by the `id` of the `ref` target [optional]
filter_extension_type string[] filter by the extension type [optional]

Return type

\Autodesk\Forge\Client\Model\Projects

Authorization

oauth2_access_code

HTTP request headers

  • 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]

getProject

\Autodesk\Forge\Client\Model\Project getProject($hub_id, $project_id)

Returns a project for a given project_id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Autodesk\Forge\Client\Api\ProjectsApi($authObject);
$hub_id = "hub_id_example"; // string | the `hub id` for the current operation
$project_id = "project_id_example"; // string | the `project id`

try {
    $result = $apiInstance->getProject($hub_id, $project_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->getProject: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
hub_id string the `hub id` for the current operation
project_id string the `project id`

Return type

\Autodesk\Forge\Client\Model\Project

Authorization

oauth2_access_code

HTTP request headers

  • 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]

getProjectHub

\Autodesk\Forge\Client\Model\Hub getProjectHub($hub_id, $project_id)

Returns the hub for a given project_id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Autodesk\Forge\Client\Api\ProjectsApi($authObject);
$hub_id = "hub_id_example"; // string | the `hub id` for the current operation
$project_id = "project_id_example"; // string | the `project id`

try {
    $result = $apiInstance->getProjectHub($hub_id, $project_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->getProjectHub: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
hub_id string the `hub id` for the current operation
project_id string the `project id`

Return type

\Autodesk\Forge\Client\Model\Hub

Authorization

oauth2_access_code

HTTP request headers

  • 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]

getProjectTopFolders

\Autodesk\Forge\Client\Model\TopFolders getProjectTopFolders($hub_id, $project_id)

Returns the details of the highest level folders the user has access to for a given project

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Autodesk\Forge\Client\Api\ProjectsApi($authObject);
$hub_id = "hub_id_example"; // string | the `hub id` for the current operation
$project_id = "project_id_example"; // string | the `project id`

try {
    $result = $apiInstance->getProjectTopFolders($hub_id, $project_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->getProjectTopFolders: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
hub_id string the `hub id` for the current operation
project_id string the `project id`

Return type

\Autodesk\Forge\Client\Model\TopFolders

Authorization

oauth2_access_code

HTTP request headers

  • 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]

postStorage

\Autodesk\Forge\Client\Model\StorageCreated postStorage($project_id, $body)

Creates a storage location in the OSS where data can be uploaded to.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Autodesk\Forge\Client\Api\ProjectsApi($authObject);
$project_id = "project_id_example"; // string | the `project id`
$body = new \Autodesk\Forge\Client\Model\CreateStorage(); // \Autodesk\Forge\Client\Model\CreateStorage | describe the file the storage is created for

try {
    $result = $apiInstance->postStorage($project_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->postStorage: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
project_id string the `project id`
body \Autodesk\Forge\Client\Model\CreateStorage describe the file the storage is created for

Return type

\Autodesk\Forge\Client\Model\StorageCreated

Authorization

oauth2_access_code

HTTP request headers

  • 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]