Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
we would like to call a Service, which returns a JSON, when you call it with a POST request.
Unfortunately, we get the following response when we call the Service via Postman:
The URI we use: http://localhost:8080/Thingworx/Things/{ThingName}/Services/Get_All_Sensor_Data
The Response:
HI @DigitalFactory.
There are a lot of questions here:
Regards.
--Sharon
HI @slangley,
thanks a lot for your answer.
Please find the requested information below:
When we execute the code in composer we get the following error message:
"Error executing service Get_All_Sensor_Data. Message :: ReferenceError: "code" is not defined. - See Script Error Log for more details."
The appKey is bount to the Administrator. I know that is not best practice and just used for test purposes.
Please find a screenshot of our post man request attached.
Hi @DigitalFactory.
Since executing the service in Composer directly is failing, there is clearly a problem with the service itself. Therefore, it's not going to work in Postman.
Have you tried troubleshooting the code for this service to determine the cause of the problem? This article may provide some guidance there. If you run across any issues while troubleshooting, please feel free to reach out.
Regards.
--Sharon
Hi @DigitalFactory.
Have you made any progress on resolving your issue? If so, please share the details here for the benefit of others on the community.
Regards.
--Sharon