Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Apex- set_remote_server is not setting up remote server in Deployment instance

Parul_ORAOct 3 2024 — edited Oct 3 2024

Hi Team,

I am using Oracle Apex Cloud. I have deployed below code to test instance using bit-bucket to set remote server before apex application deployment:

declare
l_db_name varchar2(30) := sys_context('userenv','db_name');
l_saas_name varchar2(30);
l_base_url varchar2(256);
l_errmsg varchar2(1000);
v_workspace_id NUMBER;
begin
case upper(substr(l_db_name, instr(l_db_name, '_')+1))
when 'DEV' then
l_saas_name := 'dev1';
when 'TEST' then
l_saas_name := 'dev4';
else
raise no_data_found;
end case;
select workspace_id into v_workspace_id
from apex_workspaces where workspace = 'APEX_WKSP';
apex_util.set_workspace(p_workspace => 'APEX_WKSP');
apex_application_install.set_workspace_id(v_workspace_id);
apex_application_install.set_remote_server(
p_static_id => 'SaaS-remote-server-toconnect-fscmrestapi',
p_base_url => 'https://login-'||l_saas_name||'-SaaS.fa.ocs.oraclecloud.com:443/fscmRestApi/resources/');
end;
/

Script is running successfully but remote server path has not been changed.

Same script I am running from Test Apex instance as Developer role in sql commands section (this time, the apex application is deployed in test), still remote server is not setting up.

Please let me know how this script can work on different environments during application deployments.

Comments
Post Details