下载 OpenAPI 规范:下载
MongoDB Relational Migrator 工具的 OpenAPI 规范
根据项目的映射规则和模式转换生成应用程序代码
projectId 必需 | 字符串 (id) ^[A-Za-z0-9\-]+$ 项目 ID |
collections 必需 | 数组 字符串 要包含在生成代码中的MongoDB集合 |
includeSupportFiles 必需 | 布尔 是否包含支持文件(如果适用于所选语言和框架) |
语言 必需 | 字符串 (codegen- language-type ) 枚举: "JAVA" "CSHARP" "javascript" "JSON" "PYTHON" |
框架 必需 | 字符串 (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 | 字符串^\w+,(DESC|ASC)$ 默认: "submittedAt,DESC" 示例: sort=submittedAt,DESC 检索结果的顺序 |
limit | 整型 示例: limit=20 限制结果 |
类型 | 字符串 (migration-jobs-get-type) 值: "IN_PROGRESS" 示例: type=IN_PROGRESS 仅筛选特定作业类型的作业 |
projectId | 字符串 (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": "string"
}
}
], - "failureError": {
- "errorType": "string",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "string",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "rowCount": 0
}
}
}
}
]
发布新的迁移作业
projectId 必需 | 字符串 |
必需 | 对象 (jdbc-connection-details) |
必需 | 对象 (mongodb-connection-details) |
必需 | 对象 (migration-job-descriptor-options) |
必需 | 对象 (migration-verification) |
对象 (relational-table-filters) 架构 |
{- "projectId": "string",
- "jdbcConnectionDetails": {
- "id": "string",
- "type": "string",
- "url": "string",
- "user": "string",
- "password": "string",
- "savePassword": true,
- "existingConnectionId": "string"
}, - "mongodbConnectionDetails": {
- "id": "string",
- "connectionString": "string",
- "projectId": "string",
- "savePassword": true,
- "projectName": "string",
- "clusterName": "string",
- "hasTimeSeriesCollection": false,
- "existingConnectionId": "string"
}, - "options": {
- "dropCollections": false,
- "mode": "SNAPSHOT",
- "errorHandling": "FAIL",
- "errorTolerance": 0
}, - "verification": {
- "enabled": false
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "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": "string"
}
}
], - "failureError": {
- "errorType": "string",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "string",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "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": "string"
}
}
], - "failureError": {
- "errorType": "string",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "string",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "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": "string"
}
}
], - "failureError": {
- "errorType": "string",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "string",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "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": "string"
}
}
], - "failureError": {
- "errorType": "string",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "string",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "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": "string"
}
}
], - "failureError": {
- "errorType": "string",
- "message": "string",
- "failureAt": "2019-08-24T14:15:22Z",
- "setupError": false
}, - "metadata": {
- "telemetryUserId": "string",
- "verificationRequested": false,
- "verificationStatus": "VERIFYING"
}, - "relationalTableFilters": {
- "property1": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "rowCount": 0
}
}, - "property2": {
- "property1": {
- "whereClause": "string",
- "rowCount": 0
}, - "property2": {
- "whereClause": "string",
- "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 必需 | 字符串 (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",
- "errorMessage": "string",
- "modified": true,
- "runScriptTemplate": "string",
- "functionName": "string"
}
}
创建批量查询转换作业
projectId 必需 | 字符串 (id) ^[A-Za-z0-9\-]+$ 项目 ID |
语言 必需 | 字符串 (convert-query- language-type) 枚举: "JAVA" "CSHARP" "javascript" |
查询 必需 | 数组 字符串 |
{- "language": "JAVA",
- "queries": [
- "string"
]
}
{- "pendingQueries": [
- "string"
], - "runningQueries": [
- "string"
], - "completedQueries": [
- "string"
], - "failedQueries": [
- "string"
]
}
按ID获取查询
projectId 必需 | 字符串 (id) ^[A-Za-z0-9\-]+$ 项目 ID |
queryId 必需 | 字符串 (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",
- "errorMessage": "string",
- "modified": true,
- "runScriptTemplate": "string",
- "functionName": "string"
}
}, - "convertedRunResult": {
- "id": "string",
- "projectId": "string",
- "executionTimeMs": 0,
- "result": {
- "data": "string",
- "pageNumber": 0,
- "pageSize": 0,
- "total": 0,
- "hasMore": true
}, - "error": "string",
- "logs": {
- "stdout": "string",
- "stderr": "string"
}
}, - "sourceRunResult": {
- "id": "string",
- "projectId": "string",
- "executionTimeMs": 0,
- "result": {
- "data": "string",
- "pageNumber": 0,
- "pageSize": 0,
- "total": 0,
- "hasMore": true
}, - "error": "string",
- "logs": {
- "stdout": "string",
- "stderr": "string"
}, - "fieldMetadataMap": {
- "property1": {
- "columnType": "string",
- "columnIndex": 0
}, - "property2": {
- "columnType": "string",
- "columnIndex": 0
}
}
}
}
转换查询
projectId 必需 | 字符串 (id) ^[A-Za-z0-9\-]+$ 项目 ID |
queryId 必需 | 字符串 (id) ^[A-Za-z0-9\-]+$ 查询ID |
语言 必需 | 字符串 (convert-query- language-type) 枚举: "JAVA" "CSHARP" "javascript" |
{- "language": "JAVA"
}
{- "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",
- "errorMessage": "string",
- "modified": true,
- "runScriptTemplate": "string",
- "functionName": "string"
}
}