Baixe a especificação OpenAPI:Baixar
Especificação OpenAPI para a ferramenta MongoDB Relational Migrator
Gera código de aplicação com base nas regras de mapeamento e transformações de esquema do seu projeto
projectId necessário | string (id) ^[A-Za-z0-9\-]+$ ID do Projeto |
collections necessário | Array de strings Coleções MongoDB para incluir no código gerado |
includeSupportFiles necessário | booleano Se incluir arquivos de suporte, se aplicável para o idioma e estrutura selecionados |
Linguagem necessário | string (codegen-language-type) Enum: "JAVA" "CSHARP" "javascript" "JSON" "PYTHON" |
Framework necessário | string (codegen-framework-type) Enum: "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"
}
]
}
Obtém as linguagens e estruturas disponíveis para geração de código
projectId necessário | string (id) ^[A-Za-z0-9\-]+$ ID do Projeto |
{- "metadata": [
- {
- "language": "JAVA",
- "frameworks": [
- {
- "hasSupportFiles": true,
- "framework": "POJO"
}
]
}
]
}
Obter todos os trabalhos de migração
sort | string^\w+,(DESC|ASC)$ Padrão: "submittedAt,DESC" Exemplo: sort=submittedAt,DESC Ordem na qual recuperar os resultados |
limit | inteiro Exemplo: limit=20 Limite os resultados |
type | string (migration-jobs-get-type) Valor: "IN_PROgress" Exemplo: type=IN_PROgress Filtrar trabalhos para apenas de um tipo de tarefa específico |
projectId | string (id) ^[A-Za-z0-9\-]+$ Filtrar tarefas por 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
}
}
}
}
]
Postar uma nova tarefa de migração
projectId necessário | string |
necessário | objeto (jdbc-connection-strings) |
necessário | objeto (mongodb-connection- Details) |
necessário | objeto (migration-job-descriptor-options) |
necessário | objeto (migration-verification) |
objeto (relational-table-filters) Esquema |
{- "projectId": "string",
- "jdbcConnectionDetails": {
- "id": "string",
- "type": "string",
- "url": "string",
- "user": "string",
- "password": "string",
- "savePassword": false,
- "existingConnectionId": "string",
- "oraclePdbName": "string",
- "isManualUri": false
}, - "mongodbConnectionDetails": {
- "id": "string",
- "connectionString": "string",
- "projectId": "string",
- "savePassword": false,
- "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
}
}
}
}
Obtenha o status de um tarefa de migração por ID
jobId necessário | string (id) ^[A-Za-z0-9\-]+$ jobId |
{- "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
}
}
}
}
Pausar uma tarefa de migração em execução
jobId necessário | string (id) ^[A-Za-z0-9\-]+$ jobId |
{- "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
}
}
}
}
Retomar um tarefa de migração pausado
jobId necessário | string (id) ^[A-Za-z0-9\-]+$ jobId |
{- "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
}
}
}
}
Interromper uma tarefa de migração em execução
jobId necessário | string (id) ^[A-Za-z0-9\-]+$ jobId |
{- "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
}
}
}
}
Obter todos os projetos
sort | string^\w+,(DESC|ASC)$ Padrão: "lastModified,DESC" Exemplo: sort=lastModified,DESC Ordem na qual recuperar os resultados |
[- {
- "id": "string",
- "jdbcId": "string",
- "mongodbId": "string",
- "name": "string",
- "type": "string",
- "lastModified": "2019-08-24T14:15:22Z"
}
]
Obtenha um resumo de todas as consultas relacionadas a um projeto
projectId necessário | string (id) ^[A-Za-z0-9\-]+$ ID do Projeto |
[- {
- "id": "string",
- "projectId": "string",
- "name": "string",
- "inputQuery": "string",
- "lastModifiedAt": "2019-08-24T14:15:22Z",
- "queryType": "STORED_PROCEDURE",
- "queryStatus": "NOT_STARTED",
- "targetLanguage": "JAVA"
}
]
Criar uma nova query adhoc
projectId necessário | string (id) ^[A-Za-z0-9\-]+$ ID do Projeto |
inputQuery | string |
{- "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"
}
}
Interromper uma tarefa de conversão de query em massa
projectId necessário | string (id) ^[A-Za-z0-9\-]+$ ID do Projeto |
{- "pendingQueries": [
- "string"
], - "runningQueries": [
- "string"
], - "completedQueries": [
- "string"
], - "failedQueries": [
- "string"
]
}
Obtenha o status de uma tarefa de conversão de query em massa
projectId necessário | string (id) ^[A-Za-z0-9\-]+$ ID do Projeto |
{- "pendingQueries": [
- "string"
], - "runningQueries": [
- "string"
], - "completedQueries": [
- "string"
], - "failedQueries": [
- "string"
]
}
Criar um tarefa de conversão de query em massa
projectId necessário | string (id) ^[A-Za-z0-9\-]+$ ID do Projeto |
Linguagem necessário | string (convert-query-language-type) Enum: "JAVA" "CSHARP" "javascript" |
queries necessário | Array de strings |
tryTypedEntities | booleano |
{- "language": "JAVA",
- "queries": [
- "string"
], - "attemptTypedEntities": true
}
{- "pendingQueries": [
- "string"
], - "runningQueries": [
- "string"
], - "completedQueries": [
- "string"
], - "failedQueries": [
- "string"
]
}
Excluir uma query por ID
projectId necessário | string (id) ^[A-Za-z0-9\-]+$ ID do Projeto |
queryId necessário | string (id) ^[A-Za-z0-9\-]+$ ID da Consulta |
{- "jobId": "string",
- "message": "string",
- "description": "string",
- "timestamp": "2019-08-24T14:15:22Z"
}
Obter uma query por ID
projectId necessário | string (id) ^[A-Za-z0-9\-]+$ ID do Projeto |
queryId necessário | string (id) ^[A-Za-z0-9\-]+$ ID da Consulta |
{- "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,
- "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
}
}
}
}
Converter uma query
projectId necessário | string (id) ^[A-Za-z0-9\-]+$ ID do Projeto |
queryId necessário | string (id) ^[A-Za-z0-9\-]+$ ID da Consulta |
Linguagem necessário | string (convert-query-language-type) Enum: "JAVA" "CSHARP" "javascript" |
tryTypedEntities | booleano Padrão: 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"
}
}