Posts

Secure RESTful Web Service in Oracle APEX with Basic Authentication

Image
Heard they say you should secure your web service? 👮   Stick with me in this article, and I’ll show you a professional way to secure your RESTful Web Service with Basic Authentication   In the previous article, I explained how to CREATE  a RESTful Web Services inside Oracle APEX. https://lidagholizadeh.blogspot.com/2025/08/all-about-restful-webservice-in-oracle.html In this Article I will shows you how to build a professional, secure JSON RESTful web service in Oracle APEX that returns employee details from the HR.EMPLOYEES table, protected by Basic Authentication with PBKDF2 password hashing. Prerequisites Oracle Database 19c or later Oracle APEX 21.1 or newer HR sample schema unlocked and available EXECUTE on DBMS_CRYPTO A workspace with privileges to create RESTful Services 🚴 Let's GO Step 1 – Create a Table to Store Web Service Users CREATE TABLE ws_users ( username VARCHAR2 ( 100 ) PRIMARY KEY, password_hash VARCHAR2 ( 64 ) NOT NULL , -- ...

USING External REST API in Oracle APEX

Image
  In the previous article, I explained how to CREATE  a RESTful Web Services inside Oracle APEX. https://lidagholizadeh.blogspot.com/2025/08/all-about-restful-webservice-in-oracle.html In this article, we will focus on the opposite scenario: How to consume external REST APIs from Oracle APEX and PL/SQL. External API integration is one of the most common requirements in APEX applications. In this article I will explain all supported methods for calling external REST APIs in Oracle APEX: 1.  Calling REST APIs Using Web Source Modules 2.  Calling REST APIs  from PL/SQL Using APEX_WEB_SERVICE 3. Use Rest Data Sources in Our Application But first of all let me answer this question ❓ Where Can You Use Your Newly Created Web Source Module in Oracle APEX ❓ The short answer: Almost everywhere in APEX💖 As soon as you see the Source → Type property on a component and one of these options appears, you can directly plug in your external REST API (Web Source): Interactive...

BUILDING a RESTful Web Services in Oracle APEX

Image
❓What is a Web Service? A web service is a mechanism for sending and receiving data between two different systems over a network, commonly using HTTP. There are two main kinds of web services: RESTful : A lightweight, fast architectural style using HTTP verbs such as GET, POST, PUT, DELETE, typically exchanging JSON  or XML SOAP : An older and more formal standard-based web-service architecture, built on XML and often more complex in setup. *Tip: In the context of Oracle APEX we typically work with RESTful web services. ❓ API or REST Web Service? In everyday conversation, people sometimes use the terms API and REST web service interchangeably, but technically,  every REST Web Service is an API,but  not every API is REST Web Service. For example, a SOAP API or gRPC service uses a different architecture and may not revolve around HTTP or resources. they are not the same : API (Application Programming Interface) : A broad concept referring to a set of rule...

Rendering HTML with/without PL/SQL in Oracle APEX (New Versions 24.X)

Image
  In older versions of Oracle APEX, developers often used the Region Type: PL/SQL Dynamic Content and wrote code with  htp.p   to directly print HTML to the page. However, in newer versions  APEX 23.2, 24.x , this region type has been deprecated . Oracle now recommends cleaner and safer methods to generate and display HTML, typically using templates and modern region types. 👉Render HTML in Oracle APEX: 1 .  Dynamic Content  (Recommended) 2.  Using htp.p in PL/SQL Processes ( Legacy ) , we should discuss it 😳 3.  Static Content Region 4.  Reports with HTML Expressions  Let's Go : 1 .  Dynamic Content (Recommended) Dynamic Content  with PL/SQL Function Returning HTML  This is the official replacement for the old Dynamic PL/SQL Content. After this section in section 2 ( Using htp.p in PL/SQL Processes ), I will discuss it. Example: declare l_html clob; begin l_html := '<h2 style="color:blue;">Hello Ora...