Create RESTful APIs from Oracle database with ORDS
✓Works with OpenClaudeYou are an Oracle database administrator or backend developer. The user wants to create RESTful APIs directly from an Oracle database using Oracle REST Data Services (ORDS).
What to check first
- Verify ORDS is installed:
java -jar ords.jar version - Confirm Oracle database is running and accessible:
sqlplus -v - Check that a database user with appropriate privileges exists (CONNECT, CREATE TABLE, etc.)
Steps
- Install ORDS if needed by downloading from Oracle Technology Network and extracting to a directory (e.g.,
/opt/ords) - Configure ORDS by running
java -jar ords.jar configurein interactive mode, providing database connection details (hostname, port, service name, admin credentials) - Create a database schema for your REST objects:
CREATE USER rest_schema IDENTIFIED BY password123;and grant privileges:GRANT CREATE SESSION, CREATE TABLE, CREATE PROCEDURE TO rest_schema; - Define tables in your schema that will be exposed via REST (e.g.,
CREATE TABLE employees (id NUMBER PRIMARY KEY, name VARCHAR2(100), department VARCHAR2(50));) - Enable the schema for ORDS by running
java -jar ords.jar enable-schema --schema rest_schemafrom the ORDS installation directory - Create a module and resource mapping by defining REST endpoints in ORDS configuration or using PL/SQL procedures with ORDS metadata
- Start the ORDS server:
java -jar ords.jar serve(runs onhttp://localhost:8080by default) - Test your REST API endpoint:
curl -X GET http://localhost:8080/ords/rest_schema/employees/or POST/PUT/DELETE as needed
Code
-- Step 1: Create schema user
CREATE USER rest_schema IDENTIFIED BY SecurePass123;
GRANT CONNECT, RESOURCE, CREATE PROCEDURE TO rest_schema;
-- Step 2: Create sample table
CREATE TABLE rest_schema.employees (
id NUMBER PRIMARY KEY,
name VARCHAR2(100) NOT NULL,
email VARCHAR2(100),
department VARCHAR2(50),
salary NUMBER(10, 2)
);
-- Step 3: Insert sample data
INSERT INTO rest_schema.employees VALUES (1, 'John Doe', 'john@company.com', 'Sales', 75000);
INSERT INTO rest_schema.employees VALUES (2, 'Jane Smith', 'jane@company.com', 'IT', 85000);
COMMIT;
-- Step 4: Create ORDS REST module and resource via PL/SQL
BEGIN
ORDS.ENABLE_OBJECT(
p_object_type => 'TABLE',
p_object_name => 'EMPLOYEES',
p_schema => 'REST_SCHEMA',
p_enable => TRUE,
p_publish => TRUE
);
COMMIT;
END;
/
-- Step 5: Verify ORDS is aware
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Oracle Skills
Other Claude Code skills in the same category — free to download.
Oracle PL/SQL
Write PL/SQL procedures, functions, packages, and triggers
Oracle APEX App
Build low-code web applications with Oracle APEX
Oracle SQL Tuning
Optimize Oracle SQL with execution plans, hints, and indexing strategies
Oracle Cloud Infrastructure
Provision and manage OCI resources with Terraform and CLI
Oracle Fusion Apps
Extend Oracle Fusion with VBCS, OTBI reports, and application composer
Oracle Forms Migration
Migrate Oracle Forms to APEX or modern web applications
Oracle DBA Tasks
Manage Oracle database with backup, recovery, patching, and monitoring
Oracle Analytics Cloud
Build dashboards and data visualizations in Oracle Analytics
Want a Oracle skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.