This repository has been deprecated and migrated to https://github.com/autodesk-platform-services/aps-data-connector-postman.collection
Change Log:
- 7/29/2022: project level access is supported
- 7/29/2022: Get:jobs (all jobs with this user) is provided
- 7/29/2022: "all" to fetch data of all services.
This repository provides demos for the category of BIM360 Data Connector API . Right now, the APIs can:
- Create requests with the scheduleInterval: one time, by day, by week, by month or by year
- Get requests collection, single request, jobs of request
- Get single job, extracted data list, and signed url of extracted data
- Patch or delete request
The API supports 3 legged token only.
Postman is a popular tool that provides an easy-to-use interface to send HTTP requests. Postman is able to parse the responses that Forge sends you and save response parameter values to variables. These parameters can then be reused in subsequent requests through these variables. The Postman collections in this repository use this ability to provide pre-populated HTTP requests to help you follow the tutorial workflow with minimal effort. You can also modify the requests and experiment without having to write a single line of code.
-
You can learn how to install and use Postman from here.
-
You can download the Postman installer from here.
-
Forge Account: Learn how to create a Forge Account, activate the subscription and create an app by this tutorial. Get Forge client id, client secret and callback url. Please register Forge app with the callback url as
https://www.getpostman.com/oauth2/callback
-
BIM 360 Account and project: must be Account Admin to add the app integration. Learn about provisioning. Make a note with the account name
-
Since the API requires 3 legged token, and as product help indicates, this user must have the Executive Overview access enabled.
-
Get BIM360 account id (hub id without b.) by API , or copy from BIM360 UI.
-
Clone this repository or download it. It's recommended to install GitHub Desktop. To clone it via command line, use the following (Terminal on MacOSX/Linux, Git Shell on Windows):
git clone https://github.com/autodesk-forge/forge-bim360-data.connector.api-postman.collection
-
Import the collection and environment files to Postman
-
In environment, input client id, client secret, hub id , and callbackUrl. callbackUrl is your own callback endpoint that Data Connector API will notifiy you when the extracting job is done. For test purpose, RequestBin is a nice tool to produce custom webhook (callback). Data Connector will also send email nortification to the user who submits the request. So callbackUrl is not a must.
-
In context menu of collection >> Edit, switch to the tab Authorization. Click Get New Access Token, input the variables as below:
-
Grant Type
Authorization Code
-
Callback URL
https://www.getpostman.com/oauth2/callback
-
Auth URL
https://developer.api.autodesk.com/authentication/v1/authorize
-
Access Token URL
https://developer.api.autodesk.com/authentication/v1/gettoken
-
Client ID
{{client_id}}
-
Client Secret
{{client_secret}}
-
Scope
data:read data:write data:create
-
Client Authentication
Send Client credentials body
-
-
Click Get New Access Token, it will direct to login Autodesk account, after it succeeds, the token will be generated. Click Use Token. Then, click Update to close the window of Edit
Data Connector API requires to work with 3-legged token. This collection takes Inheriting auth to apply 3-legged token to every endpoint in the collection automatically, which means it does not need to input the token in the header explicitly.
-
Assume the steps of Setup have been performed. The access token is ready.
-
Play the scripts. Try to change some parameters or body with more scenarios.
- If the request is submitted in UI, the description will be something like:
IQ Data Extraction for <your BIM360 account id>
- After a new request is created by API, it would take a few minutes until GET:Request/jobs returns jobs list. At the beginning, job will be queued, next take time to running, finally complete or fail. So keep polling GET:Request/jobs until one job is available, and test the proceeding scripts.
- Watch callback endpoint or email to check the notification
Document
Tutorials:
Blogs:
- Forge Blog
- Field of View, a BIM focused blog
This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.
Xiaodong Liang @coldwood, Forge Partner Development