根据您项目的映射规则和模式转换生成应用程序代码
projectId 必需 | string (id) ^[A-Za-z0-9\-]+$ 项目 ID |
collections 必需 | 字符串数组 包含在生成的代码中的 MongoDB 集合 |
includeSupportFiles 必需 | boolean 是否包含支持文件(如果适用于所选语言和框架) |
language 必需 | string (codegen-language-type) 枚举: "JAVA" "CSHARP" "JAVASCRIPT" "JSON" "PYTHON" |
framework 必需 | string (codegen-framework-type) 枚举: "POJO" "POCO" "SPRING_DATA" "PERSISTENCE_LAYER" "MONGOOSE_SCHEMAS" "NODE" "MONGODB_JSON_SCHEMA" "STANDARD_JSON_SCHEMA" "JSON_EXAMPLE_SCHEMA" "PYTHON_TYPED_DICT_CLASSES" |
{- "collections": [
- "string"
], - "includeSupportFiles": true,
- "language": "JAVA",
- "framework": "POJO"
}
{- "language": "JAVA",
- "framework": "POJO",
- "files": [
- {
- "name": "string",
- "filetype": "ENTITY",
- "code": "string"
}
]
}
获取所有迁移作业
sort | string^\w+,(DESC|ASC)$ 默认: "submittedAt,DESC" 示例: sort=submittedAt,DESC 获取结果的顺序 |
limit | integer 示例: limit=20 限制结果 |
type | string (migration-jobs-get-type) 值: "IN_PROGRESS" 示例: type=IN_PROGRESS 过滤作业以仅包含特定类型的作业 |
projectId | string (id) ^[A-Za-z0-9\-]+$ 按projectId过滤作业 |
[- {
- "id": "string",
- "projectId": "string",
- "status": "RUNNING",
- "cdcStatus": "NOT_STARTED",
- "verificationJobId": "string",
- "options": {
- "dropCollections": false,
- "mode": "SNAPSHOT",
- "errorHandling": "FAIL",
- "errorTolerance": 0
}, - "jdbcConnectionString": "string",
- "mongoDbConnectionString": "string",
- "atlasMetadata": {
- "mongoDbProjectName": "string",
- "mongoDbProjectId": "string",
- "mongoDbClusterName": "string"
}, - "submittedAt": "2019-08-24T14:15:22Z",
- "statistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "elapsedSeconds": 0,
- "remainingTableCount": 0,
- "processingTables": [
- "string"
], - "totalEventsSeen": 0,
- "snapshotCompleted": false,
- "totalTableCount": 0,
- "totalEvents": 0,
- "totalEventSize": 0
}, - "cdcStatistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "lastEventTime": "2019-08-24T14:15:22Z",
- "eventsInLastHour": 0,
- "eventsInLastMinute": 0,
- "totalEventsSeen": 0
}, - "jobUpdates": [
- {
- "eventType": "DB_SETUP_ERROR",
- "stage": "SNAPSHOTTING",
- "message": "string",
- "details": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "count": 0,
- "location": {
- "table": "字符串"
}
}
], - "failureError": {
- "errorType": "字符串",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "字符串",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}
}
}
]
发布一个新的迁移作业
projectId 必需 | 字符串 |
必需 | 对象 (jdbc-连接详情) |
必需 | 对象 (mongodb-连接详情) |
必需 | 对象 (迁移作业描述选项) |
必需 | 对象 (迁移验证) |
对象 (关系表过滤器) 架构 |
{- "projectId": "string",
- "jdbc连接详情": {
- "id": "string",
- "type": "字符串",
- "url": "字符串",
- "user": "字符串",
- "password": "字符串",
- "savePassword": false,
- "existingConnectionId": "字符串",
- "oraclePdbName": "字符串",
- "isManualUri": false
}, - "mongodb连接详情": {
- "id": "string",
- "connectionString": "字符串",
- "projectId": "string",
- "savePassword": false,
- "projectName": "字符串",
- "clusterName": "字符串",
- "hasTimeSeriesCollection": false,
- "existingConnectionId": "字符串"
}, - "options": {
- "dropCollections": false,
- "mode": "SNAPSHOT",
- "errorHandling": "FAIL",
- "errorTolerance": 0
}, - "验证": {
- "enabled": false
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}
}
}
{- "id": "string",
- "projectId": "string",
- "status": "RUNNING",
- "cdcStatus": "NOT_STARTED",
- "verificationJobId": "string",
- "options": {
- "dropCollections": false,
- "mode": "SNAPSHOT",
- "errorHandling": "FAIL",
- "errorTolerance": 0
}, - "jdbcConnectionString": "string",
- "mongoDbConnectionString": "string",
- "atlasMetadata": {
- "mongoDbProjectName": "string",
- "mongoDbProjectId": "string",
- "mongoDbClusterName": "string"
}, - "submittedAt": "2019-08-24T14:15:22Z",
- "statistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "elapsedSeconds": 0,
- "remainingTableCount": 0,
- "processingTables": [
- "string"
], - "totalEventsSeen": 0,
- "snapshotCompleted": false,
- "totalTableCount": 0,
- "totalEvents": 0,
- "totalEventSize": 0
}, - "cdcStatistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "lastEventTime": "2019-08-24T14:15:22Z",
- "eventsInLastHour": 0,
- "eventsInLastMinute": 0,
- "totalEventsSeen": 0
}, - "jobUpdates": [
- {
- "eventType": "DB_SETUP_ERROR",
- "stage": "SNAPSHOTTING",
- "message": "string",
- "details": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "count": 0,
- "location": {
- "table": "字符串"
}
}
], - "failureError": {
- "errorType": "字符串",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "字符串",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}
}
}
{- "id": "string",
- "projectId": "string",
- "status": "RUNNING",
- "cdcStatus": "NOT_STARTED",
- "verificationJobId": "string",
- "options": {
- "dropCollections": false,
- "mode": "SNAPSHOT",
- "errorHandling": "FAIL",
- "errorTolerance": 0
}, - "jdbcConnectionString": "string",
- "mongoDbConnectionString": "string",
- "atlasMetadata": {
- "mongoDbProjectName": "string",
- "mongoDbProjectId": "string",
- "mongoDbClusterName": "string"
}, - "submittedAt": "2019-08-24T14:15:22Z",
- "statistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "elapsedSeconds": 0,
- "remainingTableCount": 0,
- "processingTables": [
- "string"
], - "totalEventsSeen": 0,
- "snapshotCompleted": false,
- "totalTableCount": 0,
- "totalEvents": 0,
- "totalEventSize": 0
}, - "cdcStatistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "lastEventTime": "2019-08-24T14:15:22Z",
- "eventsInLastHour": 0,
- "eventsInLastMinute": 0,
- "totalEventsSeen": 0
}, - "jobUpdates": [
- {
- "eventType": "DB_SETUP_ERROR",
- "stage": "SNAPSHOTTING",
- "message": "string",
- "details": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "count": 0,
- "location": {
- "table": "字符串"
}
}
], - "failureError": {
- "errorType": "字符串",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "字符串",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}
}
}
{- "id": "string",
- "projectId": "string",
- "status": "RUNNING",
- "cdcStatus": "NOT_STARTED",
- "verificationJobId": "string",
- "options": {
- "dropCollections": false,
- "mode": "SNAPSHOT",
- "errorHandling": "FAIL",
- "errorTolerance": 0
}, - "jdbcConnectionString": "string",
- "mongoDbConnectionString": "string",
- "atlasMetadata": {
- "mongoDbProjectName": "string",
- "mongoDbProjectId": "string",
- "mongoDbClusterName": "string"
}, - "submittedAt": "2019-08-24T14:15:22Z",
- "statistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "elapsedSeconds": 0,
- "remainingTableCount": 0,
- "processingTables": [
- "string"
], - "totalEventsSeen": 0,
- "snapshotCompleted": false,
- "totalTableCount": 0,
- "totalEvents": 0,
- "totalEventSize": 0
}, - "cdcStatistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "lastEventTime": "2019-08-24T14:15:22Z",
- "eventsInLastHour": 0,
- "eventsInLastMinute": 0,
- "totalEventsSeen": 0
}, - "jobUpdates": [
- {
- "eventType": "DB_SETUP_ERROR",
- "stage": "SNAPSHOTTING",
- "message": "string",
- "details": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "count": 0,
- "location": {
- "table": "字符串"
}
}
], - "failureError": {
- "errorType": "字符串",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "字符串",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}
}
}
{- "id": "string",
- "projectId": "string",
- "status": "RUNNING",
- "cdcStatus": "NOT_STARTED",
- "verificationJobId": "string",
- "options": {
- "dropCollections": false,
- "mode": "SNAPSHOT",
- "errorHandling": "FAIL",
- "errorTolerance": 0
}, - "jdbcConnectionString": "string",
- "mongoDbConnectionString": "string",
- "atlasMetadata": {
- "mongoDbProjectName": "string",
- "mongoDbProjectId": "string",
- "mongoDbClusterName": "string"
}, - "submittedAt": "2019-08-24T14:15:22Z",
- "statistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "elapsedSeconds": 0,
- "remainingTableCount": 0,
- "processingTables": [
- "string"
], - "totalEventsSeen": 0,
- "snapshotCompleted": false,
- "totalTableCount": 0,
- "totalEvents": 0,
- "totalEventSize": 0
}, - "cdcStatistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "lastEventTime": "2019-08-24T14:15:22Z",
- "eventsInLastHour": 0,
- "eventsInLastMinute": 0,
- "totalEventsSeen": 0
}, - "jobUpdates": [
- {
- "eventType": "DB_SETUP_ERROR",
- "stage": "SNAPSHOTTING",
- "message": "string",
- "details": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "count": 0,
- "location": {
- "table": "字符串"
}
}
], - "failureError": {
- "errorType": "字符串",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "字符串",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}
}
}
{- "id": "string",
- "projectId": "string",
- "status": "RUNNING",
- "cdcStatus": "NOT_STARTED",
- "verificationJobId": "string",
- "options": {
- "dropCollections": false,
- "mode": "SNAPSHOT",
- "errorHandling": "FAIL",
- "errorTolerance": 0
}, - "jdbcConnectionString": "string",
- "mongoDbConnectionString": "string",
- "atlasMetadata": {
- "mongoDbProjectName": "string",
- "mongoDbProjectId": "string",
- "mongoDbClusterName": "string"
}, - "submittedAt": "2019-08-24T14:15:22Z",
- "statistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "elapsedSeconds": 0,
- "remainingTableCount": 0,
- "processingTables": [
- "string"
], - "totalEventsSeen": 0,
- "snapshotCompleted": false,
- "totalTableCount": 0,
- "totalEvents": 0,
- "totalEventSize": 0
}, - "cdcStatistics": {
- "startedAt": "2019-08-24T14:15:22Z",
- "lastEventTime": "2019-08-24T14:15:22Z",
- "eventsInLastHour": 0,
- "eventsInLastMinute": 0,
- "totalEventsSeen": 0
}, - "jobUpdates": [
- {
- "eventType": "DB_SETUP_ERROR",
- "stage": "SNAPSHOTTING",
- "message": "string",
- "details": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "count": 0,
- "location": {
- "table": "字符串"
}
}
], - "failureError": {
- "errorType": "字符串",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "字符串",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "字符串",
- "rowCount": 0
}, - "property2": {
- "whereClause": "字符串",
- "rowCount": 0
}
}
}
}
[- {
- "id": "string",
- "projectId": "string",
- "name": "string",
- "inputQuery": "string",
- "lastModifiedAt": "2019-08-24T14:15:22Z",
- "queryType": "STORED_PROCEDURE",
- "queryStatus": "NOT_STARTED",
- "targetLanguage": "JAVA"
}
]
创建新的即席查询
projectId 必需 | string (id) ^[A-Za-z0-9\-]+$ 项目 ID |
inputQuery | 字符串 |
{- "inputQuery": "string"
}
{- "id": "string",
- "projectId": "string",
- "input": {
- "database": "string",
- "schema": "string",
- "name": "string",
- "query": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "runScriptTemplate": "string",
- "queryType": "STORED_PROCEDURE"
}, - "output": {
- "query": "string",
- "status": "NOT_STARTED",
- "lastModifiedAt": "2019-08-24T14:15:22Z",
- "language": "JAVA",
- "attemptedTypedEntities": true,
- "usedTypedEntities": false,
- "errorMessage": "string",
- "modified": true,
- "runScriptTemplate": "string",
- "functionName": "string"
}
}
创建批量查询转换作业
projectId 必需 | string (id) ^[A-Za-z0-9\-]+$ 项目 ID |
language 必需 | string (convert-query-language-type) 枚举: "JAVA" "CSHARP" "JAVASCRIPT" |
queries 必需 | 字符串数组 |
attemptTypedEntities | boolean |
{- "language": "JAVA",
- "queries": [
- "string"
], - "attemptTypedEntities": true
}
{- "待处理查询": [
- "string"
], - "正在运行的查询": [
- "string"
], - "已完成的查询": [
- "string"
], - "失败的查询": [
- "string"
]
}
按ID获取查询
projectId 必需 | string (id) ^[A-Za-z0-9\-]+$ 项目 ID |
queryId 必需 | string (id) ^[A-Za-z0-9\-]+$ 查询ID |
{- "query": {
- "id": "string",
- "projectId": "string",
- "input": {
- "database": "string",
- "schema": "string",
- "name": "string",
- "query": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "runScriptTemplate": "string",
- "queryType": "STORED_PROCEDURE"
}, - "output": {
- "query": "string",
- "status": "NOT_STARTED",
- "lastModifiedAt": "2019-08-24T14:15:22Z",
- "language": "JAVA",
- "attemptedTypedEntities": true,
- "usedTypedEntities": false,
- "errorMessage": "string",
- "modified": true,
- "runScriptTemplate": "string",
- "functionName": "string"
}
}, - "convertedRunResult": {
- "id": "string",
- "projectId": "string",
- "executionTimeMs": 0,
- "结果": {
- "data": "字符串",
- "pageNumber": 0,
- "pageSize": 0,
- "total": 0,
- "hasMore": true
}, - "error": "字符串",
- "日志": {
- "stdout": "字符串",
- "stderr": "字符串"
}
}, - "源运行结果": {
- "id": "string",
- "projectId": "string",
- "executionTimeMs": 0,
- "结果": {
- "data": "字符串",
- "pageNumber": 0,
- "pageSize": 0,
- "total": 0,
- "hasMore": true
}, - "error": "字符串",
- "日志": {
- "stdout": "字符串",
- "stderr": "字符串"
}, - "字段元数据映射": {
- "property1": {
- "columnType": "字符串",
- "columnIndex": 0
}, - "property2": {
- "columnType": "字符串",
- "columnIndex": 0
}
}
}
}
转换查询
projectId 必需 | string (id) ^[A-Za-z0-9\-]+$ 项目 ID |
queryId 必需 | string (id) ^[A-Za-z0-9\-]+$ 查询ID |
language 必需 | string (convert-query-language-type) 枚举: "JAVA" "CSHARP" "JAVASCRIPT" |
attemptTypedEntities | boolean 默认: false |
{- "language": "JAVA",
- "attemptTypedEntities": false
}
{- "id": "string",
- "projectId": "string",
- "input": {
- "database": "string",
- "schema": "string",
- "name": "string",
- "query": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "runScriptTemplate": "string",
- "queryType": "STORED_PROCEDURE"
}, - "output": {
- "query": "string",
- "status": "NOT_STARTED",
- "lastModifiedAt": "2019-08-24T14:15:22Z",
- "language": "JAVA",
- "attemptedTypedEntities": true,
- "usedTypedEntities": false,
- "errorMessage": "string",
- "modified": true,
- "runScriptTemplate": "string",
- "functionName": "string"
}
}