Autodesk-Forge / forge-bim360-data.connector.api-postman.collection

Postman collection for Forge Data Connector API of BIM360

Home Page:https://forge.autodesk.com/en/docs/bim360/v1/overview/field-guide/data-connector/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DEPRECATED

This repository has been deprecated and migrated to https://github.com/autodesk-platform-services/aps-data-connector-postman.collection

Postman Collection for BIM360 Data Connector API

Postman BIM-360 API Data Connector API

Beginner License

Description

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.

What's Postman?

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.

Setup

  1. 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

  2. BIM 360 Account and project: must be Account Admin to add the app integration. Learn about provisioning. Make a note with the account name

  3. Since the API requires 3 legged token, and as product help indicates, this user must have the Executive Overview access enabled.

  4. Get BIM360 account id (hub id without b.) by API , or copy from BIM360 UI.

  5. 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

  6. Import the collection and environment files to Postman

  7. 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.

  8. 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

  9. 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.

API Test

  1. Assume the steps of Setup have been performed. The access token is ready.

  2. Play the scripts. Try to change some parameters or body with more scenarios.

Notes

  1. If the request is submitted in UI, the description will be something like: IQ Data Extraction for <your BIM360 account id>
  2. 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.
  3. Watch callback endpoint or email to check the notification

Further Reading

Document

Tutorials:

Blogs:

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Xiaodong Liang @coldwood, Forge Partner Development

About

Postman collection for Forge Data Connector API of BIM360

https://forge.autodesk.com/en/docs/bim360/v1/overview/field-guide/data-connector/

License:MIT License