Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

This repository provides a postman collection that demonstrates the usage of Issues API for Autodesk Construction Cloud(ACC) .

License

Notifications You must be signed in to change notification settings

Autodesk-Forge/forge-acc.issues.api-postman.collection

Repository files navigation

DEPRECATED

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

Postman Collection for ACC Issues API

Postman

Issue API of Autodesk Construction Cloud

Beginner License

Description

This repository provides a postman collection that demonstrates the usage of Issues API for Autodesk Construction Cloud(ACC) .

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. Ensure to select API Type Autodesk Construction Cloud. Get Forge client id, client secret and callback url. Please register Forge app with the callback url as

    https://www.getpostman.com/oauth2/callback

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

  2. Follow the product help document of ACC to create some issues.

  3. Create some custom attributes definitions with all types: text, dropdown, numeric and paragraph. This is to test creating/patching issue with custom attributes.

  4. (Optional) Upload a couple of photos in Photo module. This is to test creating reference with Photo.

  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-autodesk.docs.issue.api-postman.collection

  6. Import the collection and environment files to Postman

  7. In environment, input client id, client secret, account name, project name and one user email as assignee

  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

    • Client Authentication Send Client credentials body

  9. Click Get New Access Token, it will direct to login Autodesk user account, after it succeeds, the token will be generated. Click Use Token.

Issue 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 and the access token is ready.

  2. Run the scripts in Run First. It will get account(hub) id, project id and one user id (for assignee when creating a new issue). Because the API to get project users of ACC has not been exposed, we workaround by calling GET:Account Users. This endpoint requires 2-legged token, so run 03-[backup]Authentication 2-legged token before running 03-[Workaround-2LO] Get One Account User Id.

    Next call 04-GET One Location to get one location id (for testing issue creation)

  3. Run the endpoints in API References. Follow API documents to verify if the APIs work well. Try to change the parameters in various scenarios to see how it goes. Check UI if it works well with API (such as creating/patching new issue and creating new comments etc. )

  4. (Optional) In ACC, a reference is defined by Relationships API, which is a common across different modules. To work with Issue>>References, you can use Relationship API. This sample Postman collection includes a few sample usages. For more detail about Relationships API, please take a look at this blog.

    • 01-Get id of one photo: call Photo API to get one photo id
    • 02-Add Reference of Issue with Photo: add reference between one issue (from previous test scripts in #3) and one photo
    • 03-Search Relationship of Issues and Photos: get all referenced photos of one issue
    • 04-Supported Relationships to Create: get all relationships that can be created. Check those which are related with issue. Add more test scripts to create/get relationships of other types of references (document, rfi, asset etc.)

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, Developer Advocate and Support team

About

This repository provides a postman collection that demonstrates the usage of Issues API for Autodesk Construction Cloud(ACC) .

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published