RESTful Services for your Oracle Autonomous Database

Jeff Smith
Jeff SmithDistinguished Product Manager at Oracle Corp
Copyright © 2019 Oracle and/or its affiliates. All rights reserved. |
RESTful Services
Oracle Autonomous Database
Jeff Smith
Master Product Manager
Jeff.d.smith@oracle.com || @thatjeffsmith
Database Tools, Oracle Corp
1
{
"items":
[
{
"employee_id": 100,
"first_name": "Suppo0rt",
"last_name": "King",
"email": "Suppo0rt",
"phone_number": "515.123.4567",
"hire_date": "2018-08-21T11:09:58Z",
"job_id": "AD_PRES",
"salary": 49243.75,
"commission_pct": null,
"manager_id": null,
"department_id": 90,
"column1": null,
"links": [
{
"rel": "self",
"href": "http://localhost:8080/ords/hr/peeps/100“
}
]
},
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
ATP-Dedicated, Too!
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 4
Introduction and
getting started
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
REST Data Services (ORDS)
• Publish REST APIs for your schemas
• Write your own services SQL & PL/SQL
• REST Enable tables, views, PL/SQL objects
• Secure with privs/roles
• Authenticate with DB users or ORDS OAUTH2 workflow
5
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Stuff in your DB…available via HTTPS!
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
GET https://host/ords/human/peeps/ SELECT *
FROM
EMPLOYEES
HTTP/1.1 200 OK
{ "employee_id": 100,
"first_name": "Kris"
,"last_name": "Rice",
, “email": “krisrice@oracle.com",
{json}
URI SQL & PLSQLMap & BindHTTP Request
HTTP Response Transform to JSON SQL Result Set / Standard OUT
Oracle REST Data Services
Anatomy of an ORDS Request and Response
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Available Development & Management Interfaces
SQLDev
APEX
PL/SQL API
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Day 0: Database User with Web Access out-of-the-box
HTTPS Access – to your data,
objects, and APEX apps
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Getting Started
• ADMIN account is available by default for HTTPS Access
• SQL Developer Web, APEX, and RESTful Services
10
admin
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Use ADMIN for admin, not for development
• Treat it as SYSTEM/SYS
• Do NOT use for application schema
What TO DO
1. CREATE USER JEFF…;
2. REST ENABLE
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Determining your REST Service URLs
https://some-id.adb.co-citry-1.oraclecloudapps.com/ords/tjs/_sdw/?nav=worksheet
https://some-id.adb.co-citry-1.oraclecloudapps.com/ords
• /schema/module/service-pattern/
• /schema/rest-enabled-object/
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 13
REST Service Options –
Automatic or Manual
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Automatic: REST Enabling a TABLE
AUTO REST Advantages
•CRUD APIs, no SQL to
write
•Single ORDS package
call to create
•Maintained by US
•Feature Packed
•Optimized
• GET
• PUT
• POST
• DELETE
• DESC
• DOCS
/ords/hr/employees
/ords/hr/employees/
/ords/hr/employees/:id
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
• Schema level Metadata
• Table Metadata
• Get ( Select )
• Query ( Filtering/Order/ASOF )
• Insert
• Update
• Delete
• Load CSV
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
•All rows /
•One row /:id – PK Value
–No PK, default to ROWID
–Multi-column PK /x,y,z
•Some rows /?q={json}
Querying the TABLE
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
METHOD : PUT /:PK
REQUEST BODY : JSON
RESPONSE: 200 OK
•Location (Header)
•JSON (Body)
Table Columns in the POST body
{“column_name” : column_value }
UPDATE a row
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
RESTful Services: Your SQL & PL/SQL
RESTful Service Advantages
•You’re in charge
•Inputs, outputs, error
handling, response codes,
formatting
•Full access to SQL/PLSQL
•Easily exported, source
controlled
•Transparent
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Not just for SELECTs & Reading Data
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Security and Authentication
• Services are secured with PRIVILEGES
• ROLES are assigned PRIVILEGES and granted to users
• USERS are authenticated DB USER sessions or come in via
our OAUTH2 mechanism
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Defining Privileges
22
Protect a module or URI pattern
The ‘SQL Developer’ role is inherited by
every database authenticated REST request
in ORDS….so if I give the privilege to this
ROLE, my JEFF/P@$$w0rd BASIC Auth
request to /ords/jeff/ will be authorized.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Trying to access a REST API w/no credentials…
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
Same request w/credentials…
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
OAUTH2 – what we recommend vs DB User/BASIC Auth
25
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 26
Live Demo
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
ORDS in Autonomous, what it’s mean?
• Installed and ready to use at startup
• ADMIN user is REST enabled, but don’t use it for apps
• All the ORDS features you know on-prem, avail in OCI
• We handle upgrades and maintenance
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 28
Questions?
1 of 28

Recommended

ORDS - Oracle REST Data Services by
ORDS - Oracle REST Data ServicesORDS - Oracle REST Data Services
ORDS - Oracle REST Data ServicesJustin Michael Raj
2K views40 slides
Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wor... by
Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wor...Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wor...
Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wor...Kolja Manuel Rödel
445 views16 slides
Database Consolidation using Oracle Multitenant by
Database Consolidation using Oracle MultitenantDatabase Consolidation using Oracle Multitenant
Database Consolidation using Oracle MultitenantPini Dibask
1.7K views60 slides
Oracle 12c PDB insights by
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insightsKirill Loifman
2K views18 slides
UKOUG - 25 years of hints and tips by
UKOUG - 25 years of hints and tipsUKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tipsConnor McDonald
289 views171 slides
Can You Do That with APEX? Building Not So Straightforward Pages by
Can You Do That with APEX? Building Not So Straightforward PagesCan You Do That with APEX? Building Not So Straightforward Pages
Can You Do That with APEX? Building Not So Straightforward PagesDimitri Gielis
708 views49 slides

More Related Content

What's hot

Oracle Cloud Infrastructure:2022年8月度サービス・アップデート by
Oracle Cloud Infrastructure:2022年8月度サービス・アップデートOracle Cloud Infrastructure:2022年8月度サービス・アップデート
Oracle Cloud Infrastructure:2022年8月度サービス・アップデートオラクルエンジニア通信
259 views107 slides
Zdlra copy to cloud by
Zdlra copy to cloudZdlra copy to cloud
Zdlra copy to cloudSubramanyaUdupa3
167 views6 slides
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c by
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cClone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cAlfredo Krieg
1.2K views24 slides
Integrating Oracle Data Integrator with Oracle GoldenGate 12c by
Integrating Oracle Data Integrator with Oracle GoldenGate 12cIntegrating Oracle Data Integrator with Oracle GoldenGate 12c
Integrating Oracle Data Integrator with Oracle GoldenGate 12cEdelweiss Kammermann
3.9K views45 slides
Oracle Database 12c : Multitenant by
Oracle Database 12c : MultitenantOracle Database 12c : Multitenant
Oracle Database 12c : MultitenantDigicomp Academy Suisse Romande SA
4.3K views36 slides
AlwaysON Basics by
AlwaysON BasicsAlwaysON Basics
AlwaysON BasicsHarsh Chawla
1.5K views15 slides

What's hot(20)

Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c by Alfredo Krieg
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cClone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Alfredo Krieg1.2K views
Integrating Oracle Data Integrator with Oracle GoldenGate 12c by Edelweiss Kammermann
Integrating Oracle Data Integrator with Oracle GoldenGate 12cIntegrating Oracle Data Integrator with Oracle GoldenGate 12c
Integrating Oracle Data Integrator with Oracle GoldenGate 12c
Migration to Oracle Multitenant by Jitendra Singh
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle Multitenant
Jitendra Singh398 views
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour... by Sandesh Rao
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Sandesh Rao3.4K views
Smart monitoring how does oracle rac manage resource, state ukoug19 by Anil Nair
Smart monitoring how does oracle rac manage resource, state ukoug19Smart monitoring how does oracle rac manage resource, state ukoug19
Smart monitoring how does oracle rac manage resource, state ukoug19
Anil Nair1.7K views
MAA Best Practices for Oracle Database 19c by Markus Michalewicz
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19c
Markus Michalewicz3.7K views
[215]네이버콘텐츠통계서비스소개 김기영 by NAVER D2
[215]네이버콘텐츠통계서비스소개 김기영[215]네이버콘텐츠통계서비스소개 김기영
[215]네이버콘텐츠통계서비스소개 김기영
NAVER D27.1K views
HA, Scalability, DR & MAA in Oracle Database 21c - Overview by Markus Michalewicz
HA, Scalability, DR & MAA in Oracle Database 21c - OverviewHA, Scalability, DR & MAA in Oracle Database 21c - Overview
HA, Scalability, DR & MAA in Oracle Database 21c - Overview
Markus Michalewicz1.2K views
Oracle GoldenGate 21c New Features and Best Practices by Bobby Curtis
Oracle GoldenGate 21c New Features and Best PracticesOracle GoldenGate 21c New Features and Best Practices
Oracle GoldenGate 21c New Features and Best Practices
Bobby Curtis2.1K views
DBA Tasks in Oracle Autonomous Database by SinanPetrusToma
DBA Tasks in Oracle Autonomous DatabaseDBA Tasks in Oracle Autonomous Database
DBA Tasks in Oracle Autonomous Database
SinanPetrusToma119 views
What's new in Oracle 19c & 18c Recovery Manager (RMAN) by Satishbabu Gunukula
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
SSL certificates in the Oracle Database without surprises by Nelson Calero
SSL certificates in the Oracle Database without surprisesSSL certificates in the Oracle Database without surprises
SSL certificates in the Oracle Database without surprises
Nelson Calero8.1K views
Oracle RAC Internals - The Cache Fusion Edition by Markus Michalewicz
Oracle RAC Internals - The Cache Fusion EditionOracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz11.9K views
The Roadmap for SQL Server 2019 by Amit Banerjee
The Roadmap for SQL Server 2019The Roadmap for SQL Server 2019
The Roadmap for SQL Server 2019
Amit Banerjee3.6K views

Similar to RESTful Services for your Oracle Autonomous Database

Oracle Office Hours - Exposing REST services with APEX and ORDS by
Oracle Office Hours - Exposing REST services with APEX and ORDSOracle Office Hours - Exposing REST services with APEX and ORDS
Oracle Office Hours - Exposing REST services with APEX and ORDSDoug Gault
4.3K views61 slides
10thMeetup-20190420-REST API Design Principles 되새기기 by
10thMeetup-20190420-REST API Design Principles 되새기기10thMeetup-20190420-REST API Design Principles 되새기기
10thMeetup-20190420-REST API Design Principles 되새기기DongHee Lee
565 views53 slides
API Design Principles Essential  by
API Design Principles Essential API Design Principles Essential 
API Design Principles Essential Oracle Korea
245 views54 slides
REST Enabling your Oracle Database (2018 Update) by
REST Enabling your Oracle Database (2018 Update)REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)Jeff Smith
3.5K views55 slides
Oracle Database Management REST API by
Oracle Database Management REST APIOracle Database Management REST API
Oracle Database Management REST APIJeff Smith
4.7K views18 slides
Database Basics with PHP -- Connect JS Conference October 17th, 2015 by
Database Basics with PHP -- Connect JS Conference October 17th, 2015Database Basics with PHP -- Connect JS Conference October 17th, 2015
Database Basics with PHP -- Connect JS Conference October 17th, 2015Dave Stokes
494 views56 slides

Similar to RESTful Services for your Oracle Autonomous Database(20)

Oracle Office Hours - Exposing REST services with APEX and ORDS by Doug Gault
Oracle Office Hours - Exposing REST services with APEX and ORDSOracle Office Hours - Exposing REST services with APEX and ORDS
Oracle Office Hours - Exposing REST services with APEX and ORDS
Doug Gault4.3K views
10thMeetup-20190420-REST API Design Principles 되새기기 by DongHee Lee
10thMeetup-20190420-REST API Design Principles 되새기기10thMeetup-20190420-REST API Design Principles 되새기기
10thMeetup-20190420-REST API Design Principles 되새기기
DongHee Lee565 views
API Design Principles Essential  by Oracle Korea
API Design Principles Essential API Design Principles Essential 
API Design Principles Essential 
Oracle Korea245 views
REST Enabling your Oracle Database (2018 Update) by Jeff Smith
REST Enabling your Oracle Database (2018 Update)REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)
Jeff Smith3.5K views
Oracle Database Management REST API by Jeff Smith
Oracle Database Management REST APIOracle Database Management REST API
Oracle Database Management REST API
Jeff Smith4.7K views
Database Basics with PHP -- Connect JS Conference October 17th, 2015 by Dave Stokes
Database Basics with PHP -- Connect JS Conference October 17th, 2015Database Basics with PHP -- Connect JS Conference October 17th, 2015
Database Basics with PHP -- Connect JS Conference October 17th, 2015
Dave Stokes494 views
Oracle APEX勉強会 - 認証と認可の実装を学ぶ by Nakakoshi Yuji
Oracle APEX勉強会 - 認証と認可の実装を学ぶOracle APEX勉強会 - 認証と認可の実装を学ぶ
Oracle APEX勉強会 - 認証と認可の実装を学ぶ
Nakakoshi Yuji1.5K views
Data meets AI - ATP Roadshow India by Sandesh Rao
Data meets AI - ATP Roadshow IndiaData meets AI - ATP Roadshow India
Data meets AI - ATP Roadshow India
Sandesh Rao220 views
Oracle APEX Introduction (release 18.1) by Michael Hichwa
Oracle APEX Introduction (release 18.1)Oracle APEX Introduction (release 18.1)
Oracle APEX Introduction (release 18.1)
Michael Hichwa1.4K views
Southeast Linuxfest -- MySQL User Admin Tips & Tricks by Dave Stokes
Southeast Linuxfest -- MySQL User Admin Tips & TricksSoutheast Linuxfest -- MySQL User Admin Tips & Tricks
Southeast Linuxfest -- MySQL User Admin Tips & Tricks
Dave Stokes976 views
Oracle database 12c_and_DevOps by Maria Colgan
Oracle database 12c_and_DevOpsOracle database 12c_and_DevOps
Oracle database 12c_and_DevOps
Maria Colgan9.4K views
Apex atp customer_presentation_wwc march 2019 by Oracle Developers
Apex atp customer_presentation_wwc march 2019Apex atp customer_presentation_wwc march 2019
Apex atp customer_presentation_wwc march 2019
Oracle Developers314 views
APEX Boston Meetup - October 1st, 2019 by msewtz
APEX Boston Meetup - October 1st, 2019APEX Boston Meetup - October 1st, 2019
APEX Boston Meetup - October 1st, 2019
msewtz164 views
Con9573 managing the oim platform with oracle enterprise manager by OracleIDM
Con9573 managing the oim platform with oracle enterprise manager Con9573 managing the oim platform with oracle enterprise manager
Con9573 managing the oim platform with oracle enterprise manager
OracleIDM1.8K views
Oracle GoldenGate 18c - REST API Examples by Bobby Curtis
Oracle GoldenGate 18c - REST API ExamplesOracle GoldenGate 18c - REST API Examples
Oracle GoldenGate 18c - REST API Examples
Bobby Curtis4.1K views
Confoo 202 - MySQL Group Replication and ReplicaSet by Dave Stokes
Confoo 202 - MySQL Group Replication and ReplicaSetConfoo 202 - MySQL Group Replication and ReplicaSet
Confoo 202 - MySQL Group Replication and ReplicaSet
Dave Stokes94 views
Nonblocking Database Access in Helidon SE by Dmitry Kornilov
Nonblocking Database Access in Helidon SENonblocking Database Access in Helidon SE
Nonblocking Database Access in Helidon SE
Dmitry Kornilov866 views
Oracle REST Data Services: Options for your Web Services by Jeff Smith
Oracle REST Data Services: Options for your Web ServicesOracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web Services
Jeff Smith15.8K views
Node.js and Oracle Database: New Development Techniques by Christopher Jones
Node.js and Oracle Database: New Development TechniquesNode.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development Techniques
Christopher Jones5.5K views

More from Jeff Smith

Oracle REST Data Services: POUG Edition by
Oracle REST Data Services: POUG EditionOracle REST Data Services: POUG Edition
Oracle REST Data Services: POUG EditionJeff Smith
549 views66 slides
Oracle SQL Developer Tips and Tricks: Data Edition by
Oracle SQL Developer Tips and Tricks: Data EditionOracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionJeff Smith
4.3K views42 slides
Change Management for Oracle Database with SQLcl by
Change Management for Oracle Database with SQLcl Change Management for Oracle Database with SQLcl
Change Management for Oracle Database with SQLcl Jeff Smith
5.1K views29 slides
Oracle SQLcl: Formatting your Query Results by
Oracle SQLcl: Formatting your Query ResultsOracle SQLcl: Formatting your Query Results
Oracle SQLcl: Formatting your Query ResultsJeff Smith
5.1K views18 slides
Debugging PL/SQL from your APEX Applications with Oracle SQL Developer by
Debugging PL/SQL from your APEX Applications with Oracle SQL DeveloperDebugging PL/SQL from your APEX Applications with Oracle SQL Developer
Debugging PL/SQL from your APEX Applications with Oracle SQL DeveloperJeff Smith
5.6K views28 slides
Oracle SQL Developer Data Modeler - for SQL Server by
Oracle SQL Developer Data Modeler - for SQL ServerOracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL ServerJeff Smith
2.8K views23 slides

More from Jeff Smith(20)

Oracle REST Data Services: POUG Edition by Jeff Smith
Oracle REST Data Services: POUG EditionOracle REST Data Services: POUG Edition
Oracle REST Data Services: POUG Edition
Jeff Smith549 views
Oracle SQL Developer Tips and Tricks: Data Edition by Jeff Smith
Oracle SQL Developer Tips and Tricks: Data EditionOracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data Edition
Jeff Smith4.3K views
Change Management for Oracle Database with SQLcl by Jeff Smith
Change Management for Oracle Database with SQLcl Change Management for Oracle Database with SQLcl
Change Management for Oracle Database with SQLcl
Jeff Smith5.1K views
Oracle SQLcl: Formatting your Query Results by Jeff Smith
Oracle SQLcl: Formatting your Query ResultsOracle SQLcl: Formatting your Query Results
Oracle SQLcl: Formatting your Query Results
Jeff Smith5.1K views
Debugging PL/SQL from your APEX Applications with Oracle SQL Developer by Jeff Smith
Debugging PL/SQL from your APEX Applications with Oracle SQL DeveloperDebugging PL/SQL from your APEX Applications with Oracle SQL Developer
Debugging PL/SQL from your APEX Applications with Oracle SQL Developer
Jeff Smith5.6K views
Oracle SQL Developer Data Modeler - for SQL Server by Jeff Smith
Oracle SQL Developer Data Modeler - for SQL ServerOracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL Server
Jeff Smith2.8K views
What's New in Oracle SQL Developer for 2018 by Jeff Smith
What's New in Oracle SQL Developer for 2018What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018
Jeff Smith505 views
Oracle SQL Developer: You're Doing it Wrong! by Jeff Smith
Oracle SQL Developer: You're Doing it Wrong!Oracle SQL Developer: You're Doing it Wrong!
Oracle SQL Developer: You're Doing it Wrong!
Jeff Smith1.7K views
Social Media - Why a Database Person Should Care by Jeff Smith
Social Media  - Why a Database Person Should CareSocial Media  - Why a Database Person Should Care
Social Media - Why a Database Person Should Care
Jeff Smith1K views
Oracle SQL Developer Reports by Jeff Smith
Oracle SQL Developer ReportsOracle SQL Developer Reports
Oracle SQL Developer Reports
Jeff Smith2.9K views
Oracle SQL Developer: 3 Features You're Not Using But Should Be by Jeff Smith
Oracle SQL Developer: 3 Features You're Not Using But Should BeOracle SQL Developer: 3 Features You're Not Using But Should Be
Oracle SQL Developer: 3 Features You're Not Using But Should Be
Jeff Smith3.1K views
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks by Jeff Smith
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & TricksPennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Jeff Smith1K views
PL/SQL All the Things in Oracle SQL Developer by Jeff Smith
PL/SQL All the Things in Oracle SQL DeveloperPL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL Developer
Jeff Smith1.9K views
Debugging PL/SQL with Oracle SQL Developer by Jeff Smith
Debugging PL/SQL with Oracle SQL DeveloperDebugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL Developer
Jeff Smith20.1K views
REST Enabling Your Oracle Database by Jeff Smith
REST Enabling Your Oracle DatabaseREST Enabling Your Oracle Database
REST Enabling Your Oracle Database
Jeff Smith45.3K views
All of the Performance Tuning Features in Oracle SQL Developer by Jeff Smith
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith17.9K views
If You Oracle Then You Should Twitter Too by Jeff Smith
If You Oracle Then You Should Twitter TooIf You Oracle Then You Should Twitter Too
If You Oracle Then You Should Twitter Too
Jeff Smith3.2K views
SQLcl overview - A new Command Line Interface for Oracle Database by Jeff Smith
SQLcl overview - A new Command Line Interface for Oracle DatabaseSQLcl overview - A new Command Line Interface for Oracle Database
SQLcl overview - A new Command Line Interface for Oracle Database
Jeff Smith47.3K views
Oracle SQL Developer for SQL Server? by Jeff Smith
Oracle SQL Developer for SQL Server?Oracle SQL Developer for SQL Server?
Oracle SQL Developer for SQL Server?
Jeff Smith2.6K views
My Favorite Oracle SQL Developer Data Modeler Features by Jeff Smith
My Favorite Oracle SQL Developer Data Modeler FeaturesMy Favorite Oracle SQL Developer Data Modeler Features
My Favorite Oracle SQL Developer Data Modeler Features
Jeff Smith1.4K views

Recently uploaded

Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueShapeBlue
96 views20 slides
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...ShapeBlue
83 views15 slides
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsShapeBlue
111 views13 slides
"Surviving highload with Node.js", Andrii Shumada by
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada Fwdays
40 views29 slides
Five Things You SHOULD Know About Postman by
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
40 views43 slides
DRBD Deep Dive - Philipp Reisner - LINBIT by
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBITShapeBlue
62 views21 slides

Recently uploaded(20)

Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue96 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue83 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue111 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays40 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman40 views
DRBD Deep Dive - Philipp Reisner - LINBIT by ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue62 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc77 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi141 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue82 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson133 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue74 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray1080 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue63 views
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... by ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue77 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu141 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue88 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院

RESTful Services for your Oracle Autonomous Database

  • 1. Copyright © 2019 Oracle and/or its affiliates. All rights reserved. | RESTful Services Oracle Autonomous Database Jeff Smith Master Product Manager Jeff.d.smith@oracle.com || @thatjeffsmith Database Tools, Oracle Corp 1 { "items": [ { "employee_id": 100, "first_name": "Suppo0rt", "last_name": "King", "email": "Suppo0rt", "phone_number": "515.123.4567", "hire_date": "2018-08-21T11:09:58Z", "job_id": "AD_PRES", "salary": 49243.75, "commission_pct": null, "manager_id": null, "department_id": 90, "column1": null, "links": [ { "rel": "self", "href": "http://localhost:8080/ords/hr/peeps/100“ } ] },
  • 2. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
  • 3. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | ATP-Dedicated, Too!
  • 4. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 4 Introduction and getting started
  • 5. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | REST Data Services (ORDS) • Publish REST APIs for your schemas • Write your own services SQL & PL/SQL • REST Enable tables, views, PL/SQL objects • Secure with privs/roles • Authenticate with DB users or ORDS OAUTH2 workflow 5
  • 6. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Stuff in your DB…available via HTTPS!
  • 7. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | GET https://host/ords/human/peeps/ SELECT * FROM EMPLOYEES HTTP/1.1 200 OK { "employee_id": 100, "first_name": "Kris" ,"last_name": "Rice", , “email": “krisrice@oracle.com", {json} URI SQL & PLSQLMap & BindHTTP Request HTTP Response Transform to JSON SQL Result Set / Standard OUT Oracle REST Data Services Anatomy of an ORDS Request and Response
  • 8. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Available Development & Management Interfaces SQLDev APEX PL/SQL API
  • 9. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Day 0: Database User with Web Access out-of-the-box HTTPS Access – to your data, objects, and APEX apps
  • 10. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Getting Started • ADMIN account is available by default for HTTPS Access • SQL Developer Web, APEX, and RESTful Services 10 admin
  • 11. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Use ADMIN for admin, not for development • Treat it as SYSTEM/SYS • Do NOT use for application schema What TO DO 1. CREATE USER JEFF…; 2. REST ENABLE
  • 12. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Determining your REST Service URLs https://some-id.adb.co-citry-1.oraclecloudapps.com/ords/tjs/_sdw/?nav=worksheet https://some-id.adb.co-citry-1.oraclecloudapps.com/ords • /schema/module/service-pattern/ • /schema/rest-enabled-object/
  • 13. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 13 REST Service Options – Automatic or Manual
  • 14. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Automatic: REST Enabling a TABLE AUTO REST Advantages •CRUD APIs, no SQL to write •Single ORDS package call to create •Maintained by US •Feature Packed •Optimized • GET • PUT • POST • DELETE • DESC • DOCS /ords/hr/employees /ords/hr/employees/ /ords/hr/employees/:id
  • 15. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |
  • 16. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Schema level Metadata • Table Metadata • Get ( Select ) • Query ( Filtering/Order/ASOF ) • Insert • Update • Delete • Load CSV
  • 17. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | •All rows / •One row /:id – PK Value –No PK, default to ROWID –Multi-column PK /x,y,z •Some rows /?q={json} Querying the TABLE
  • 18. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | METHOD : PUT /:PK REQUEST BODY : JSON RESPONSE: 200 OK •Location (Header) •JSON (Body) Table Columns in the POST body {“column_name” : column_value } UPDATE a row
  • 19. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | RESTful Services: Your SQL & PL/SQL RESTful Service Advantages •You’re in charge •Inputs, outputs, error handling, response codes, formatting •Full access to SQL/PLSQL •Easily exported, source controlled •Transparent
  • 20. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Not just for SELECTs & Reading Data
  • 21. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Security and Authentication • Services are secured with PRIVILEGES • ROLES are assigned PRIVILEGES and granted to users • USERS are authenticated DB USER sessions or come in via our OAUTH2 mechanism
  • 22. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Defining Privileges 22 Protect a module or URI pattern The ‘SQL Developer’ role is inherited by every database authenticated REST request in ORDS….so if I give the privilege to this ROLE, my JEFF/P@$$w0rd BASIC Auth request to /ords/jeff/ will be authorized.
  • 23. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Trying to access a REST API w/no credentials…
  • 24. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Same request w/credentials…
  • 25. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | OAUTH2 – what we recommend vs DB User/BASIC Auth 25
  • 26. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 26 Live Demo
  • 27. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | ORDS in Autonomous, what it’s mean? • Installed and ready to use at startup • ADMIN user is REST enabled, but don’t use it for apps • All the ORDS features you know on-prem, avail in OCI • We handle upgrades and maintenance
  • 28. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 28 Questions?