Tip Tuesday | Use Wireshark To Find API Commands
When you have a front end built on APIs, but aren’t familiar with the API commands, you can use Wireshark to find the endpoint and body of commands being executed on the front end.
For example, if you want to find out how to start a process in Oracle GoldenGate (OGG) using an API, you can use the filters below in Wireshark.
ip.dst==<GoldenGate IP> && http
This will filter Wireshark's monitoring to the OGG target host and HTTP traffic, so that you can focus on any activity related to GoldenGate. As shown below, we have found an API request that is starting an Extract process at given SCN using the at
argument - this was something we did not easily find in the documentation.
Using what we grabbed here we can now construct the API call
curl -s -u ggUser:password -H Accept:application/json -X POST http://<GoldenGate IP>/services/v2/commands/execute -d '{"name":"start", "processName":"<replicat>", "at":<scn>}