🔐 Accessing External APIs with PL/SQL: ACL Configuration, HTTP Requests, and JSON Handling


If you need to make HTTP calls to consume a REST API directly from Oracle using PL/SQL, this guide is for you. Below are the complete steps—from configuring access permissions to parsing the JSON response.
🔸 Part 1: Configuring ACL to Allow External Access
Before anything else, you need to grant your Oracle user permission to access external URLs using Access Control Lists (ACLs).
✅ Create the ACL
✅ Assign the ACL to the external host
🔁 Alternative for Oracle 12c+ using append_host_ace
🌐 Part 2: Making HTTP Requests with UTL_HTTP
Once access is granted, you can perform GET
and POST
requests easily.
📥 Example: GET Request
📨 Example: POST Request with JSON
🔍 Part 3: Parsing JSON Responses in PL/SQL
After receiving the API response, you can extract data using native JSON functions like JSON_VALUE
.
🧪 Example: Extracting a Field with JSON_VALUE
💬 Now you have a complete guide to integrating Oracle with external REST APIs using only PL/SQL.
✅ Final Thoughts
Connecting Oracle databases with external APIs using PL/SQL may seem challenging at first, but with the right configuration and techniques, it's a powerful way to expand the capabilities of your systems. By setting up ACLs correctly, using UTL_HTTP
to handle requests, and parsing responses with native JSON functions, you can automate integrations, consume external services, and modernize legacy routines with clean, efficient PL/SQL code.
This approach opens the door to richer data ecosystems, seamless communication between platforms, and smarter, API-driven architectures—all directly from within the database layer.
#PLSQL #OracleDatabase #APIAccess #UTL_HTTP #JSONParsing #OracleDev #BackendDevelopment #RESTAPI #DatabaseIntegration #SQLTips #TechTutorial #Automation #DataEngineering
Subscribe to my newsletter
Read articles from Johnny Hideki Kinoshita de Faria directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Johnny Hideki Kinoshita de Faria
Johnny Hideki Kinoshita de Faria
Technology professional with over 15 years of experience delivering innovative, scalable, and secure solutions — especially within the financial sector. I bring deep expertise in Oracle PL/SQL (9+ years), designing robust data architectures that ensure performance and reliability. On the back-end side, I’ve spent 6 years building enterprise-grade applications using .NET, applying best practices like TDD and clean code to deliver high-quality solutions. In addition to my backend strengths, I have 6 years of experience with PHP and JavaScript, allowing me to develop full-stack web applications that combine strong performance with intuitive user interfaces. I've led and contributed to projects involving digital account management, integration of VISA credit and debit transactions, modernization of payment systems, financial analysis tools, and fraud prevention strategies. Academically, I hold a postgraduate certificate in .NET Architecture and an MBA in IT Project Management, blending technical skill with business acumen. Over the past 6 years, I’ve also taken on leadership roles — managing teams, mentoring developers, and driving strategic initiatives. I'm fluent in agile methodologies and make consistent use of tools like Azure Boards to coordinate tasks and align team performance with delivery goals.