Skip to Main Content

ORDS, SODA & JSON in the Database

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

REST API CALL NOT WORKING

anju abhiFeb 14 2025 — edited 6 days ago

DECLARE

l\_data CLOB;  

l\_empname VARCHAR2 (50);  

l\_division  VARCHAR2 (25);  

l\_url VARCHAR2 (1000) :='http://ip:port/PersonalInfoServic/personalinfocontroller?action=GETEMPDETFOREMPLOYEECODE'   

;

BEGIN

l\_data := apex\_web\_service.make\_rest\_request(  

    p\_url => l\_url,  

    p\_http\_method => 'GET'  

);  

WITH json\_tab AS  

(  

    SELECT l\_data FROM dual  

)  

SELECT l\_data, division  

    INTO :P5\_EMPNAME,:P5\_DIVN  

EXCEPTION WHEN no_data_found THEN

:P5\_EMPNAME := '';  

:P5\_DIVN := '';  

END;

Sir ,using this code i can able to call the Full API in the :P5_EMPNAME…but i need division in the :P5_DIVN what should i do ?

Duplicate Post
This post has already been added here:

Comments

thatJeffSmith-Oracle Feb 13 2025

Your ENTRA users will get authenticated via JSON Web Tokens, and their Entra roles will determine which ORDS REST APIs they can hit.

When they hit an endpoint, it'll execute code in the database as the database user that owns the schema where the REST API is defined, not as Entra defiend end user. In fact, the Entra users won't have accounts in the database (they could, but wont' need to).

The :current_user field as far as ords is concerned would be the corresponding oauth2 client or JWT issued for the authorizied session.

Your prehook should be able to alter the session to set the context that would put your RLS/VPD security policy in play.

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Marked as duplicate
Added on Feb 14 2025
3 comments
71 views