The following samples showcase some fundamental GraphQL queries for Data Exchange, which are used to implement the following workflows:
- Retrieving the Exchange Item info
- Quantity takeoff for Doors Sample Workflow
- Window Schedule Sample Workflow
- Exchange Creation Workflow
- APS credentials (use
http://localhost:8080/api/auth/callback
as callback URL, take note of you Client ID and Client Secret) - Provisioned access to ACC Account (use Client Id from above)
- Node.js (we recommend the Long Term Support version)
- Terminal (for example, Windows Command Prompt or macOS Terminal)
Clone this project 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-dx-samples-nodejs.git
Specify the following environment variables:
Mac OSX/Linux (Terminal)
npm install
export APS_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
export APS_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
export APS_CALLBACK_URL=http://localhost:8080/api/auth/callback
export SERVER_SESSION_SECRET=<<PUT HERE SOMETHING RANDOM>>
npm start
Windows
npm install
set APS_CLIENT_ID =<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
set APS_CLIENT_SECRET =<<YOUR CLIENT SECRET>>
set APS_CALLBACK_URL=http://localhost:8080/api/auth/callback
set SERVER_SESSION_SECRET=<<PUT HERE SOMETHING RANDOM>>
npm start
General APS Support form.
This sample is licensed under the terms of the MIT License. Please see the LICENSE file for more details.
- Denis Grigor, Developer Advocate
- Suraj Kumar, Software Developer