跳到主要内容

Reset Position (Incremental)

Overview

Reset the incremental position when you need to re-consume earlier data or fast-forward past the current stream.

Caveats

  • Only allowed while the job is STOPPED and in Incremental phase.
  • The action is irreversible—proceed with caution.
  • Choosing a future position may drop data between the old and new offsets.

Endpoint

POST /cloudcanal/console/api/v1/openapi/datajob/updateincrepos

Request

NameDescriptionInRequiredType
taskIdDataJob IDbodyyeslong
posTypePosition typebodyyesstring
journalFileMySQL binlog file namebodynostring
filePositionMySQL binlog offsetbodynolong
gtidPositionMySQL GTIDbodynostring
positionTimestampTimestamp-based position (ms)bodynolong
serverIdMySQL server-idbodynolong
lsnLSN for PG / SQL Serverbodynostring
scnOracle SCNbodynostring
scnIndexOracle SCN indexbodynostring
commonPosStrEngine-specific JSON blobbodynostring
dataIdHANA CDC table dataIdbodynolong

Response

NameDescriptionTypeAlways present
code1 = success, 0 = failurestringyes
datapayload (nullable)objectno
msghuman-readable messagestringno
requestIdtrace idstringyes

Request Examples

Position-type determines the required payload.


  • MYSQL_LOG_FILE_POS
  • AURORA_MYSQL_LOG_FILE_POS
  • MARIADB_LOG_FILE_POS
  • POLAR_MY_LOG_FILE_POS
  • POLAR_X_LOG_FILE_POS
  • OCEANBASE_LOG_FILE_POS
{
"taskId": 254,
"posType": <posType> ,
"journalFile": "binlog.000482",
"filePosition": 3881575,
"serverId": 1
}
  • MYSQL_TIMESTAMP_POS
  • AURORA_MYSQL_TIMESTAMP_POS
  • MARIADB_TIMESTAMP_POS
  • POLAR_MY_TIMESTAMP_POS
  • POLAR_X_TIMESTAMP_POS
  • TDSQLC_MY_TIMESTAMP_POS
  • OCEANBASE_BINLOG_TIMESTAMP_POS
{
"taskId": 254,
"posType": <posType> ,
"positionTimestamp": 1766735726031,
"serverId": 1
}
  • AMAZON_MSK_TIMESTAMP_POS
  • KAFKA_TIMESTAMP_POS
  • AUTOMQ_TIMESTAMP_POS
  • PULSAR_TIMESTAMP_POS
  • ROCKETMQ_TIMESTAMP_POS
  • OCEANBASE_TIMESTAMP_POS
  • MONGODB_TIMESTAMP_POS
  • TIDB_TIMESTAMP_POS
  • SQLSERVER_TIMESTAMP_POS
  • OB_FOR_ORACLE_TIMESTAMP_POS
  • HANA_TIMESTAMP_POS
{
"taskId": 254,
"posType": <posType> ,
"positionTimestamp": 1766735726031
}
  • DAMENG_LSN_POS
  • PG_LSN_POS
  • POLAR_PG_LSN_POS
  • AURORA_PG_LSN_POS
  • SQLSERVER_LSN_POS
  • KES_LSN_POS
{
"taskId": 254,
"posType": <posType> ,
"lsn": "0/123ABC"
}
  • HANA_DATA_ID_POS
{
"taskId": 254,
"posType": <posType> ,
"dataId": 111
}
  • TDENGINE_MULTI_POS
  • TDSQL_MULTI_POS
  • DYNAMO_MULTI_POS
  • REDIS_POS
  • HANA_MULTI_POS
  • SQLSERVER_MULTI_POS
  • DAMENG_MULTI_POS
  • DAMENG_DSC_POS
{
"taskId": 254,
"posType": <posType> ,
"commonPosStr": "{...}" // see Job Details → Incremental → Reset Position
}

Response Example

{
"code": "1",
"msg": "request success",
"data": null,
"requestId": "9ee3c617-e225-11f0-aa63-01d225a87225"
}