获取 /jobs

获取所有迁移作业

查询参数

  • sort 字符串

    检索结果的顺序

    格式应符合以下模式:^\w+,(DESC|ASC)$。默认值为 submittedAt,DESC

  • limit 整型

    限制结果

    最小值为 0

  • 类型 字符串

    仅筛选特定作业类型的作业

    值为 IN_PROGRESS

  • projectId 字符串

    按 projectId 筛选职位

    格式应符合以下模式:^[A-Za-z0-9\-]+$

响应

  • 200 application/json

    正常

    隐藏响应属性 显示响应属性 对象
    • id 字符串 必需

      格式应符合以下模式:^[A-Za-z0-9\-]+$

    • projectId 字符串 必需

      格式应符合以下模式:^[A-Za-z0-9\-]+$

    • 状态 字符串 必需

      取值为 NOT_STARTEDRUNNINGFAILEDCANCELLINGCANCELLEDCOMPLETEDCLEANING_UP

    • cdcStatus 字符串

      取值为 NOT_STARTEDRUNNINGCOMPLETINGCOMPLETEDFAILEDCANCELLEDPAUSED。默认值为 NOT_STARTED

    • verificationJobId 字符串
    • 选项 对象 必需

      不允许使用其他属性。

      隐藏选项属性 显示选项属性 对象
      • 删除集合 布尔

        默认值为false

      • 模式 字符串 必需

        值为 SNAPSHOTCDCINCREMENTAL

      • errorHandling 字符串

        值为 FAILWARNSKIP。默认值为 FAIL

      • errorTolerance 整型

        终止迁移之前应允许的(记录级别)故障次数。该值严格大于或等于。

        最小值为 0

    • jdbcConnectionString 字符串
    • MongoDB 连接字符串 字符串
    • submittedAt string(date-time) 必需
    • 统计信息 对象

      不允许使用其他属性。

      隐藏统计属性 显示统计属性 对象
      • startedAt string(date-time)
      • elapsedSeconds integer(int64)
      • 剩余表计数 整型
      • processingTables array[string]
      • totalEventsSeen integer(int64)

        默认值为0

      • snapshotCompleted 布尔

        默认值为false

      • totalTableCount 整型
      • totalEvents integer(int64)
      • totalEventSize integer(int64)
    • cdcStatistics 对象

      不允许使用其他属性。

      隐藏 cdcStatistics 属性 显示 cdcStatistics 属性 对象
      • startedAt string(date-time)
      • lastEventTime string(date-time)
      • eventsInLastHour integer(int64)

        默认值为0

      • eventsInLastMinute integer(int64)

        默认值为0

      • totalEventsSeen integer(int64)

        默认值为0

    • failureError 对象

      不允许使用其他属性。

      隐藏 failureError 属性 显示 failureError 属性 对象
      • errorType 字符串 必需
      • message 字符串 必需
      • failureAt string(date-time) 必需
      • setupError 布尔 必需

        默认值为false

    • metadata 对象

      不允许使用其他属性。

      Hide metadata attributes 显示元数据属性 对象
      • telemetryUserId 字符串
      • verificationRequested 布尔

        默认值为false

      • verificationStatus 字符串

        取值为 VERIFYINGFAILEDCANCELLINGCANCELLEDVERIFIEDABORTED

    • relationalTableFilters 对象

      一个对象,其中每个键代表一个模式名称。每个模式都包含可应用表筛选器的表。

      隐藏关系表筛选器属性 显示关系表筛选器属性 对象
      • * 对象 additionalProperties

        一个对象,其中每个键代表模式中的一个表名称。

        隐藏 * 属性 显示 * 属性 对象
        • * 对象 additionalProperties

          不允许使用其他属性。

          隐藏 * 属性 显示 * 属性 对象
          • whereClause 字符串

            用于过滤指定源表的行的SQL WHERE 子句的内容。

          • 行计数 integer(int64)

            从源表返回的行数限制(可选)。

  • 500 application/json

    服务器内部错误

    隐藏响应属性 显示响应属性 对象
    • jobId 字符串

      格式应符合以下模式:^[A-Za-z0-9\-]+$

    • message 字符串 必需
    • 描述 字符串
    • timestamp string(date-time) 必需
GET /jobs
curl \
 --request GET 'http://127.0.0.1:8278/api/v1/jobs'
响应示例 (200)
[
  {
    "id": "string",
    "projectId": "string",
    "status": "NOT_STARTED",
    "cdcStatus": "NOT_STARTED",
    "verificationJobId": "string",
    "options": {
      "dropCollections": false,
      "mode": "SNAPSHOT",
      "errorHandling": "FAIL",
      "errorTolerance": 42
    },
    "jdbcConnectionString": "string",
    "mongoDbConnectionString": "string",
    "submittedAt": "2025-05-04T09:42:00Z",
    "statistics": {
      "startedAt": "2025-05-04T09:42:00Z",
      "elapsedSeconds": 42,
      "remainingTableCount": 42,
      "processingTables": [
        "string"
      ],
      "totalEventsSeen": 0,
      "snapshotCompleted": false,
      "totalTableCount": 42,
      "totalEvents": 42,
      "totalEventSize": 42
    },
    "cdcStatistics": {
      "startedAt": "2025-05-04T09:42:00Z",
      "lastEventTime": "2025-05-04T09:42:00Z",
      "eventsInLastHour": 0,
      "eventsInLastMinute": 0,
      "totalEventsSeen": 0
    },
    "failureError": {
      "errorType": "string",
      "message": "string",
      "failureAt": "2025-05-04T09:42:00Z",
      "setupError": false
    },
    "metadata": {
      "telemetryUserId": "string",
      "verificationRequested": false,
      "verificationStatus": "VERIFYING"
    },
    "relationalTableFilters": {
      "schema_1_name": {
        "table_1_name": {
          "whereClause": "id > 1000 AND id <= 2000"
        },
        "table_2_name": {
          "rowCount": 10,
          "whereClause": "TRUE"
        }
      }
    }
  }
]
响应示例 (500)
{
  "jobId": "string",
  "message": "string",
  "description": "string",
  "timestamp": "2025-05-04T09:42:00Z"
}