Skip to Content
0

Web-IDE: how to get thing details from code

Mar 26 at 08:23 AM

81

avatar image

I'm trying to develop a custom application in Web-IDE, i.e. without using Web-IDE IoT widgets.

I successfully loaded all the things list in a model using Application Enablemen oData service (IOTAS-ADVANCEDLIST-THING-ODATA/CompositeThings/v1) but now I would like to read all details for each thing (thing properties and so on). I'm encountering some issues using IOTAS destination REST endpoint, because if I use the relative path (/appiot-mds/Things) in my code I get a 404 error, if I use the absolute path (https:// . iot-sap.cfapps.eu10.hana.ondemand.com/appiot-mds/Things) the API call is redirected to the authorization page and I get a CORS error.

Any suggestion would be really appreciated.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Christian Schuerings
Mar 26 at 11:33 AM
0

Hi Luca,

the application "appiot-mds" is preconfigured in the Cloud Platform Destination IOTAS (You can check this via SAP Cloud Platform Cockpit -> Destination).

Please also take a look a tyour neo-app.json and check, how the path for the IOTAS destination is configured:

neo-app.json:

{
"path": "/backend/",
"target": {
"type": "destination",
"name": "IOTAS"
},
"description": "IoT AE"
},

Afterwards you should be able to access the Thing API with "backend/Things" as the resource URI.

Regards

Christian

Share
10 |10000 characters needed characters left characters exceeded