Download the PHP package jahid/autodesk-forge without Composer
On this page you can find all versions of the php package jahid/autodesk-forge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jahid/autodesk-forge
More information about jahid/autodesk-forge
Files in jahid/autodesk-forge
Package autodesk-forge
Short Description this is a package for autodesk forge process management
License MIT
Informations about the package autodesk-forge
Forge PHP SDK
Overview
This PHP SDK enables you to easily integrate the Forge REST APIs into your application, including OAuth, Data Management, Model Derivative, and Design Automation.
Requirements
- PHP version 8.1 and above.
- A registered app on the Forge Developer portal.
Installation
Composer
To install the bindings via Composer, run:
Vendor publish
Run command
Then publish the AutodeskForgeService
service.
Add those variable in .env
Tutorial
Follow this tutorial to see a step-by-step authentication guide, and examples of how to use the Forge APIs.
Create an App
Create an app on the Forge Developer portal. Note the client ID and client secret.
Authentication
This SDK comes with an OAuth 2.0 client that allows you to retrieve 2-legged tokens. The tutorial uses 2-legged tokens for calling different Data Management endpoints.
2-Legged Token
This type of token is given directly to the application.
To get a 2-legged token run the following code. There have an optional parameter (bool $isSetSession) also. If you send true
then it save the token in session. If you do not send any parameter or send false
parameter then it not store the token in session.
Note:
If you set the token then you can also access to token as like this . But we recommend to use this process;
API Documentation
You can get the full documentation for the API on the Developer Portal
Documentation for API Endpoints
All URIs are relative to https://developer.api.autodesk.com. For example, the createActivity URI is 'https://developer.api.autodesk.com/autocad.io/us-east/v2/Activities'.
Method | Parameter | Description |
---|---|---|
getToken | optional $isSetSession => bool | Get authentication token. If you send $isSetSession parameter value true , then it store the token in session. So application not sent api request for every time for token. |
|
createBucket | optional $policyKey => string (persistent, transient, temporary)optional $bucketKey => string |
Create a bucket |
getBuckets | get bucket list | |
getBucketDetails | bucketKey | get bucket details |
deleteBucket | bucketKey | delete bucket details |
upload | path=> string, fileName => string | upload file in s3 bucket. here path is file source path and fileName is which name is use in s3 |
translate | urn => string, fileName => string, type => string (default value svf2 ), views => array (default value ["2d", "3d"] ), compressedUrn => bool (default value false ), region => string (default value us ) |
You find the objectId in upload file response, this is urn. You can translate file for 2d views only, as well 3d views only also you can translate both 2d & 3d ... |
encodeUrn | $urn=> string | this method is used for encode urn |
getManifest (check translate status) | $encodedUrn=> string (objectId is urn, you must encode the urn) |
this method is used for check translate status |
deleteManifest (delete translated file) | $encodedUrn=> string (objectId is urn, you must encode the urn) |
this method is used for delete translated file |
checkTranslateStatus (check translate status) | $encodedUrn=> string (objectId is urn, you must encode the urn) |
this method is used for check translate status |
Future Feature
- Upload file in Autodesk 3600
Support
Please open an issue on GitHub
License
Create CRUD operation for Laravel application under the MIT license.