MongoDB Relational Migrator REST API (1.10.0)

Download OpenAPI specification:Download

OpenAPI specification for MongoDB Relational Migrator tool

Codegen

Code generation based on project mappings

generateCode

Generates application code based on your project's mapping rules and schema transformations

path Parameters
projectId
required
string (id) ^[A-Za-z0-9\-]+$

Project ID

Request Body schema: application/json
collections
required
Array of strings

MongoDB collections to include in generated code

includeSupportFiles
required
boolean

Whether to include support files, if applicable for the selected language and framework

language
required
string (codegen-language-type)
Enum: "JAVA" "CSHARP" "JAVASCRIPT" "JSON" "PYTHON"
framework
required
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"

Responses

Request samples

Content type
application/json
{
  • "collections": [
    ],
  • "includeSupportFiles": true,
  • "language": "JAVA",
  • "framework": "POJO"
}

Response samples

Content type
application/json
{
  • "language": "JAVA",
  • "framework": "POJO",
  • "files": [
    ]
}

getCodegenMetadata

Gets the available languages and frameworks for code generation

path Parameters
projectId
required
string (id) ^[A-Za-z0-9\-]+$

Project ID

Responses

Response samples

Content type
application/json
{
  • "metadata": [
    ]
}

Job

Data migration

getJobs

Get all migration jobs

query Parameters
sort
string^\w+,(DESC|ASC)$
Default: "submittedAt,DESC"
Example: sort=submittedAt,DESC

Order in which to retrieve the results

limit
integer
Example: limit=20

Limit the results

type
string (migration-jobs-get-type)
Value: "IN_PROGRESS"
Example: type=IN_PROGRESS

Filter jobs to only of a specific job type

projectId
string (id) ^[A-Za-z0-9\-]+$

Filter jobs by projectId

Responses

Response samples

Content type
application/json
[
  • {
    }
]

createJob

Post a new migration job

Request Body schema: application/json
projectId
required
string
required
object (jdbc-connection-details)
required
object (mongodb-connection-details)
required
object (migration-job-descriptor-options)
required
object (migration-verification)
object (relational-table-filters)

Schema

Responses

Request samples

Content type
application/json
{
  • "projectId": "string",
  • "jdbcConnectionDetails": {
    },
  • "mongodbConnectionDetails": {
    },
  • "options": {
    },
  • "verification": {
    },
  • "relationalTableFilters": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "projectId": "string",
  • "status": "RUNNING",
  • "cdcStatus": "NOT_STARTED",
  • "verificationJobId": "string",
  • "options": {
    },
  • "jdbcConnectionString": "string",
  • "mongoDbConnectionString": "string",
  • "atlasMetadata": {
    },
  • "submittedAt": "2019-08-24T14:15:22Z",
  • "statistics": {
    },
  • "cdcStatistics": {
    },
  • "jobUpdates": [
    ],
  • "failureError": {
    },
  • "metadata": {
    },
  • "relationalTableFilters": {
    }
}

getJob

Get the status of a migration job by ID

path Parameters
jobId
required
string (id) ^[A-Za-z0-9\-]+$

Job ID

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "projectId": "string",
  • "status": "RUNNING",
  • "cdcStatus": "NOT_STARTED",
  • "verificationJobId": "string",
  • "options": {
    },
  • "jdbcConnectionString": "string",
  • "mongoDbConnectionString": "string",
  • "atlasMetadata": {
    },
  • "submittedAt": "2019-08-24T14:15:22Z",
  • "statistics": {
    },
  • "cdcStatistics": {
    },
  • "jobUpdates": [
    ],
  • "failureError": {
    },
  • "metadata": {
    },
  • "relationalTableFilters": {
    }
}

pauseJob

Pause a running migration job

path Parameters
jobId
required
string (id) ^[A-Za-z0-9\-]+$

Job ID

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "projectId": "string",
  • "status": "RUNNING",
  • "cdcStatus": "NOT_STARTED",
  • "verificationJobId": "string",
  • "options": {
    },
  • "jdbcConnectionString": "string",
  • "mongoDbConnectionString": "string",
  • "atlasMetadata": {
    },
  • "submittedAt": "2019-08-24T14:15:22Z",
  • "statistics": {
    },
  • "cdcStatistics": {
    },
  • "jobUpdates": [
    ],
  • "failureError": {
    },
  • "metadata": {
    },
  • "relationalTableFilters": {
    }
}

resumeJob

Resume a paused migration job

path Parameters
jobId
required
string (id) ^[A-Za-z0-9\-]+$

