Skip to content

Data Connector API:This API is compatible with Autodesk Construction Cloud (ACC) or Autodesk BIM360.

License

Notifications You must be signed in to change notification settings

autodesk-platform-services/aps-data-connector-postman.collection

Repository files navigation

Postman Collection for BIM360 Data Connector API

Postman Data Connector API

Beginner License

Description

This repository provides demos for Data Connector API. This API is compatible with Autodesk Construction Cloud (ACC) or Autodesk BIM360.

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 APS 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. APS Account: Learn how to create a APS Account, activate the subscription and create an app by this tutorial. Get APS client id, client secret and callback url. Please register APS 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-platform-services/aps-data-connector-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.

    This collection demos * 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

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:

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.

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, Develope Advocacy and Support, Autodesk

About

Data Connector API:This API is compatible with Autodesk Construction Cloud (ACC) or Autodesk BIM360.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published