Okay, now that you have installed the Node-RED on your machine, let’s have a go at executing your first-ever script/flow.
We’ll explain to you how you can create 3D Repo issues outside of 3drepo.io by simply using our APIs.
This first flow is set up to work with a Sample_Federation in Sample_Project in your teamspace.
Alternatively, you can run it on any other model if you wish.
- Start Node-RED
- Go to your Teamspace and open the default Lego_House_Federation model
- In a new tab, open Node-RED editor at http://localhost:1880
- From menu in right top corner select Import
- In Clipboard, copy code from here (ctrl+A, ctrl+C) and paste it (ctrl+V) in Import nodes dialog in Node-RED editor
- Select “new flow”
- Hit the Import button. You will see a pop-up message with the successfully imported flows and nodes numbers
- Hit “Deploy” button. You will see a pop-up message indicating “Successfully deployed”
- In a new tab, open Node-RED dashboard at http://localhost:1880/ui
- Fill in your 3D Repo username and password credentials in the Login section
- Go back to Node-RED editor
- Double-click on “MAIN INPUTS” node
- Fill in required fields:
- Type in your ‘teamspace’ (identical with your username)
- In 3D Repo, open Lego_House_Federation and copy & paste Model ID from your browser’s address bar
- Paste your API Key after generating it from your Teamspace
- Hit Done button
- Hit the Deploy button once again
- Go to Sample_Federation in 3D Repo
- A new issue called “Hello world!” appears in the Issues tracker and/or in the Issues & Risks section when picking the adequate Model/Federation
- In case you encounter node-specific errors in Node-RED, ‘Debug messages’ icon help to debug by identifying the nature of those errors
Congratulations! You have successfully deployed your first flow. Now try something more useful. You can find more samples and tutorials here.
If your flow doesn’t work and you get “no response from server” and “Error: socket hang up” errors from HTTP node, try increasing maximum API request timeout and limit:
- Go to Node-RED folder C:Users***.node-red
- Open settings.js
- Uncomment and change the following:
For more information about the Issue requests, head over to our APIs Docs.