Post a new migration job

POST /jobs

Post a new migration job

application/json

Body Required

  • projectId string Required
  • jdbcConnectionDetails object Required

    Additional properties are NOT allowed.

    Hide jdbcConnectionDetails attributes Show jdbcConnectionDetails attributes object
    • id string
    • type string Required

      Database type or a custom database type. For example, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, COCKROACHDB, DB2, SQLANYWHERE, SYBASE, SYBASEIQ, or YUGABYTE.

    • url string Required
    • user string
    • password string
    • savePassword boolean

      Default value is false.

    • existingConnectionId string
    • oraclePdbName string
    • isManualUri boolean

      Default value is false.

  • mongodbConnectionDetails object Required

    Additional properties are NOT allowed.

    Hide mongodbConnectionDetails attributes Show mongodbConnectionDetails attributes object
    • id string
    • connectionString string Required
    • projectId string

      Atlas projectId

    • savePassword boolean

      Default value is false.

    • projectName string

      Atlas project name

    • clusterName string

      Atlas cluster name

    • existingConnectionId string
  • options object Required

    Additional properties are NOT allowed.

    Hide options attributes Show options attributes object
    • dropCollections boolean

      Default value is false.

    • mode string Required

      Values are SNAPSHOT, CDC, or CDC_ONLY.

    • errorHandling string

      Values are FAIL, WARN, or SKIP. Default value is FAIL.

    • errorTolerance integer

      The number of failures (on the record level) that should be tolerated before terminating the migration. The value is strictly greater than or equal to.

      Minimum value is 0.

  • verification object Required

    Additional properties are NOT allowed.

    Hide verification attribute Show verification attribute object
    • enabled boolean Required

      Default value is false.

  • relationalTableFilters object

    An object where each key represents a schema name. Each schema contains tables that you can apply table filters on.

    Hide relationalTableFilters attribute Show relationalTableFilters attribute object
    • * object Additional properties

      An object where each key represents a table name within a schema.

      Hide * attribute Show * attribute object
      • * object Additional properties

        Additional properties are NOT allowed.

        Hide * attributes Show * attributes object
        • whereClause string

          Contents of the SQL WHERE clause to filter rows for the specified source table.

        • rowCount integer(int64)

          Optional limit to the number of rows returned from the source table.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string Required

      Format should match the following pattern: ^[A-Za-z0-9\-]+$.

    • projectId string Required

      Format should match the following pattern: ^[A-Za-z0-9\-]+$.

    • status string Required

      Values are RUNNING, FAILED, CANCELLING, CANCELLED, COMPLETED, or CLEANING_UP.

    • cdcStatus string

      Values are NOT_STARTED, RUNNING, COMPLETING, COMPLETED, FAILED, CANCELLED, or PAUSED. Default value is NOT_STARTED.

    • verificationJobId string
    • options object Required

      Additional properties are NOT allowed.

      Hide options attributes Show options attributes object
      • dropCollections boolean

        Default value is false.

      • mode string Required

        Values are SNAPSHOT, CDC, or CDC_ONLY.

      • errorHandling string

        Values are FAIL, WARN, or SKIP. Default value is FAIL.

      • errorTolerance integer

        The number of failures (on the record level) that should be tolerated before terminating the migration. The value is strictly greater than or equal to.

        Minimum value is 0.

    • jdbcConnectionString string
    • mongoDbConnectionString string
    • atlasMetadata object
      Hide atlasMetadata attributes Show atlasMetadata attributes object
      • mongoDbProjectName string
      • mongoDbProjectId string
      • mongoDbClusterName string
    • submittedAt string(date-time) Required
    • statistics object

      Additional properties are NOT allowed.

      Hide statistics attributes Show statistics attributes object
      • startedAt string(date-time)
      • elapsedSeconds integer(int64)
      • remainingTableCount integer
      • processingTables array[string]
      • totalEventsSeen integer(int64)

        Default value is 0.

      • snapshotCompleted boolean

        Default value is false.

      • totalTableCount integer
      • totalEvents integer(int64)
      • totalEventSize integer(int64)
    • cdcStatistics object

      Additional properties are NOT allowed.

      Hide cdcStatistics attributes Show cdcStatistics attributes object
      • startedAt string(date-time)
      • lastEventTime string(date-time)
      • eventsInLastHour integer(int64)

        Default value is 0.

      • eventsInLastMinute integer(int64)

        Default value is 0.

      • totalEventsSeen integer(int64)

        Default value is 0.

    • jobUpdates array[object]
      Hide jobUpdates attributes Show jobUpdates attributes object
      • eventType string Required

        Values are ERROR, WARNING, or INFO.

      • stage string

        Values are SNAPSHOTTING, STREAMING, or VERIFICATION.

      • message string Required
      • details string
      • timestamp string(date-time) Required
      • stackTrace string
      • errorCode string
      • suggestion string
      • locationType string

        Values are TABLE or COLLECTION.

      • locationName string
      • fieldName string
      • key object
        Hide key attribute Show key attribute object
        • * string Additional properties
      • count integer(int64)
      • location object

        One of:
    • failureError object

      Additional properties are NOT allowed.

      Hide failureError attributes Show failureError attributes object
      • errorType string Required
      • message string Required
      • failureAt string(date-time) Required
      • setupError boolean Required

        Default value is false.

    • metadata object

      Additional properties are NOT allowed.

      Hide metadata attributes Show metadata attributes object
      • telemetryUserId string
      • verificationRequested boolean

        Default value is false.

      • verificationStatus string

        Values are VERIFYING, FAILED, CANCELLING, CANCELLED, VERIFIED, or ABORTED.

    • relationalTableFilters object

      An object where each key represents a schema name. Each schema contains tables that you can apply table filters on.

      Hide relationalTableFilters attribute Show relationalTableFilters attribute object
      • * object Additional properties

        An object where each key represents a table name within a schema.

        Hide * attribute Show * attribute object
        • * object Additional properties

          Additional properties are NOT allowed.

          Hide * attributes Show * attributes object
          • whereClause string

            Contents of the SQL WHERE clause to filter rows for the specified source table.

          • rowCount integer(int64)

            Optional limit to the number of rows returned from the source table.

  • 440 application/json

    Invalid as connection string did not contain a database name

    Hide response attributes Show response attributes object
    • jobId string

      Format should match the following pattern: ^[A-Za-z0-9\-]+$.

    • message string Required
    • description string
    • timestamp string(date-time) Required
  • 470 application/json

    Migration job already running

    Hide response attributes Show response attributes object
    • jobId string

      Format should match the following pattern: ^[A-Za-z0-9\-]+$.

    • message string Required
    • description string
    • timestamp string(date-time) Required
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • jobId string

      Format should match the following pattern: ^[A-Za-z0-9\-]+$.

    • message string Required
    • description string
    • timestamp string(date-time) Required
