When building Redwood application extensions in Visual Builder Studio (VBS), connecting to external REST APIs is a common requirement. This blog describes how to go about this using using a combination of VBS and Oracle Fusion features.
Can You Use This Feature?
This feature should be by default available for all Oracle Fusion Cloud Application instances. You can additionally perform a quick test by entering the following URL into your browser:
https://{fusion-host}/api/rwdinfra/trap
Expected response:
{"2":{"links":[{"href":"2/"}]}}
If you get a 404 or a different response than above, then your Fusion instance doesnt support this functionality yet.
Secondly, you can only use advanced features like creating a backend and service connection in “advanced mode”. For AppUIs that are provided out-of-the-box from Oracle, you will typically be restricted to only use “express” mode. You can however create custom App Extensions from scratch and add connections to external REST APIs in those.
App Extensions on Fusion vs Visual Apps on Oracle Visual Builder
If you are coming from an Oracle Visual Builder background (more information here), the process for connecting to external REST APIs in App Extensions will look different. In a standalone Visual Builder application, backend details to connect to an external REST API are typically self-contained within the app in the source code
In App Extensions (App UI) developed on VBS, however, there is a strict separation between design-time and runtime configurations for backends pointing to external REST resources (i.e. that are not Oracle Fusion). While you can create a custom backend to connect to any external REST API and see it work in the Page Designer, that configuration does not automatically carry over to the Oracle Fusion Cloud environment. Every backend used in an extension requires a corresponding runtime server configuration to be manually defined within Oracle Fusion Cloud Applications for the Preview and Deployment actions to function.
See it in Action: Step-by-Step Video Walkthrough
Here is a detailed video on how to consume external REST APIs in App Extensions using an API from Oracle APEX/ORDS as an example.
Design Time vs Runtime: Why the Extra Step?
When you create a backend in VB Studio using a “local server” definition, the details such as the URL and credentials are stored specifically within the VB Studio environment. This allows the service to work while you are working in the Page Designer. However, these local settings are not propagated to Oracle Fusion Cloud and are not stored in the application’s source code. If you attempt to preview or deploy your extension without a runtime configuration, the REST calls will fail with a “server not configured” error. To fix this, you must provide a corresponding runtime server configuration within Oracle Fusion Cloud Applications for every instance (Dev, Test, or Prod) where you plan to deploy.
Accessing the “Manage Backends” Page in Fusion
When a backend lacks a runtime configuration, a warning will appear in the VB Studio Servers tab. You can reach the configuration page in two ways:
- Direct link from VB Studio warning message – this is easier, because it pre-populates the extension ID and the backend name you need to configure
- Accessing from Setup and Maintenance – You can go to Oracle Fusion’s Setup and Maintenance menu, and search manually for “Manage Backends for Visual Builder Studio”. Here you would need to click on Create Backend and populate the extension ID and backend name yourself. Care should be taken that these attributes exactly match what you have defined in VB Studio.
- To View this Page: You must have the Create and Edit Backends for Visual Builder Studio (ORA_FND_TRAP_PRIV) privilege.
- To Edit or Add Entries: To edit the page or add configurations, you must have one of the following Oracle Cloud Application roles:
- ORA_FND_ADMINISTRATOR_JOB (Administrator)
- ORA_FND_APPLICATION_DEVELOPER_JOB (Application Developer)
Common Troubleshooting
Missing Local Servers After Environment Changes
A common issue occurs when Local Servers do not appear for a backend you previously configured. This typically happens if you have changed the Environment within Visual Builder Studio. Because local server definitions (including URLs and credentials) are stored within the specific VB Studio environment and not in the source code, they are environment-specific. If you switch to a different VB Studio environment, you will need to redefine the local server for that backend to make it available for design-time use again
Inconsistent URLs in VBS and Fusion
Another issue occurs when Local Servers and the runtime configurations have inconsistent URLs i.e. the Local Server has a URL of https://host_name/path1/path2 and Oracle Fusion has a runtime configuration of https://host_name/path1. To avoid this inconsistency, it is a good practice to add the hostname without any path segment in the backend URL, and let the service connection have the rest of the URL
Pro-tip – Centralize your backends across extensions
To avoid redefining the same external backend (like an Oracle Integration Cloud endpoint) in every single extension (and duplicating credentials and auth), consider creating a common extension. By defining your backends in one common extension and marking them as “Accessible to application extensions,” you can simply add that extension as a dependency in your other projects. This allows you to reuse the same backend and runtime configurations across your entire ecosystem without manual duplication
Documentation links
- Service Connections in App Extensions
- Local Servers vs In-source servers
- Providing runtime configuration for Backends in Oracle Fusion
- Complete example of configuring an Oracle Process Automation REST API in an App Extension