REST API Example for GTIDSET parameter

This topic shows examples for using the GTIDSET parameter with ADD EXTRACT REST API post request, ALTER EXTRACT REST request, and then checking the Extract with the GTID set value using the INFO EXTRACT command.

Example 1: The REST API post request to add an Extract is as follows:
{
    “credentials”: {
        “alias”: “ggeast”
    },
    “source”: “tranlogs”,
    “begin”: {
        “at”: {
            “atGtidSet”: [
                     “2174B383-5441-11E8-B90A-C80AA9429562:1-3”,
                     “3174B383-5441-11E8-B90A-C80AA9429562:1-3",
                     “4174B383-5441-11E8-B90A-C80AA9429562:1-3”
            ]
        }
    }
}
The example REST request to add Extract is formed:
> POST /services/{version}/extracts/exte
{
    “source”: “tranlogs”,
    “begin”: {
        “at”: {
            “atGtidSet”: “1d380bee-0c24-11ee-b338-00001701f1ea:1-8”
        }
    }
}
The example REST request to alter Extract is formed as follows:
> PATCH /services/{version}/extracts/exte
{
    “begin”: {
        “at”: {
            “atGtidSet”: “1d380bee-0c24-11ee-b338-000017015555:12-19”
        }
    }
}
After adding the Extract by GTID set, use the INFO EXTRACT command with showch to view the GTID set as position, as shown in the following example:
OGG (http://localhost:9011/ GTIDMAIN) 6> info extract exte, showch

Extract    EXTE   Initialized  2023-07-17 19:00   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:06 ago)
VAM Read Checkpoint  First Record
00000000000000000000:cd6f98b1-1fbd-11ee-b73f-00001701f1ea:20
GTID Set             cd6f98b1-1fbd-11ee-b73f-00001701f1ea:1-20
Encryption Profile   LocalWallet