-
Notifications
You must be signed in to change notification settings - Fork 0
Fusion Forge API Notes
Pan, Kevin Zhu edited this page Apr 11, 2022
·
5 revisions
Documentation: https://forge.autodesk.com/en/docs/data/v2/
- Most of the operations will require 3-legged OAuth token
https://forge.autodesk.com/en/docs/data/v2/tutorials/download-file/
-
First navigate to the hub -> project -> folder (-> subfolder)
- For our purposes, we know the hub id (Bechtel Center), project (will make a project supporting file syncing service), folders associated with project (one for each machine group) and can ignore subfolders
- Each file (not folder) will have both a
item
andversion
associated with it - API endpoint for getting contents of folder:
https://developer.api.autodesk.com/data/v1/projects/:project_id/folders/:folder_id/contents
-
We can download an item using the get the storage id from the
version
of that item- API endpoint for downloading item:
https://developer.api.autodesk.com/oss/v2/buckets/:bucket_key/objects/:object_name
-
bucket_key
should just be 'wip.dm.prod' -
object_name
gathered from previous step, using theversion
of a file
-
- Returns text
- API endpoint for downloading item:
-
Save response body to a file
- Testing in Postman, file saves as correct type but is named after the
object_name
which is an id, not the actual file name- Would not be hard to rename the file, but should double check the formatting outside of Postman
- Testing in Postman, file saves as correct type but is named after the