Replication API reference

A Replication job is a CDAP application, and can be managed with CDAP REST APIs.

Create a Replication job

Use the CDAP application deployment API to create a Replication job.

PUT -H "Authorization: Bearer ${AUTH_TOKEN}" "${CDAP_ENDPOINT}/v3/namespaces/namespace-id/apps/replicator-name"
Parameter Description
namespace-id The namespace in which to create the Replication job. If your pipeline belongs to a Basic edition instance, the namespace ID is always default. If your pipeline belongs to an Enterprise edition instance, you can create a namespace.
replicator-name Replicator name

Example Config

The following (partial) config of the app is sent in the API request body:

{
  "resources": {
    "vcores": 4,
    "memoryMB": 4096
  },
  "stages": [
    {
      "name": "my-oracle-db",
      "plugin": {
        "name": "oracle",
        "type": "cdc-origin",
        "artifact": {
          "scope": "SYSTEM",
          "name": "cdc-oracle",
          "version": "0.1.0"
        },
        "properties": {
          "user": "myuser",
          "password": "${secure(xyz)}",
          ...
        }
      }
    },
    {
      "name": "my-bq-dataset",
      "plugin": {
        "name": "bigquery",
        "type": "cdc-destination",
        "artifact": { ... },
        "properties": { ... }
      }
    }
  ],
  "connections": [
    { "from": "my-oracle-db", "to": "my-bq-dataset" }
  ]
}

See the CDAP application deployment API for more information.

List Replication jobs

Use the CDAP application list API to list Replication jobs.

GET -H "Authorization: Bearer ${AUTH_TOKEN}" "${CDAP_ENDPOINT}/v3/namespaces/namespace-id/apps"
Parameter Description
namespace-id The namespace of the Replication jobs to list. If your pipeline belongs to a Basic edition instance, the namespace ID is always default.

See the CDAP application list API for more information.

View Replication job details

Use the CDAP application detail API to view the details of a Replication job.

GET -H "Authorization: Bearer ${AUTH_TOKEN}" "${CDAP_ENDPOINT}/v3/namespaces/namespace-id/apps/replicator-name"
Parameter Description
namespace-id The namespace of the Replication job to view. If your pipeline belongs to a Basic edition instance, the namespace ID is always default.
replicator-name Replicator name

See the CDAP application detail API for more information.

Start a Replication job

Use the CDAP program start API to start a Replication job.

POST -H "Authorization: Bearer ${AUTH_TOKEN}" "${CDAP_ENDPOINT}/v3/namespaces/namespace-id/apps/replicator-name/workers/DeltaWorker/start"
Parameter Description
namespace-id The namespace of the Replication job to start. If your pipeline belongs to a Basic edition instance, the namespace ID is always default.
replicator-name Replicator name

See the CDAP program start API for more information.

Stop a Replication job

Use the CDAP program stop API to stop a Replication job.

POST -H "Authorization: Bearer ${AUTH_TOKEN}" "${CDAP_ENDPOINT}/v3/namespaces/namespace-id/apps/replicator-name/workers/DeltaWorker/stop"
Parameter Description
namespace-id The namespace of the Replication job to stop. If your pipeline belongs to a Basic edition instance, the namespace ID is always default.
replicator-name Replicator name

See the CDAP program stop API for more information.