#2 Enable Oracle REST Data Service (ORDS)

Get ORDS version and make sure  ORDS is Enabled:
Run the following command to idnetify ORDS version if installed :

SELECT 'ORDS is ' || Version "Version of ORDS"
FROM   Ords_Metadata.Ords_Schema_Version;       

Creating URL Mapping to Database Connection
  1. Create USER: CREATE USER TREST IDENTIFIED BY trest;
  2. Grant DBA:   GRANT DBA TO TREST;
  3. Create Table EMP (Id NUMBER, Name VARCHAR2(15)); 
  4. Map URL: C:\Program Files\Java\jdk1.8.0_152\bin>java -jar d:\oracle\ords\ords.war map-url --type base-path /api api
  5. Enable REST for TREST Schema
ENABLING REST For user TREST:

BEGIN
  ORDS.ENABLE_SCHEMA(
    p_enabled             => TRUE,
    p_schema              => 'TREST',
    p_url_mapping_type    => 'BASE_PATH',
    p_url_mapping_pattern => 'api',
    p_auto_rest_auth      => FALSE
  );
    
COMMIT;
END;       

NOW your REST services is ready and  the URL is : http://localhost:8080/ords/trest/

No comments:

Post a Comment

Remove unused Layouts in Oracle Apex

 Tables used : APEX_XXXXXXX.WWV_FLOW_REPORT_LAYOUTS APEX_XXXXXXX.WWV_FLOW_SHARED_QUERIES use the following query to delete unused Layouts. ...