10 ORDS_PAR PL/SQL Package Reference
The ORDS_PAR
PL/SQL package contains subprograms (procedures and
functions) for generating and revoking the pre-authenticated
URLs in Oracle REST Data Services.
10.1 ORDS_PAR.DEFINE_FOR_HANDLER
Format
ORDS.DEFINE_FOR_HANDLER(
p_module_name IN VARCHAR2,
p_pattern IN VARCHAR2,
p_method IN VARCHAR2,
p_duration IN NUMBER
);
Description
DEFINE_FOR_HANDLER
function is used to create a PAR for a RESTful
service handler. The PAR is valid only in the context of a current REST-enabled
schema.
Parameters
- p_module_name
-
Specifies the name of the existing RESTful service module. This parameter value is case sensitive.
Example
ordstest
enabled
schema.set serveroutput on
DECLARE
l_uri clob;
BEGIN
l_uri := ORDS_PAR.DEFINE_FOR_HANDLER(
p_module_name => 'demo',
p_pattern => 'emp/',
p_method => 'GET',
p_duration => 360
);
COMMIT;
DBMS_OUTPUT.PUT_LINE(l_uri);
END;
/
-- Prints
{
"token": "<par_token>",
"alias" : "<par_alias>",
"uri": "ordstest/_/par/"<par_token>/demo_prefix/emp/"
}
Parent topic: ORDS_PAR PL/SQL Package Reference
10.2 ORDS_PAR.REVOKE_PAR
Format
ORDS_PAR.REVOKE_PAR(
p_par_token IN VARCHAR2
);
Description
REVOKE_PAR
function revokes an existing PAR in the current schema.
It may take up to 30 seconds for the changes to take effect.
Parameters
Example
BEGIN
ORDS_PAR.REVOKE_PAR(
p_par_token => '<par_token>');
COMMIT;
END;
/
Parent topic: ORDS_PAR PL/SQL Package Reference