POST /jobs
curl \ --request POST 'http://127.0.0.1:8278/api/v1/jobs' \ --header "Content-Type: application/json" \ --data '{"projectId":"string","jdbcConnectionDetails":{"id":"string","type":"ORACLE","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","existingConnectionId":"string"},"options":{"dropCollections":false,"mode":"SNAPSHOT","errorHandling":"FAIL","errorTolerance":42},"verification":{"enabled":false},"relationalTableFilters":{"schema_1_name":{"table_1_name":{"whereClause":"id \u003e 1000 AND id \u003c= 2000"},"table_2_name":{"rowCount":10,"whereClause":"TRUE"}}}}'
Request examples
{ "projectId": "string", "jdbcConnectionDetails": { "id": "string", "type": "ORACLE", "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", "existingConnectionId": "string" }, "options": { "dropCollections": false, "mode": "SNAPSHOT", "errorHandling": "FAIL", "errorTolerance": 42 }, "verification": { "enabled": false }, "relationalTableFilters": { "schema_1_name": { "table_1_name": { "whereClause": "id > 1000 AND id <= 2000" }, "table_2_name": { "rowCount": 10, "whereClause": "TRUE" } } } }
Response examples (200)
{ "id": "string", "projectId": "string", "status": "RUNNING", "cdcStatus": "NOT_STARTED", "verificationJobId": "string", "options": { "dropCollections": false, "mode": "SNAPSHOT", "errorHandling": "FAIL", "errorTolerance": 42 }, "jdbcConnectionString": "string", "mongoDbConnectionString": "string", "atlasMetadata": { "mongoDbProjectName": "string", "mongoDbProjectId": "string", "mongoDbClusterName": "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 }, "jobUpdates": [ { "eventType": "ERROR", "stage": "SNAPSHOTTING", "message": "string", "details": "string", "timestamp": "2025-05-04T09:42:00Z", "stackTrace": "string", "errorCode": "string", "suggestion": "string", "locationType": "TABLE", "locationName": "string", "fieldName": "string", "key": { "additionalProperty1": "string", "additionalProperty2": "string" }, "count": 42, "": { "table": "string" } } ], "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" } } } }
Response examples (440)
{ "jobId": "string", "message": "string", "description": "string", "timestamp": "2025-05-04T09:42:00Z" }
Response examples (470)
{ "jobId": "string", "message": "string", "description": "string", "timestamp": "2025-05-04T09:42:00Z" }
Response examples (500)
{ "jobId": "string", "message": "string", "description": "string", "timestamp": "2025-05-04T09:42:00Z" }