Skip to Content
0
Sep 21, 2021 at 12:47 PM

Issue while calling API using destination from Fiori UI5 - BTP

948 Views Last edit Sep 21, 2021 at 01:49 PM 5 rev

Hi Team,

We are trying to make a REST API call from BTP Fiori. when we directly made an ajax call, we ran into CORS error. After following few threads and blogs, we created a Destination in cockpit and did connectivity test which was successful. After configuring the multi target router and relevant route settings in xs-app.json, we then tried to access the destination created from controller.js and tried to make a call which is failing with below 404 error.

Any suggestion would help on this.

Destination:

xs-app:

project12 is the app module name followed by destination in url :

Blog that we followed:

Calling External API In Custom Task UI of Workflow in Cloud Foundry | SAP Blogs

Thank you.

Attachments

xs-app.png (24.8 kB)
ajax.png (12.4 kB)
destination.jpg (149.3 kB)
error.png (61.2 kB)
error-resp.png (14.0 kB)