UI Builder- External API Calls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 10:34 PM
Hi Community,
I had a question on the UI Builder.
I want to make an on demand Rest API call to an external server for my use case.
The inbuilt solutions, data broker or helpers.snhttp, all require the call to first go to the instance backend, then from there to the external server. The external server sends the response to the instance backend, then only does it come to my browser.
Can I cut the middleman(instance backend) and directly configure UI Builder to make the api call to the external server?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2024 05:56 AM - edited 10-30-2024 05:56 AM
Hi @Hasan6 ,
Yes, We can achieve this requirement in two ways.
1. user normal javascript fetch method, where you can call external server API directly from client script.
2. There is a new feature called "External REST Data Broker", which is available from the Washington release.
Table: "sys_ux_data_broker_rest_external"
With this, you can configure your API endpoint and call it from the UI builder. Without current instance/glide layer involvement, API requests will be made to the target system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2024 06:51 AM
Hi Srikanth,
Quick follow ups:
1. Can you share a sample script for to implement in point 1?
2. I cannot seem to pass the http headers here:
Eg: Content-Type: application/json
How would I add that?
Thanks for looking into this.