I’m writing a few troubleshooting tips when you are having a problem making REST calls. I intend to add more as I hear them.
1. POSTMAN is your friend
First and foremost, if you are having a problem making a REST call, please try to test, using a tool that you know should work to verify if your URL and data are correct. This will help narrow down if the issue is due to the data you are passing or your program processing the data.
2. GET vs. POST and Parameters in URL vs. Body
Another thing that people tends to overlook and mix sometimes is the method you need to use. Please make sure you use the right method. In particular GET vs. POST with Field API.
BIM 360 Field’s POST call expects passing parameter as Body. If you are passing parameters in an URL, try switching to Body. URL parameter has some limitations, such as length and character encoding (as well as security concerns for data being visible in the URL over the internet). The image below shows an example of calling Field API, POST /api/equipment with a long equipment data.
If you click on “Generate Code”, POSTMAN generates a code snippet in a wide range of programming language, too. It may help you if the issue is how to format a text data.