59.2 About Web Credentials and APEX_WEB_SERVICE
You can use the MAKE_REQUEST
and MAKE_REST_REQUEST
procedures to enable Web Credentials in order to authenticate against the remote Web Service.
Web Credentials can be used with the APEX_WEB_SERVICE
package from outside the context of an Oracle APEX application (such as from SQLcl or from a Database Scheduler job) as long as the database user making the call is mapped to an APEX workspace.
If the database user is mapped to multiple workspaces, you must first call APEX_UTIL.SET_WORKSPACE
or APEX_UTIL.SET_SECURITY_GROUP_ID
as in the following examples.
If the database user is mapped to multiple workspaces, you must first call APEX_UTIL.SET_WORKSPACE
or APEX_UTIL.SET_SECURITY_GROUP_ID
as in the following examples. The APEX_WEB_SERVICE
package cannot be used by database users that are not mapped to any workspace unless they have been granted the role APEX_ADMINISTRATOR_ROLE
.
Examples
Example 1
apex_util.set_workspace(p_workspace => 'MY_WORKSPACE');
Example 2
FOR c1 in (
select workspace_id
from apex_applications
where application_id = 100 )
LOOP
apex_util.set_security_group_id(p_security_group_id => c1.workspace_id);
END LOOP;
Parent topic: APEX_WEB_SERVICE