Naveen Posted on May 31 Calling GET API & Mapping Response in VBCS (Service Connection) # api # sql # tutorial # ui In Oracle VBCS, integrating a GET API and displaying its response on the UI is one of the most common use cases. In this blog, we’ll walk through how to: Create a GET API (ORDS) Configure Service Connection in VBCS Call API using Event Trigger Map API response to UI components 1. Sample GET API (ORDS) Let’s first create a simple GET API to fetch data from nj_dump(NJ_DUMP is a table). Below is code snippet for the creations GET API using PLSQL BEGIN ORDS . define_template ( p_module_name => ' nj_api ' , p_pattern => ' get_data ' ); END ; / BEGIN ORDS . define_handler ( p_module_name => ' nj_api ' , p_pattern => ' get_data ' , p_method => ' GET ' , p_source_type => ORDS . source_type_query , p_source => ' SELECT name, num, dob, email FROM nj_dump WHERE num = nvl(:num,num) ' ); END ; / Enter fullscreen mode Exit fullscreen mode ENDPOINT looks like GET /ords//nj_api/get_data?num=101 Before moving to VBCS kindly test it in POSTMAN or Curl Note: I prefer Basic Authorization. 2. Create Service Connection in VBCS Navigations : Go to Services → Service Connections→ Chose define by endpoint Click Create Enter: respective Details 3. Add GET Endpoint Paste your respectively GET URL in the below bar & proceed next Once you done with GET REQUEST endpoint , you will able to see like this 4. Create Page Variables Under Web apps we will create type & variables. Hope you choose the type from endpoint you will your endpoints here like this, pick get for our case. In the next step we have to select the needed column to display in the VBCS UI successfully create type, it will help us to create variable in the next page. Now go to variables & create variable, make sure select the type which you created earlier. 5.Assign Variables to the form/page I created form layout, if code needed, I would provide you at end of blog. In the same manne
Back to Home

Calling GET API & Mapping Response in VBCS (Service Connection)
B
Blizine Admin
·2 min read·0 views
📰Dev.to — dev.to
B
Blizine Admin
View Profile Staff Writer