curl --request POST \
  --url http://localhost:3000/api/v1/mirrors/cdc/batches \
  --header 'Authorization: Basic Xp9dY3Rhc0suZiQ0Iw==' \
  --header 'Content-Type: application/json' \
  --data '{
  "flowJobName": "mirror_production",
  "limit": 5,
  "beforeId": -1,
  "afterId": -1,
  "ascending": false
}'
{
	"cdcBatches": [
		{
			"startLsn": "0",
			"endLsn": "0",
			"numRows": "0",
			"startTime": "2025-09-01T12:31:36.932056Z",
			"endTime": null,
			"batchId": "168730"
		},
		{
			"startLsn": "0",
			"endLsn": "46637208645632",
			"numRows": "60452",
			"startTime": "2025-09-01T12:30:36.504532Z",
			"endTime": "2025-09-01T12:31:38.472191Z",
			"batchId": "168729"
		},
		{
			"startLsn": "0",
			"endLsn": "4663711103356",
			"numRows": "59476",
			"startTime": "2025-09-01T12:29:36.097869Z",
			"endTime": "2025-09-01T12:30:37.925048Z",
			"batchId": "168728"
		},
		{
			"startLsn": "0",
			"endLsn": "46637036715864",
			"numRows": "131025",
			"startTime": "2025-09-01T12:28:34.860097Z",
			"endTime": "2025-09-01T12:29:38.814718Z",
			"batchId": "168727"
		},
		{
			"startLsn": "0",
			"endLsn": "46636882418728",
			"numRows": "238256",
			"startTime": "2025-09-01T12:27:34.396289Z",
			"endTime": "2025-09-01T12:28:38.964550Z",
			"batchId": "168726"
		}
	],
	"total": 168730,
	"page": 1
}
POST api/v1/mirrors/cdc/batches
This endpoint retrieves change data capture (CDC) batches for a specified mirror.

Request Fields

flowJobName
string
The name of the mirror to get CDC batches for.
limit
number
The maximum number of CDC batches to retrieve. Set this to 0 or lower to retrieve all batches.
ascending
boolean
Whether to sort the CDC batches in ascending order based on their IDs. Defaults to false.
beforeId
number
The ID of the last CDC batch to retrieve batches before. Set to -1 to ignore this filter.
afterId
number
The ID of the first CDC batch to retrieve batches after. Set to -1 to ignore this filter.

Response Fields

cdcBatches
array
An array of CDC batches.
total
number
The total number of CDC batches returned.
page
number
The current page number.
curl --request POST \
  --url http://localhost:3000/api/v1/mirrors/cdc/batches \
  --header 'Authorization: Basic Xp9dY3Rhc0suZiQ0Iw==' \
  --header 'Content-Type: application/json' \
  --data '{
  "flowJobName": "mirror_production",
  "limit": 5,
  "beforeId": -1,
  "afterId": -1,
  "ascending": false
}'
{
	"cdcBatches": [
		{
			"startLsn": "0",
			"endLsn": "0",
			"numRows": "0",
			"startTime": "2025-09-01T12:31:36.932056Z",
			"endTime": null,
			"batchId": "168730"
		},
		{
			"startLsn": "0",
			"endLsn": "46637208645632",
			"numRows": "60452",
			"startTime": "2025-09-01T12:30:36.504532Z",
			"endTime": "2025-09-01T12:31:38.472191Z",
			"batchId": "168729"
		},
		{
			"startLsn": "0",
			"endLsn": "4663711103356",
			"numRows": "59476",
			"startTime": "2025-09-01T12:29:36.097869Z",
			"endTime": "2025-09-01T12:30:37.925048Z",
			"batchId": "168728"
		},
		{
			"startLsn": "0",
			"endLsn": "46637036715864",
			"numRows": "131025",
			"startTime": "2025-09-01T12:28:34.860097Z",
			"endTime": "2025-09-01T12:29:38.814718Z",
			"batchId": "168727"
		},
		{
			"startLsn": "0",
			"endLsn": "46636882418728",
			"numRows": "238256",
			"startTime": "2025-09-01T12:27:34.396289Z",
			"endTime": "2025-09-01T12:28:38.964550Z",
			"batchId": "168726"
		}
	],
	"total": 168730,
	"page": 1
}