REST Call issue with retrieving data from mindsphere into mendix.

0
while testing app “Run locally” REST call is showing proper data from mindsphere. During “Run Cloud” REST call not showing any data. I’ve already set error handler to show error msg but nothing coming up on error side as well considering it executed without error. How to debug where REST was successful or not while running remote(cloud)? 
asked
3 answers
0

Have you tried setting the LogLevel for the REST Comsume node to TRACE? If you do this, you’ll see all the requests and responses in your logfiles. That should reveal what is happening.

Hope this helps.

answered
0

Hi Trupal Patel,

when we set the path of get or post at that time when have to check then at which path you have taken.

For example, when we fetch the get method and set the rest API path check it's running on local or not. if your want at cloud then first you run that on a cloud after that set that path. 

When we use REST API  it provide two-path one is for local and another is for  cloud .

please check these .

Thanks 

Sujat 

answered
0

I guess, you missed to grant your app the required scopes in developer Cockpit.
To check add a custom error handler to your REST node and log or show the status code via:
toString($latestHttpResponse/StatusCode).

Something like this:

If you get a 403 than you have to grant the required scope for the api you use.

Working locally you have a technical access token which grants access the all apis.
Working in the cloud you have to specify which api your app and the user of your app is allowed to use.
You do this in the developer cockpit.
For details see:
https://docs.mendix.com/partners/siemens/mindsphere-module-details#rolesscopes

answered