Skip to Content

Web-IDE: how to get thing details from code

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 26 at 11:33 AM

    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

    Add comment
    10|10000 characters needed characters exceeded