ReplicationsResource Resource

DELETE /clusters/{clusterName}/services/{serviceName}/replications

Deletes all existing replication schedules.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
Response Body
media type data type description
application/json ApiReplicationScheduleList (JSON) List of deleted replication schedules.

GET /clusters/{clusterName}/services/{serviceName}/replications

Returns information for all replication schedules.

Available since API v11.

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
limits query Various limits on contents of returned schedules. n/a
Response Body
media type data type description
application/json ApiReplicationScheduleList (JSON) List of replication schedules.

GET /clusters/{clusterName}/services/{serviceName}/replications

Returns information for all replication schedules.

Available since API v32.

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
view query provides summary or detailed view, default is summary summary
Response Body
media type data type description
application/json ApiReplicationScheduleList (JSON) List of replication schedules.

POST /clusters/{clusterName}/services/{serviceName}/replications

Creates one or more replication schedules.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
Request Body
media type data type description
application/json ApiReplicationScheduleList (JSON) List of the replication schedules to create.
Response Body
media type data type description
application/json ApiReplicationScheduleList (JSON) List of newly added replication schedules.

POST /clusters/{clusterName}/services/{serviceName}/replications/hbaseReplicationSecurityTool

Run the hbase replication security tool

The replication security tool is invoked against the provided arguments

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
Request Body
media type data type
application/json map of string (JSON)
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/services/{serviceName}/replications/hbaseReplicationValidationTool

Executes a command, which validates if HBase replication works properly for the given hbasePeerId

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
hbasePeerId query The HBase peer ID to be validated n/a
Response Body
media type data type description
application/json ApiCommand (JSON) command to run hbase replication validation tool

POST /clusters/{clusterName}/services/{serviceName}/replications/hdfsCopyListing

Run the hdfs copy listing command

The copy listing command will be triggered with the provided arguments

Available since API v18. Only available with Cloudera Manager Enterprise Edition.

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/services/{serviceName}/replications/hiveReplicationQuery

Execute a hive replication query on local HS2 service instance

The command executes hive replication query on local HS2 instance with the provided arguments

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
Request Body
media type data type
application/json ApiHive3ReplicationArguments (JSON)
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

GET /clusters/{clusterName}/services/{serviceName}/replications/isHive3ReverseDirectionEnabled

This API endpoint checks if there is an ENABLED Hive3 replication policy on this server that replicates for the reverse direction. Bidirectional Hive3 replication policies are allowed, but only one direction can be ENABLED at the same time.

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
clusterUuidOnRemote query the uuid of the cluster on the remote CM server n/a
serviceNameOnRemote query the Hive3 service name on the remote CM server, more specifically on the cluster specified by clusterUuidOnRemote n/a
sourceDbNameOnRemote query the name of the source database on the remote CM server n/a
targetDbNameOnRemote query the name of the target database on the remote CM server n/a
Response Body
media type data type description
application/json boolean (JSON) true if there is an ENABLED Hive3 replication policy on this server, that replicates the given databases but for the reverse direction, otherwise false.

GET /clusters/{clusterName}/services/{serviceName}/replications/replicationState

returns the replication state. for example if incremental export is enabled, etc

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
view query view to materialize summary
Response Body
media type data type description
application/json ApiReplicationState (JSON) replicate state object.

POST /clusters/{clusterName}/services/{serviceName}/replications/rescheduleHive3ReplicationMetricsGetter

Set the Hive3 Replication Metrics Getter next start time.

(Re)set the Hive3 Replication Metrics Getter next start time. Should be only used if the Getter needs to be manually started.

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
nextStartMins query 5
Response Body
media type data type description
application/json boolean (JSON) success or not.

DELETE /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}

Deletes an existing replication schedule.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Request Parameters
name type description default
clusterName path n/a
scheduleId path Id of an existing replication schedule. n/a
serviceName path The service name. n/a
Response Body
media type data type description
application/json ApiReplicationSchedule (JSON) The deleted replication schedule.

GET /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}

Returns information for a specific replication schedule.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Request Parameters
name type description default
clusterName path n/a
scheduleId path Id of an existing replication schedule. n/a
serviceName path The service name. n/a
view query The view to materialize. summary
Response Body
media type data type description
application/json ApiReplicationSchedule (JSON) Replication schedule.

PUT /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}

Updates an existing replication schedule.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Request Parameters
name type description default
clusterName path n/a
scheduleId path Id of an existing replication schedule. n/a
serviceName path The service name. n/a
Request Body
media type data type
application/json ApiReplicationSchedule (JSON)
Response Body
media type data type description
application/json ApiReplicationSchedule (JSON) The replication schedule after the update.

POST /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/collectDiagnosticData

Collect diagnostic data for a schedule, optionally for a subset of commands on that schedule, matched by schedule ID. The returned command's resultDataUrl property, upon the commands completion, will refer to the generated diagnostic data. Available since API v11.

Request Parameters
name type description default
clusterName path n/a
scheduleId path Schedule ID n/a
serviceName path The service name. n/a
view query view to materialize summary
Request Body
media type data type description
application/json ApiReplicationDiagnosticsCollectionArgs (JSON) Replication collection arguments
Response Body
media type data type description
application/json ApiCommand (JSON) Command generated to collect the diagnostics data.

DELETE /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/forcedDelete

Deletes an existing replication schedule only from the DB.

Only the DB schedule reference is deleted with no further cleanup on the source or target side. Typically this endpoint can be used when the source cluster is not available any more and normal policy delete fails during cleanup. Available since API v46. Only available with Cloudera Manager Enterprise Edition.

Request Parameters
name type description default
clusterName path n/a
scheduleId path Id of an existing replication schedule. n/a
serviceName path The service name. n/a
Response Body
media type data type description
application/json ApiReplicationSchedule (JSON) The deleted replication schedule.

GET /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/history

Returns a list of commands triggered by a schedule.

Request Parameters
name type description default
clusterName path n/a
scheduleId path Id of an existing replication schedule. n/a
serviceName path The service name. n/a
limit query Maximum number of commands to retrieve. 20
offset query Index of first command to retrieve. 0
view query The view to materialize. summary
Response Body
media type data type description
application/json ApiReplicationCommandList (JSON) List of commands for the schedule.

POST /clusters/{clusterName}/services/{serviceName}/replications/{scheduleId}/run

Run the schedule immediately.

The replication command will be triggered with the configured arguments, and will be recorded in the schedule's history.

Available since API v3. Only available with Cloudera Manager Enterprise Edition.

Request Parameters
name type description default
clusterName path n/a
scheduleId path Id of an existing replication schedule. n/a
serviceName path The service name. n/a
dryRun query Whether to execute a dry run. false
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.