apex data services€¦ · / 64 @mathiasmag oradbdev.mathiasmagnusson.com evil ape or one could use...
Post on 02-May-2020
6 Views
Preview:
TRANSCRIPT
APEX Data ServicesMathias Magnusson
Evil Ape
1 / 64
oradbdev.mathiasmagnusson.com@mathiasmag Evil Ape/ 642
MeMathias Magnusson
Owner/Consultant at Evil Ape
Founder & Leader of SWEOUG
oradbdev.mathiasmagnusson.com / @mathiasmag
Oracle ACE
3 Membership Tiers Oracle ACE Director Oracle ACE Oracle ACE Associate
bit.ly/OracleACEProgram
500+ Technical Experts Helping Peers Globally
Connect:
Nominate yourself or someone you know: acenomination.oracle.com
@oracleaceFacebook.com/oracleaces
oracle-ace_ww@oracle.com
3
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
What is REST?
A standard web service API allowing HTTP-calls that:
Give every “thing” an ID Link things together Use standard methods Resources with multiple representations Communicate statelessly
6
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
Let’s look at
• Remote Database
• REST Enabled SQL
• WEB Source
• Reading and writing
7
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
Remote Database
• Is APEX-talk for REST Enabled SQL (ORDS)
• REST-enable in one database
• Access from another (where APEX runs)
8
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
The setup
ADW - Defining REST services
ATP - Using REST services
9
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
Let’s start
Set up in ADW
1.Schema to use rest enabled SQL
2.Tables with auto rest enabled
10
oradbdev.mathiasmagnusson.com@mathiasmag Evil Ape/ 6412 @mathiasmag Evil Apeoradbdev.mathiasmagnusson.com
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
Time to switch DB
Accessing from ATP
Getting data from Remote Database Set up Rest Enabled SQL Set up autorest on a table
22
oradbdev.mathiasmagnusson.com@mathiasmag Evil Ape/ 6425
Note: Endpoint ends with “ords/restdemo” I.e only referring the alias of the schema
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
Next up - Web Service
• With SQL over REST covered
• Lets look at using the autorest table
30
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
Created - Let’s use it
• Now that we got a brand new web service
• We’ll use it in an interactive report
41
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
But… How about updates
Reading is nice
But for a real solution we want to update
What would be GREAT would be to just edit an IG, click save and have it use proper REST
Well, one can always dream. Right?
45
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
OROne could use 19.2
The dream factory affectionately known as the Oracle APEX Development team makes dreams come true.
Nothing more needed than IR to make a full featured IG based on rest for select, insert, update, delete.
It is just AWSOME!
46
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
SEP
Let it be someone else’s problem.
Use a REST-service created by someone else.
48
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
What is the data
• Game with clans
• Clans has members
• Members collect cards
49
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
Make a copy
• First API was “clan”
• Second is “player”
• Copy + path prefix + Data Profile
53
oradbdev.mathiasmagnusson.com@mathiasmag Evil Ape/ 6455
Was: clan + 2CCCP
oradbdev.mathiasmagnusson.com@mathiasmag Evil Ape/ 6457
Was: members - auto selected last time
@mathiasmag Evil Apeoradbdev.mathiasmagnusson.com/ 64
Build drill-down
• Nothing new really
• Just build as was always do in APEX
59
oradbdev.mathiasmagnusson.com@mathiasmag Evil Ape/ 6462
Note: No Auth here.
top related