SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate 18c
RESTful API & Scripts Examples
Bobby Curtis, MBA
Director of Product Management
Oracle GoldenGate
October, 2018
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, timing, and pricing of any
features or functionality described for Oracle’s products may change and remains at the
sole discretion of Oracle Corporation.
Confidential – Oracle Internal/Restricted/Highly Restricted
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate
Real time Performance
Extensible & Flexible
Proven & Reliable
Oracle GoldenGate provides low-impact capture, routing,
transformation, and delivery of database transactions
across homogeneous and heterogeneous environments in
real-time with no distance limitations.
Most
Databases
Data
Events
Transaction Streams
Cloud
DBs
Big
Data
Supports Databases, Big Data and NoSQL:
* The most popular enterprise integration tool in history
Confidential – Oracle Internal/Restricted/Highly Restricted
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate 18c Microservices Architecture
Network
Capture Trail
Files
DS
AS
SM
PM AS
RS
PM
Delivery
SM
>HTML>>SQL >>CLI >>API
Customizable Interactive Experience
Proxy/Reverse Proxy Proxy/Reverse Proxy
Trail
Files
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
RESTful API Examples
Confidential – Oracle Internal/Restricted/Highly Restricted 5
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
General Information
• Oracle GoldenGate 18c for Microservices uses RESTful APIs
• All administration functions can be performed with RESTful APIs
• Core Documentation
– https://docs.oracle.com/en/middleware/goldengate/core/18.1/index.html
• RESTful API Documentation (12.3.0.1.x)
– https://docs.oracle.com/goldengate/c1230/gg-winux/OGGRA/toc.htm
Confidential – Oracle Internal/Restricted/Highly Restricted 6
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
RESTful API Examples
Database
7
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Add Trandata
curl -X POST 
http://{hostname}:{port}/services/v2/connections/{Domain}.{Alias}/trandata/table 
--user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache' 
-d '{
"operation":"add",
"tableName":"pdb1.inittest.optype_test"
}'
Confidential – Oracle Internal/Restricted/Highly Restricted 8
Single Table
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Add SchemaTrandata
curl -X POST 
http://{hostname}:{port}/services/v2/connections/{Domain}.{Alias}/trandata/schema 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache' 
-d '{
"operation":"add",
"schemaName":"oggtst1.soe"
}'
Confidential – Oracle Internal/Restricted/Highly Restricted 9
Whole Schema
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
List Connections
curl -X GET 
http://{hostname}:{port}/services/v2/connections 
- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 10
See who is connected
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
RESTful API Examples
Administration Service
11
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Create Credential
curl -X POST 
http://{hostname}:{port}/services/v2/credentials/{Domain}/{Alias} 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache' 
-d '{
"userid":"c##ggate@cdb",
"password":"ggate"
}'
Confidential – Oracle Internal/Restricted/Highly Restricted 12
Add a Credential to Administrative Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Create Credential
curl -X POST 
http://{hostname}:{port}/services/v2/credentials /{Domain}/{Alias} 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache' 
-d '{
"userid":"c##ggate@cdb",
"password":"ggate"
}'
Confidential – Oracle Internal/Restricted/Highly Restricted 13
Add a Credential to Administrative Service
• Same command structure works for Source or Target Administrative Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Create Credential – Protocol User
curl -X POST 
http://{hostname}:{port}/services/v2/credentials /{Domain}/{Alias} 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache' 
-d '{
"userid":"oggadmin",
"password":"Welcome1"
}'
Confidential – Oracle Internal/Restricted/Highly Restricted 14
Add a Protocol User to Administrative Service – Non-Secure
• This user is the ServiceManager user for Target system.
• Created on the source Administrative Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Create Extract
curl -X POST 
http://{hostname}:{port}/services/
v2/extracts/{ExtractName} 
-- user
‘{ServiceManagerUser}:{password}
' 
-H 'cache-control: no-cache' 
-d '{
"description":"Integrated
Extract",
"config":[
"Extract IEPKTST",
"ExtTrail bc",
"UseridAlias SGGATE",
"sourcecatalog pdb1;",
"Table inittest.pktst_table,
getbeforecols(on update all, on
delete all);"
],
"source":{
"tranlogs":"integrated"
},
"credentials":{
"alias":"SGGATE"
},
"registration":{
"containers": [ "pdb1" ],
"optimized":false
},
"begin":"now",
"targets":[
{
"name":"bc",
"sizeMB":250
}
],
"status":"stopped"
}'
Confidential – Oracle Internal/Restricted/Highly Restricted 15
Add an Extract to Administrative Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Delete Extract
curl -X DELETE 
http://{hostname}:{port}/services/v2/extracts/{ExtractName} 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 16
Remove an Extract to Administrative Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
List Extract
curl -X GET 
http://{hostname}:{port}/services/v2/extracts 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 17
List all Extracts
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Create Replicat
curl -X POST 
http://{hostname}:{port}/service
s/v2/replicats/{ReplicatName} 
-- user
‘{ServiceManagerUser}:{passwor
d}' 
-H 'cache-control: no-cache' 
-d '{
"config":[
"Replicat IRPKTST",
"UseridAlias TGGATE",
"Map
pdb1.inittest.pktst_table, Target
inittest.pktst_table,
colmap(usedefaults,
optype=@getenv('''ggheader''','
''optype'''),
beforerid=@before(rid));"
],
"source":{
"name":"bd"
},
"credentials":{
"alias":"TGGATE"
},
"checkpoint":{
"table":"ggate.checkpoint"
},
"mode":{
"type":"integrated",
"parallel": false
},
"registration": "standard",
"begin":"now",
"status":"running"
}'
Confidential – Oracle Internal/Restricted/Highly Restricted 18
Add an Replicat to Administrative Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Delete Delete
curl -X DELETE 
http://{hostname}:{port}/services/v2/replicats/{ReplicatName} 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 19
Remove an Replicat to Administrative Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
List Replicat
curl -X GET 
http://{hostname}:{port}/services/v2/replicats 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 20
List all Replicats
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
RESTful API Examples
Distribution Service
21
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Create Distribution Path
curl -X POST 
http://{hostname}:{port}/services/v2/sources/{PathName} 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache' 
-d '{
"name": "PKTSTPATH",
"status": "stopped",
"source": {
"uri": "trail://localhost:16002/services/v2/sources?trail=bc"
},
"target": {
"uri": "ws://OracleGoldenGate+WSTARGET@localhost:17003/services/v2/targets?trail=bd"
}
}'
Confidential – Oracle Internal/Restricted/Highly Restricted 22
Create a Distribution Path in Distribution Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Delete Distribution Path
curl -X DELETE 
http://{hostname}:{port}/services/v2/sources/{PathName} 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache' 
-d '{
"distpath":"TSTPATH"
}'
Confidential – Oracle Internal/Restricted/Highly Restricted 23
Delete a Distribution Path in Distribution Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
List Distribution Path(s)
curl -X GET 
http://{hostname}:{port}/services/v2/sources 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 24
List all Distribution Paths in Distribution Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
List Extract + Trail File
curl -X GET 
http://{hostname}:{port}/services/v2/exttrails 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 25
List Extract and Trail File in Distribution Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
RESTful API Examples
Receiver Service
26
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
List Distribution Paths
curl -X GET 
http://{hostname}:{port}/services/v2/targets 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 27
List Distribution Paths from Receiver Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Retrieve Distribution Paths Statistics
curl -X GET 
http://{hostname}:{port}/services/v2/targets/{SystemGenPathName}/stats 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 28
Retrieve Distribution Paths from Receiver Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
RESTful API Examples
Performance Metric Service
29
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Retrieve Extract Statistics
curl -X GET 
http://{hostname}:{port}/services/v2/mpoints/{ExtractName}/statisticsExtract 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 30
Retrieve Extract from Performance Metric Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Retrieve Table Statistics
curl -X GET 
http://{hostname}:{port}/services/v2/mpoints/{ExtractName}/statisticsTableExtract 
-- user ‘{ServiceManagerUser}:{password}' 
-H 'cache-control: no-cache'
Confidential – Oracle Internal/Restricted/Highly Restricted 31
Retrieve Table Statistics per Extract from Performance Metric Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Shell Script Examples
RESTful API within Shell Scripts
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Add Credential
#!/bin/bash
#variables
vPass=$1
vASHost=localhost
vASPort=$2
vGGUser=$3
vGGPass=$4
vGGAlias=SGGATE
function _createAlias {
curl -X POST 
http://$vASHost:$vASPort/servic
es/v2/credentials/{Domain}/$vG
GAlias 
--user "oggadmin:"$vPass 
-H 'Cache-Control: no-cache'

-d '{
"userid":"'$vGGUser'",
"password":"'$vGGPass'"
}' | python -mjson.tool
}
function _main {
_createAlias
}
_main
Confidential – Oracle Internal/Restricted/Highly Restricted 33
Add Credential via RESTful API using Shell Scripts
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Add Credential
#!/bin/bash
#variables
vPass=$1
vASHost=localhost
vASPort=$2
vProtoUser=$3
vProtoPass=$4
vProtoAlias=WSTARGET
function _createAlias {
curl -X POST 
http://$vASHost:$vASPort/servic
es/v2/credentials/{Domain}/$vPr
otoAlias 
--user "oggadmin:"$vPass 
-H 'Cache-Control: no-cache'

-d '{
"userid":"'$vProtoUser'",
"password":"'$vProtoPass'"
}'| python -mjson.tool
}
function _main {
_createAlias
}
_main
Confidential – Oracle Internal/Restricted/Highly Restricted 34
Add Protocol Credential via RESTful API using Shell Scripts – Non-Secure
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Add Extract
#!/bin/bash
….
function _addExtract {
curl -X POST 
http://$vASHost:$vASPort/services/v2/extracts/$vExt
Name 
--user "oggadmin:"$vPass 
-H 'Cache-Control: no-cache' 
-d '{
"description":"Integrated Extract",
"config":[
"Extract '$vExtName'",
"ExtTrail aa",
"UseridAlias '$vGGAlias'",
"sourcecatalog oggoow181;",
"table soe.addresses;",
"table soe.customers;",
"table soe.orders;",
"table soe.order_items;",
"table soe.card_details;",
"table soe.logon;",
"table soe.product_information;",
"table soe.inventories;",
"table soe.product_descriptions;",
"table soe.warehouses;",
"table soe.orderentry_metadata;"
],
"source":{
"tranlogs":"integrated"
},
"credentials":{
"alias":"'$vGGAlias'"
},
"registration":{
"containers": [ "oggoow181" ],
"optimized":false
},
"begin":"now",
"targets":[
{
"name":"aa",
"sizeMB":250
}
],
"status":"stopped"
}' | python -mjson.tool
}
Confidential – Oracle Internal/Restricted/Highly Restricted 35
Add Extract via RESTful API using Shell Scripts
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Add Replicat
#!/bin/bash
….
function _addReplicat {
curl -X POST 
http://$vASHost:$vASPort/services/v2/replicats/$vRe
pName 
--user "oggadmin:"$vPass 
-H 'Cache-Control: no-cache' 
-d '{
"description":"Integrated Replicat",
"config":[
"Replicat '$vRepName'",
"UseridAlias '$vGGAlias'",
"map oggoow181.soe.addresses,target
soe.addresses, keycols(address_id);",
"map oggoow181.soe.customers, target
soe.customers, keycols(customer_id);",
"map oggoow181.soe.orders, target soe.orders,
keycols(order_id);",
"map oggoow181.soe.order_items, target
soe.order_items, keycols(order_id, line_item_id);",
"map oggoow181.soe.card_details, target
soe.card_details, keycols(card_id);",
"map oggoow181.soe.logon, target soe.logon;",
"map oggoow181.soe.product_information,
target soe.product_information;",
"map oggoow181.soe.inventories, target
soe.inventories, keycols(product_id, warehouse_id);",
"map oggoow181.soe.product_descriptions,
target soe.product_descriptions;",
"map oggoow181.soe.warehouses, target
soe.warehouses;",
"map oggoow181.soe.orderentry_metadata,
target soe.orderentry_metadata;"
],
"source":{
"name":"ab"
},
"mode":{
"type":"integrated"
},
"credentials":{
"alias":"'$vGGAlias'"
},
"checkpoint":{
"table":"ggate.checkpoints"
},
"status":"stopped"
}' | python -mjson.tool
}
Confidential – Oracle Internal/Restricted/Highly Restricted 36
Add Replicat via RESTful API using Shell Scripts
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 37
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Speaker Reference
Confidential – Oracle Internal/Restricted/Highly Restricted 38
@dbasolved
http://dbasolved.com
bobby.Curtis@oracle.com

Weitere ähnliche Inhalte

Was ist angesagt?

Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Aaron Shilo
 
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Ludovico Caldara
 
Oracle Database Enterprise Edition で解決する データベースシステムの課題 (12c対応版)
Oracle Database Enterprise Edition で解決するデータベースシステムの課題 (12c対応版)Oracle Database Enterprise Edition で解決するデータベースシステムの課題 (12c対応版)
Oracle Database Enterprise Edition で解決する データベースシステムの課題 (12c対応版)
オラクルエンジニア通信
 

Was ist angesagt? (20)

Hit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate MicroservicesHit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate Microservices
 
Oracle 12c PDB insights
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insights
 
Oracle Golden Gate Interview Questions
Oracle Golden Gate Interview QuestionsOracle Golden Gate Interview Questions
Oracle Golden Gate Interview Questions
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 
Extreme Replication - Performance Tuning Oracle GoldenGate
Extreme Replication - Performance Tuning Oracle GoldenGateExtreme Replication - Performance Tuning Oracle GoldenGate
Extreme Replication - Performance Tuning Oracle GoldenGate
 
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
 
The Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - PresentationThe Oracle RAC Family of Solutions - Presentation
The Oracle RAC Family of Solutions - Presentation
 
Oracle GoldenGateでの資料採取(トラブル時に採取すべき資料)
Oracle GoldenGateでの資料採取(トラブル時に採取すべき資料)Oracle GoldenGateでの資料採取(トラブル時に採取すべき資料)
Oracle GoldenGateでの資料採取(トラブル時に採取すべき資料)
 
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best PracticesOracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
 
Oracle GoldenGate導入Tips
Oracle GoldenGate導入TipsOracle GoldenGate導入Tips
Oracle GoldenGate導入Tips
 
Oracle DB 19c: SQL Tuning Using SPM
Oracle DB 19c: SQL Tuning Using SPMOracle DB 19c: SQL Tuning Using SPM
Oracle DB 19c: SQL Tuning Using SPM
 
Oracle GoldenGate
Oracle GoldenGate Oracle GoldenGate
Oracle GoldenGate
 
Understanding Oracle RAC 12c Internals OOW13 [CON8806]
Understanding Oracle RAC 12c Internals OOW13 [CON8806]Understanding Oracle RAC 12c Internals OOW13 [CON8806]
Understanding Oracle RAC 12c Internals OOW13 [CON8806]
 
One PDB to go, please!
One PDB to go, please!One PDB to go, please!
One PDB to go, please!
 
Why oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19cWhy oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19c
 
Long live to CMAN!
Long live to CMAN!Long live to CMAN!
Long live to CMAN!
 
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
 
Extreme replication at IOUG Collaborate 15
Extreme replication at IOUG Collaborate 15Extreme replication at IOUG Collaborate 15
Extreme replication at IOUG Collaborate 15
 
Oracle Database Enterprise Edition で解決する データベースシステムの課題 (12c対応版)
Oracle Database Enterprise Edition で解決するデータベースシステムの課題 (12c対応版)Oracle Database Enterprise Edition で解決するデータベースシステムの課題 (12c対応版)
Oracle Database Enterprise Edition で解決する データベースシステムの課題 (12c対応版)
 
GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)
GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)
GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)
 

Ähnlich wie Oracle GoldenGate 18c - REST API Examples

Ähnlich wie Oracle GoldenGate 18c - REST API Examples (20)

Oracle goldegate microservice
Oracle goldegate microserviceOracle goldegate microservice
Oracle goldegate microservice
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack API
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013JAX RS 2.0 - OTN Bangalore 2013
JAX RS 2.0 - OTN Bangalore 2013
 
MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL Proxy. A powerful, flexible MySQL toolbox.MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL Proxy. A powerful, flexible MySQL toolbox.
 
Explore Advanced CA Release Automation Configuration Topics
Explore Advanced CA Release Automation Configuration TopicsExplore Advanced CA Release Automation Configuration Topics
Explore Advanced CA Release Automation Configuration Topics
 
Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data
 
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeOUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source Code
 
Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0Whats new in Oracle Trace File analyzer 18.3.0
Whats new in Oracle Trace File analyzer 18.3.0
 
Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0Whats new in oracle trace file analyzer 18.3.0
Whats new in oracle trace file analyzer 18.3.0
 
Oracle REST Data Services Best Practices/ Overview
Oracle REST Data Services Best Practices/ OverviewOracle REST Data Services Best Practices/ Overview
Oracle REST Data Services Best Practices/ Overview
 
Oracle Database Management REST API
Oracle Database Management REST APIOracle Database Management REST API
Oracle Database Management REST API
 
Cncf microservices security
Cncf microservices securityCncf microservices security
Cncf microservices security
 
Automating Cloud Operations - Everything you wanted to know about cURL and RE...
Automating Cloud Operations - Everything you wanted to know about cURL and RE...Automating Cloud Operations - Everything you wanted to know about cURL and RE...
Automating Cloud Operations - Everything you wanted to know about cURL and RE...
 
RESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous DatabaseRESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous Database
 
Fully Automate Application Delivery with Puppet and F5 - PuppetConf 2014
Fully Automate Application Delivery with Puppet and F5 - PuppetConf 2014Fully Automate Application Delivery with Puppet and F5 - PuppetConf 2014
Fully Automate Application Delivery with Puppet and F5 - PuppetConf 2014
 
Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
 
Apache Ambari BOF - APIs - Hadoop Summit 2013
Apache Ambari BOF - APIs - Hadoop Summit 2013Apache Ambari BOF - APIs - Hadoop Summit 2013
Apache Ambari BOF - APIs - Hadoop Summit 2013
 

Mehr von Bobby Curtis

Mehr von Bobby Curtis (20)

MySQLHeatwave-TheBasics.pptx
MySQLHeatwave-TheBasics.pptxMySQLHeatwave-TheBasics.pptx
MySQLHeatwave-TheBasics.pptx
 
ECO 2022 - OCI and HashiCorp Terraform
ECO 2022 - OCI and HashiCorp TerraformECO 2022 - OCI and HashiCorp Terraform
ECO 2022 - OCI and HashiCorp Terraform
 
Improve PostgreSQL replication with Oracle GoldenGate
Improve PostgreSQL replication with Oracle GoldenGateImprove PostgreSQL replication with Oracle GoldenGate
Improve PostgreSQL replication with Oracle GoldenGate
 
Terraform & Oracle Cloud Infrastructure
Terraform & Oracle Cloud InfrastructureTerraform & Oracle Cloud Infrastructure
Terraform & Oracle Cloud Infrastructure
 
Oracle GoldenGate on Docker
Oracle GoldenGate on DockerOracle GoldenGate on Docker
Oracle GoldenGate on Docker
 
OOW19 - HOL5221
OOW19 - HOL5221OOW19 - HOL5221
OOW19 - HOL5221
 
GoldenGate CDR from UKOUG 2017
GoldenGate CDR from UKOUG 2017GoldenGate CDR from UKOUG 2017
GoldenGate CDR from UKOUG 2017
 
Oracle GoldenGate and Baseball - 5 Keys for Moving to the Cloud
Oracle GoldenGate and Baseball - 5 Keys for Moving to the CloudOracle GoldenGate and Baseball - 5 Keys for Moving to the Cloud
Oracle GoldenGate and Baseball - 5 Keys for Moving to the Cloud
 
Oracle GoldenGate Studio Intro
Oracle GoldenGate Studio IntroOracle GoldenGate Studio Intro
Oracle GoldenGate Studio Intro
 
5 Keys to Oracle GoldenGate Implemenations
5 Keys to Oracle GoldenGate Implemenations5 Keys to Oracle GoldenGate Implemenations
5 Keys to Oracle GoldenGate Implemenations
 
Enable GoldenGate Monitoring with OEM 12c/JAgent
Enable GoldenGate Monitoring with OEM 12c/JAgentEnable GoldenGate Monitoring with OEM 12c/JAgent
Enable GoldenGate Monitoring with OEM 12c/JAgent
 
Examining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail FilesExamining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail Files
 
Exachk and oem12c - IOUG C15LV
Exachk and oem12c - IOUG C15LVExachk and oem12c - IOUG C15LV
Exachk and oem12c - IOUG C15LV
 
Extreme Replication - RMOUG Presentation
Extreme Replication - RMOUG PresentationExtreme Replication - RMOUG Presentation
Extreme Replication - RMOUG Presentation
 
IOUG Data Integration SIG w/ Oracle GoldenGate Solutions and Configuration
IOUG Data Integration SIG w/ Oracle GoldenGate Solutions and ConfigurationIOUG Data Integration SIG w/ Oracle GoldenGate Solutions and Configuration
IOUG Data Integration SIG w/ Oracle GoldenGate Solutions and Configuration
 
Oracle virtualbox basic to rac attack
Oracle virtualbox basic to rac attackOracle virtualbox basic to rac attack
Oracle virtualbox basic to rac attack
 
Oracle GoldenGate 12c CDR Presentation for ECO
Oracle GoldenGate 12c CDR Presentation for ECOOracle GoldenGate 12c CDR Presentation for ECO
Oracle GoldenGate 12c CDR Presentation for ECO
 
How many ways to monitor oracle golden gate - OOW14
How many ways to monitor oracle golden gate - OOW14How many ways to monitor oracle golden gate - OOW14
How many ways to monitor oracle golden gate - OOW14
 
Exachk and oem12c
Exachk and oem12cExachk and oem12c
Exachk and oem12c
 
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Oracle GoldenGate 18c - REST API Examples

  • 1. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate 18c RESTful API & Scripts Examples Bobby Curtis, MBA Director of Product Management Oracle GoldenGate October, 2018
  • 2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Confidential – Oracle Internal/Restricted/Highly Restricted
  • 3. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate Real time Performance Extensible & Flexible Proven & Reliable Oracle GoldenGate provides low-impact capture, routing, transformation, and delivery of database transactions across homogeneous and heterogeneous environments in real-time with no distance limitations. Most Databases Data Events Transaction Streams Cloud DBs Big Data Supports Databases, Big Data and NoSQL: * The most popular enterprise integration tool in history Confidential – Oracle Internal/Restricted/Highly Restricted
  • 4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate 18c Microservices Architecture Network Capture Trail Files DS AS SM PM AS RS PM Delivery SM >HTML>>SQL >>CLI >>API Customizable Interactive Experience Proxy/Reverse Proxy Proxy/Reverse Proxy Trail Files
  • 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | RESTful API Examples Confidential – Oracle Internal/Restricted/Highly Restricted 5
  • 6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | General Information • Oracle GoldenGate 18c for Microservices uses RESTful APIs • All administration functions can be performed with RESTful APIs • Core Documentation – https://docs.oracle.com/en/middleware/goldengate/core/18.1/index.html • RESTful API Documentation (12.3.0.1.x) – https://docs.oracle.com/goldengate/c1230/gg-winux/OGGRA/toc.htm Confidential – Oracle Internal/Restricted/Highly Restricted 6
  • 7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | RESTful API Examples Database 7
  • 8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Add Trandata curl -X POST http://{hostname}:{port}/services/v2/connections/{Domain}.{Alias}/trandata/table --user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' -d '{ "operation":"add", "tableName":"pdb1.inittest.optype_test" }' Confidential – Oracle Internal/Restricted/Highly Restricted 8 Single Table
  • 9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Add SchemaTrandata curl -X POST http://{hostname}:{port}/services/v2/connections/{Domain}.{Alias}/trandata/schema -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' -d '{ "operation":"add", "schemaName":"oggtst1.soe" }' Confidential – Oracle Internal/Restricted/Highly Restricted 9 Whole Schema
  • 10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | List Connections curl -X GET http://{hostname}:{port}/services/v2/connections - user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 10 See who is connected
  • 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | RESTful API Examples Administration Service 11
  • 12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Create Credential curl -X POST http://{hostname}:{port}/services/v2/credentials/{Domain}/{Alias} -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' -d '{ "userid":"c##ggate@cdb", "password":"ggate" }' Confidential – Oracle Internal/Restricted/Highly Restricted 12 Add a Credential to Administrative Service
  • 13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Create Credential curl -X POST http://{hostname}:{port}/services/v2/credentials /{Domain}/{Alias} -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' -d '{ "userid":"c##ggate@cdb", "password":"ggate" }' Confidential – Oracle Internal/Restricted/Highly Restricted 13 Add a Credential to Administrative Service • Same command structure works for Source or Target Administrative Service
  • 14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Create Credential – Protocol User curl -X POST http://{hostname}:{port}/services/v2/credentials /{Domain}/{Alias} -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' -d '{ "userid":"oggadmin", "password":"Welcome1" }' Confidential – Oracle Internal/Restricted/Highly Restricted 14 Add a Protocol User to Administrative Service – Non-Secure • This user is the ServiceManager user for Target system. • Created on the source Administrative Service
  • 15. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Create Extract curl -X POST http://{hostname}:{port}/services/ v2/extracts/{ExtractName} -- user ‘{ServiceManagerUser}:{password} ' -H 'cache-control: no-cache' -d '{ "description":"Integrated Extract", "config":[ "Extract IEPKTST", "ExtTrail bc", "UseridAlias SGGATE", "sourcecatalog pdb1;", "Table inittest.pktst_table, getbeforecols(on update all, on delete all);" ], "source":{ "tranlogs":"integrated" }, "credentials":{ "alias":"SGGATE" }, "registration":{ "containers": [ "pdb1" ], "optimized":false }, "begin":"now", "targets":[ { "name":"bc", "sizeMB":250 } ], "status":"stopped" }' Confidential – Oracle Internal/Restricted/Highly Restricted 15 Add an Extract to Administrative Service
  • 16. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Delete Extract curl -X DELETE http://{hostname}:{port}/services/v2/extracts/{ExtractName} -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 16 Remove an Extract to Administrative Service
  • 17. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | List Extract curl -X GET http://{hostname}:{port}/services/v2/extracts -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 17 List all Extracts
  • 18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Create Replicat curl -X POST http://{hostname}:{port}/service s/v2/replicats/{ReplicatName} -- user ‘{ServiceManagerUser}:{passwor d}' -H 'cache-control: no-cache' -d '{ "config":[ "Replicat IRPKTST", "UseridAlias TGGATE", "Map pdb1.inittest.pktst_table, Target inittest.pktst_table, colmap(usedefaults, optype=@getenv('''ggheader''',' ''optype'''), beforerid=@before(rid));" ], "source":{ "name":"bd" }, "credentials":{ "alias":"TGGATE" }, "checkpoint":{ "table":"ggate.checkpoint" }, "mode":{ "type":"integrated", "parallel": false }, "registration": "standard", "begin":"now", "status":"running" }' Confidential – Oracle Internal/Restricted/Highly Restricted 18 Add an Replicat to Administrative Service
  • 19. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Delete Delete curl -X DELETE http://{hostname}:{port}/services/v2/replicats/{ReplicatName} -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 19 Remove an Replicat to Administrative Service
  • 20. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | List Replicat curl -X GET http://{hostname}:{port}/services/v2/replicats -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 20 List all Replicats
  • 21. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | RESTful API Examples Distribution Service 21
  • 22. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Create Distribution Path curl -X POST http://{hostname}:{port}/services/v2/sources/{PathName} -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' -d '{ "name": "PKTSTPATH", "status": "stopped", "source": { "uri": "trail://localhost:16002/services/v2/sources?trail=bc" }, "target": { "uri": "ws://OracleGoldenGate+WSTARGET@localhost:17003/services/v2/targets?trail=bd" } }' Confidential – Oracle Internal/Restricted/Highly Restricted 22 Create a Distribution Path in Distribution Service
  • 23. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Delete Distribution Path curl -X DELETE http://{hostname}:{port}/services/v2/sources/{PathName} -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' -d '{ "distpath":"TSTPATH" }' Confidential – Oracle Internal/Restricted/Highly Restricted 23 Delete a Distribution Path in Distribution Service
  • 24. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | List Distribution Path(s) curl -X GET http://{hostname}:{port}/services/v2/sources -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 24 List all Distribution Paths in Distribution Service
  • 25. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | List Extract + Trail File curl -X GET http://{hostname}:{port}/services/v2/exttrails -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 25 List Extract and Trail File in Distribution Service
  • 26. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | RESTful API Examples Receiver Service 26
  • 27. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | List Distribution Paths curl -X GET http://{hostname}:{port}/services/v2/targets -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 27 List Distribution Paths from Receiver Service
  • 28. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Retrieve Distribution Paths Statistics curl -X GET http://{hostname}:{port}/services/v2/targets/{SystemGenPathName}/stats -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 28 Retrieve Distribution Paths from Receiver Service
  • 29. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | RESTful API Examples Performance Metric Service 29
  • 30. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Retrieve Extract Statistics curl -X GET http://{hostname}:{port}/services/v2/mpoints/{ExtractName}/statisticsExtract -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 30 Retrieve Extract from Performance Metric Service
  • 31. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Retrieve Table Statistics curl -X GET http://{hostname}:{port}/services/v2/mpoints/{ExtractName}/statisticsTableExtract -- user ‘{ServiceManagerUser}:{password}' -H 'cache-control: no-cache' Confidential – Oracle Internal/Restricted/Highly Restricted 31 Retrieve Table Statistics per Extract from Performance Metric Service
  • 32. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted Shell Script Examples RESTful API within Shell Scripts
  • 33. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Add Credential #!/bin/bash #variables vPass=$1 vASHost=localhost vASPort=$2 vGGUser=$3 vGGPass=$4 vGGAlias=SGGATE function _createAlias { curl -X POST http://$vASHost:$vASPort/servic es/v2/credentials/{Domain}/$vG GAlias --user "oggadmin:"$vPass -H 'Cache-Control: no-cache' -d '{ "userid":"'$vGGUser'", "password":"'$vGGPass'" }' | python -mjson.tool } function _main { _createAlias } _main Confidential – Oracle Internal/Restricted/Highly Restricted 33 Add Credential via RESTful API using Shell Scripts
  • 34. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Add Credential #!/bin/bash #variables vPass=$1 vASHost=localhost vASPort=$2 vProtoUser=$3 vProtoPass=$4 vProtoAlias=WSTARGET function _createAlias { curl -X POST http://$vASHost:$vASPort/servic es/v2/credentials/{Domain}/$vPr otoAlias --user "oggadmin:"$vPass -H 'Cache-Control: no-cache' -d '{ "userid":"'$vProtoUser'", "password":"'$vProtoPass'" }'| python -mjson.tool } function _main { _createAlias } _main Confidential – Oracle Internal/Restricted/Highly Restricted 34 Add Protocol Credential via RESTful API using Shell Scripts – Non-Secure
  • 35. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Add Extract #!/bin/bash …. function _addExtract { curl -X POST http://$vASHost:$vASPort/services/v2/extracts/$vExt Name --user "oggadmin:"$vPass -H 'Cache-Control: no-cache' -d '{ "description":"Integrated Extract", "config":[ "Extract '$vExtName'", "ExtTrail aa", "UseridAlias '$vGGAlias'", "sourcecatalog oggoow181;", "table soe.addresses;", "table soe.customers;", "table soe.orders;", "table soe.order_items;", "table soe.card_details;", "table soe.logon;", "table soe.product_information;", "table soe.inventories;", "table soe.product_descriptions;", "table soe.warehouses;", "table soe.orderentry_metadata;" ], "source":{ "tranlogs":"integrated" }, "credentials":{ "alias":"'$vGGAlias'" }, "registration":{ "containers": [ "oggoow181" ], "optimized":false }, "begin":"now", "targets":[ { "name":"aa", "sizeMB":250 } ], "status":"stopped" }' | python -mjson.tool } Confidential – Oracle Internal/Restricted/Highly Restricted 35 Add Extract via RESTful API using Shell Scripts
  • 36. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Add Replicat #!/bin/bash …. function _addReplicat { curl -X POST http://$vASHost:$vASPort/services/v2/replicats/$vRe pName --user "oggadmin:"$vPass -H 'Cache-Control: no-cache' -d '{ "description":"Integrated Replicat", "config":[ "Replicat '$vRepName'", "UseridAlias '$vGGAlias'", "map oggoow181.soe.addresses,target soe.addresses, keycols(address_id);", "map oggoow181.soe.customers, target soe.customers, keycols(customer_id);", "map oggoow181.soe.orders, target soe.orders, keycols(order_id);", "map oggoow181.soe.order_items, target soe.order_items, keycols(order_id, line_item_id);", "map oggoow181.soe.card_details, target soe.card_details, keycols(card_id);", "map oggoow181.soe.logon, target soe.logon;", "map oggoow181.soe.product_information, target soe.product_information;", "map oggoow181.soe.inventories, target soe.inventories, keycols(product_id, warehouse_id);", "map oggoow181.soe.product_descriptions, target soe.product_descriptions;", "map oggoow181.soe.warehouses, target soe.warehouses;", "map oggoow181.soe.orderentry_metadata, target soe.orderentry_metadata;" ], "source":{ "name":"ab" }, "mode":{ "type":"integrated" }, "credentials":{ "alias":"'$vGGAlias'" }, "checkpoint":{ "table":"ggate.checkpoints" }, "status":"stopped" }' | python -mjson.tool } Confidential – Oracle Internal/Restricted/Highly Restricted 36 Add Replicat via RESTful API using Shell Scripts
  • 37. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 37
  • 38. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Speaker Reference Confidential – Oracle Internal/Restricted/Highly Restricted 38 @dbasolved http://dbasolved.com bobby.Curtis@oracle.com