In a previous post, I shared the OGGRestAPI Python client I built for the GoldenGate REST API. Since then, I kept using it on production deployments, fixing it and adding new features along the way. It felt like the right time to stop asking people to copy a .py file into their project, so I published it to PyPI. You can now install it with a single command.

$ pip install oggrestapi
Collecting oggrestapi
  Using cached oggrestapi-1.0.2-py3-none-any.whl (46 kB)
Collecting urllib3
  Using cached urllib3-2.6.3-py3-none-any.whl (131 kB)
Collecting requests
  Using cached requests-2.32.5-py3-none-any.whl (64 kB)
Collecting charset_normalizer<4,>=2
  Using cached charset_normalizer-3.5.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (262 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2026.7.22-py3-none-any.whl (136 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.19-py3-none-any.whl (68 kB)
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests, oggrestapi
Successfully installed certifi-2026.7.22 charset-normalizer-3.5.1 idna-3.19 oggrestapi-1.0.2 requests-2.32.5 urllib3-2.6.3

One package for every GoldenGate version

The biggest change is not the packaging itself, though. Until now, the repository held one oggrestapi.py per GoldenGate version (19c, 23ai, 26ai), each generated separately from that version’s swagger.json. But after thorough tests, I realized that most of the differences came from typos or inconsistencies in the swaggers with no functional differences in the API. The PyPI package now merges all of that into a single OGGRestAPI class that works against any of these versions. You can import the same class regardless of the GoldenGate release you are working with:

from oggrestapi import OGGRestAPI

What changed since the last post

A few things arrived in the client between the previous post and this release:

  • Auto-discovery mode – A new auto_discovery option lets the client reach every microservice of a deployment (Administration Service, Distribution Service, etc.) from a single connection to the Service Manager, without setting up an NGINX reverse proxy first. The client looks up each service’s own port the first time it is needed.
  • New methodsrestart_deployment, restart_extract, restart_replicat, restart_service and restart_all_extracts / restart_all_replicats methods, on top of the existing start/stop ones. kill* methods were also added for extracts and replicats.
  • Context manager supportwith OGGRestAPI(...) as ogg_client: now closes the underlying HTTP session for you.
  • Deployment patching helpers – Useful when patching the OGG home of a deployment (or every deployment at once) and optionally restart it, with or without an NGINX reverse proxy.

Auto-discovery in practice

Pointing the client at the Service Manager with auto_discovery=True and a deployment name is enough to access the administration service, for instance, without ever touching a reverse proxy configuration. Of course, this only works if the credentials are the same.

>>> ogg_client = OGGRestAPI(
...     url="https://vmogg:7809",  # Port to the Service Manager
...     username="ogg",
...     password="ogg",
...     deployment="ogg_test_01",
...     auto_discovery=True
... )
>>> ogg_client.list_extracts()  # Administration Service endpoint. Would normally fail if queried against the Service Manager's port.
[{'name': 'EPARTV2', 'status': 'running'}, {'name': 'EVTEXT', 'status': 'running'}, {'name': 'EXTC2', 'status': 'stopped'}, {'name': 'EXTCX', 'status': 'stopped'}, {'name': 'EXTCZ', 'status': 'stopped'}, {'name': 'EXTDB04', 'status': 'running'}, {'name': 'EXTI', 'status': 'stopped'}, {'name': 'EXTPL', 'status': 'stopped'}, {'name': 'EXTPP', 'status': 'running'}, {'name': 'EXTPT', 'status': 'running'}]
>>> ogg_client.list_replicats()
[{'name': 'REPC2', 'status': 'running'}, {'name': 'REPCX', 'status': 'running'}, {'name': 'REPCZ', 'status': 'running'}, {'name': 'REPPL', 'status': 'running'}, {'name': 'REPPT', 'status': 'running'}]

Where to find it

The package is on PyPI and the source is still on GitHub.

  • pip install oggrestapi is now all it takes to get started, on any GoldenGate version.
  • Of course, you can still download the oggrestapi.py separately, if you cannot run pip install commands against your environment.