Start/Stop Extract/Replicat with REST API/JSON

Oracle GoldenGate Microservices Architecture is designed to allow the user to have three different ways of interacting with replication from anywhere. One of these approaches is to use the RESTful APIs that come bundled with release. By using RESTful APIs, an organization can orgistrate how they want GoldenGate to work within their environment.

In this post, you will take a look at how to start a pre-existing extract/replicat by using the RESTful API end points. To find more information on the APIs that are avaliable, please refere to the Oracle docs located here.

If you have an existing extract/replicat in a down or pending status, then you can start it using a JSON file and the associated RESTful API end point.

Now the image above shows you that the extract is stopped. To start the extract using RESTful API, you will need a JSON file that contains the following:

{
"$schema":"ogg:command",
"name":"start",
"processName":"IEXTSOE",
"processType":"extract"
}

Then from the command line, you can use cURL or some other method that accepts RESTful API calls to start the extract.

curl -u oggadmin:******** -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://http://localhost:16001/services/v2/commands/execute" -d @start_extracts.json | python -mjson.tool

Upon execution of the cURL command, you receive a status response on the command line in JSON output. This response shows you that the extract is starting and started.

{
"$schema": "api:standardResponse",
"links": [
{
"href": "http://localhost:16001/services/v2/commands/execute",
"mediaType": "application/json",
"rel": "canonical"
},
{
"href": "http://localhost:16001/services/v2/commands/execute",
"mediaType": "application/json",
"rel": "self"
}
],
"messages": [
{
"$schema": "ogg:message",
"code": "OGG-00975",
"issued": "2018-02-05T03:27:17Z",
"severity": "INFO",
"title": "EXTRACT IEXTSOE starting",
"type": "http://docs.oracle.com/goldengate/c1230/gg-winux/GMESG/oggus.htm#OGG-00975"
},
{
"$schema": "ogg:message",
"code": "OGG-15426",
"issued": "2018-02-05T03:27:17Z",
"severity": "INFO",
"title": "EXTRACT IEXTSOE started",
"type": "http://docs.oracle.com/goldengate/c1230/gg-winux/GMESG/oggus.htm#OGG-15426"
}
]
}

When you go back to the web page for the Administration Service, you see that the extract has been started.

 

This same process can be used when you want to start/stop an replicat.

Enjoy!!

Please follow and like:
Comments
  • I’m gone to tell my little brother, that he should
    also pay a visit this webpage on regular basis to get updated from
    newest news update.

    Also visit my website :: Vpn

  • Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter
    updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this.
    Please let me know if you run into anything. I truly enjoy reading your blog
    and I look forward to your new updates. gamefly free trial
    https://tinyurl.com/28555853

  • After looking into a number of the articles on your website, I seriously
    appreciate your technique of writing a blog.
    I book marked it to my bookmark site list and will be checking back in the near future.
    Please check out my website too and let me know what you think.

  • Hello there! This post could not be written any better!
    Reading through this post reminds me of my previous
    room mate! He always kept talking about this. I will forward this write-up to
    him. Pretty sure he will have a good read. Thank you for sharing!

Leave a Reply

Your email address will not be published. Required fields are marked *

Enquire now

Give us a call or fill in the form below and we will contact you. We endeavor to answer all inquiries within 24 hours on business days.