Job ID

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "projectId": "string",
  • "status": "RUNNING",
  • "cdcStatus": "NOT_STARTED",
  • "verificationJobId": "string",
  • "options": {
    },
  • "jdbcConnectionString": "string",
  • "mongoDbConnectionString": "string",
  • "atlasMetadata": {
    },
  • "submittedAt": "2019-08-24T14:15:22Z",
  • "statistics": {
    },
  • "cdcStatistics": {
    },
  • "jobUpdates": [
    ],
  • "failureError": {
    },
  • "metadata": {
    },
  • "relationalTableFilters": {
    }
}

stopJob

Stop a running migration job

path Parameters
jobId
required
string (id) ^[A-Za-z0-9\-]+$

Job ID

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "projectId": "string",
  • "status": "RUNNING",
  • "cdcStatus": "NOT_STARTED",
  • "verificationJobId": "string",
  • "options": {
    },
  • "jdbcConnectionString": "string",
  • "mongoDbConnectionString": "string",
  • "atlasMetadata": {
    },
  • "submittedAt": "2019-08-24T14:15:22Z",
  • "statistics": {
    },
  • "cdcStatistics": {
    },
  • "jobUpdates": [
    ],
  • "failureError": {
    },
  • "metadata": {
    },
  • "relationalTableFilters": {
    }
}

Project

Captures relational schemas and mappings

getProjects

Get all projects

query Parameters
sort
string^\w+,(DESC|ASC)$
Default: "lastModified,DESC"
Example: sort=lastModified,DESC

Order in which to retrieve the results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Query

Query conversion

getQueries

Get a summary of all queries related to a project

path Parameters
projectId
required
string (id) ^[A-Za-z0-9\-]+$

Project ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

createQuery

Create a new adhoc query

path Parameters
projectId
required
string (id) ^[A-Za-z0-9\-]+$

Project ID

Request Body schema: application/json
inputQuery
string

Responses

Request samples

Content type
application/json
{
  • "inputQuery": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "projectId": "string",
  • "input": {
    },
  • "output": {
    }
}

stopBulkQueryConversion

Stop a running bulk query conversion job

path Parameters
projectId
required
string (id) ^[A-Za-z0-9\-]+$

Project ID

Responses

Response samples

Content type
application/json
{
  • "pendingQueries": [
    ],
  • "runningQueries": [
    ],
  • "completedQueries": [
    ],
  • "failedQueries": [
    ]
}

getBulkQueryConversion

Get the status of a bulk query conversion job

path Parameters
projectId
required
string (id) ^[A-Za-z0-9\-]+$

Project ID

Responses

Response samples

Content type
application/json
{
  • "pendingQueries": [
    ],
  • "runningQueries": [
    ],
  • "completedQueries": [
    ],
  • "failedQueries": [
    ]
}

createBulkQueryConversion

Create a bulk query conversion job

path Parameters
projectId
required
string (id) ^[A-Za-z0-9\-]+$

Project ID

Request Body schema: application/json
language
required
string (convert-query-language-type)
Enum: "JAVA" "CSHARP" "JAVASCRIPT"
queries
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "language": "JAVA",
  • "queries": [
    ]
}

Response samples

Content type
application/json
{
  • "pendingQueries": [
    ],
  • "runningQueries": [
    ],
  • "completedQueries": [
    ],
  • "failedQueries": [
    ]
}

deleteQuery

Delete a query by id

path Parameters
projectId
required
string (id) ^[A-Za-z0-9\-]+$

Project ID

queryId
required
string (id) ^[A-Za-z0-9\-]+$

Query ID

Responses

Response samples

Content type
application/json
{
  • "jobId": "string",
  • "message": "string",
  • "description": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

getQuery

Get a query by id

path Parameters
projectId
required
string (id) ^[A-Za-z0-9\-]+$

Project ID

queryId
required
string (id) ^[A-Za-z0-9\-]+$

Query ID

Responses

Response samples

Content type
application/json
{
  • "query": {
    },
  • "convertedRunResult": {
    },
  • "sourceRunResult": {
    }
}

convertQuery

Convert a query

path Parameters
projectId
required
string (id) ^[A-Za-z0-9\-]+$

Project ID

queryId
required
string (id) ^[A-Za-z0-9\-]+$

Query ID

Request Body schema: application/json
language
required
string (convert-query-language-type)
Enum: "JAVA" "CSHARP" "JAVASCRIPT"

Responses

Request samples

Content type
application/json
{
  • "language": "JAVA"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "projectId": "string",
  • "input": {
    },
  • "output": {
    }
}