45.33 GET_WEB_SOURCE_OPERATION Function
This function gets a REST Data Source operation. The REST Data Source operation object contains all meta data for the HTTP request which needs to be done to implement the given database operation (such as INSERT, UPDATE, DELETE).
Syntax
APEX_PLUGIN_UTIL.GET_WEB_SOURCE_OPERATION (
p_web_source in apex_plugin.t_web_source,
p_db_operation in apex_plugin.t_db_operation DEFAULT NULL,
p_perform_init in BOOLEAN DEFAULT FALSE,
p_preserve_headers in BOOLEAN DEFAULT FALSE )
RETURN apex_plugin.t_web_source_operation;
Parameters
Parameter | Description |
---|---|
p_web_source |
REST Data Source plug-in meta data. |
p_db_operation |
Database operation to look up the Web Source operation (such as UPDATE -> PUT , INSERT -> POST ).
|
p_db_operation |
Whether to inialize the HTTP request environment (HTTP request headers, cookies, request body placeholder replacements). If passed as false, the Plug-In developer is responsible for setting up the environment themselves. |
p_preserve_headers |
Whether to preserve HTTP request headers in apex_web_service.g_request_headers .
|
Returns
Parameter | Description |
---|---|
* |
Plug-In meta data for the web source operation. |
Example
The following example uses get_web_source_operation
as part of a Plug-In "fetch" procedure in order to get meta data about the REST Data Source operation.
apex_plugin_util.get_web_source_operation (
p_plugin in apex_plugin.t_plugin,
p_web_source in apex_plugin.t_web_source,
p_params in apex_plugin.t_web_source_fetch_params,
p_result in out nocopy apex_plugin.t_web_source_fetch_result )
IS
l_web_source_operation apex_plugin.t_web_source_operation;
BEGIN
l_web_source_operation := apex_plugin_util.get_web_source_operation(
p_web_source => p_web_source,
p_db_operation => apex_plugin.c_db_operation_fetch_rows,
p_perform_init => true );
p_result.responses.extend( 1 );
apex_plugin_util.make_rest_request(
p_web_source_operation => l_web_source_operation,
--
p_response => p_result.responses( 1 ),
p_response_parameters => p_result.out_parameters );
END plugin_fetch;
Parent topic: APEX_PLUGIN_UTIL