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 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.

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

Retrieves information about replication schedules.

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
maxCommands query Maximum number of commands to include in the history of replication schedules. By default, it has no limit. Pass 0 to explicitly set to unlimited. 0
maxErrors query Maximum number of errors per Hive replication command. By default, it has no limit. Pass 0 to explicitly set to unlimited. 0
maxSchedules query Maximum number of replication schedules to be included in the response. By default, it has no limit. Pass 0 to explicitly set to unlimited. 0
maxTables query Maximum number of tables per Hive replication command. By default, it has no limit. Pass 0 to explicitly set to unlimited. 0
view query The view to materialize. 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/createCloudCredstoreOnHdfs

Creates a credstore provider jceks file on HDFS for the given service. The file will store credential information for the given sourceAccount.

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
force query if the jceks file already exists on HDFS and this parameter is set to true then it will be recreated, otherwise left untouched n/a
sourceAccount query the External Account that has been already added to this CM, for which the credstore provider jceks file will be generated n/a
Response Body
media type data type description
application/json ApiCommand (JSON) command for creating the Hive3 credstore

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

This method has been deprecated.

Use the following API endpoint instead: com.cloudera.api.v50.ReplicationsResourceV50#createCloudCredstoreOnHdfs(String, boolean)

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
credstoreDirPath query n/a
force query n/a
sourceAccount query n/a
Response Body
media type data type description
application/json ApiCommand (JSON)

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

Exports the given Atlas Entities (defined in the API body) to a zipped file in hdfs.

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 ApiAtlasReplicationRemoteArgs (JSON)
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

Exports the given Ranger services and policies (defined in the API body) to a zipped file.

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 ApiRangerReplicationExportArgs (JSON) the arguments for the export operation. Contains the Ranger services to be exported.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

(Re)generates the cloud credential provider password, used by the given service, for replicating to the cloud.
Calling this API endpoint may cause staleness for the given service.
NOTE: If this API endpoint REGENERATED the credstore password successfully and there are existing credstore provider jceks files on HDFS, protected by this password, then these jceks files should be recreated by using the following API endpoint: #recreateCloudCredstoresOnHdfs().

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
passwordGenerateMode query the CloudReplPasswordGenerateMode to be used for regenerating the password. n/a
Response Body
media type data type description
application/json boolean (JSON) true if the credential provider password was regenerated, otherwise false if it was untouched.

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.

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

Recreates the existing credential provider jceks files on HDFS, that are used by the given service, for replicating to the cloud.

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 ApiCommand (JSON) command for recreating the credential provider jceks files

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.

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

Update HBase peer state ('DISABLE' or 'ENABLE'),
and set the related HBase replication schedules

ApiHBaseReplicationArguments.peerState
for the given peer name (all schedules for the same source and target HBase service) according to the given state ('DISABLED' or 'ENABLED').
 example json data payload:
 '{
    "sourceRef": {
      "peerName": "source-peer-name",
      "clusterName": "Cluster Name",
      "serviceName": "HBase Service Name"
    }
    "peerState": "ENABLED|DISABLED"
  }'
 

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 ApiHBaseReplicationUpdatePeerStateArgs (JSON) ApiHBaseReplicationUpdatePeerStateArgs
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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/operations/addReplicationPeer

Starts a command that adds a new replication peer to HBase.

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 ApiHBaseAddReplicationPeerInput (JSON) Information for peer creation.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

Starts a command that adds tables and column families to an existing HBase replication peer.

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 ApiHBasePeerIdWithTableCFs (JSON) Arguments for the operation.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

Starts a command that checks if the specified tables exist in HBase.

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 ApiHBaseTableNames (JSON) Names of the tables to be checked.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

Starts a command that fetches column families for the desired tables.

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 ApiHBaseTableNames (JSON) Names of tables to query for column families.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

Starts a command that fetches column families for the desired tables.

Request Parameters
name type description default
clusterName path n/a
serviceName path The service name. n/a
whereReplicationSet query Whether to retrieve column families of only those tables where there is at least one column family with replication scope set to 1. false
Request Body
media type data type description
application/json ApiHBaseTableNames (JSON) Names of tables to query for column families.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

Starts a command that fetches information about an HBase peer by its ID.

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 ApiHBasePeerId (JSON) ID of the fetched peer.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

Starts a command that lists all namespaces in HBase.

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 ApiCommand (JSON) Information about the started command.

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

Starts a command that retrieves all peers registered in the HBase service.

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 ApiCommand (JSON) Information about the started command.

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

Starts a command that lists tables from the HBase service.

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 ApiCommand (JSON) Information about the started command.

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

Starts a command that removes the specified HBase replication peer from the local HBase service.

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 ApiHBasePeerId (JSON) ID of the peer to be removed.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

Starts a command that removes tables and column families from an existing HBase replication peer.

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 ApiHBasePeerIdWithTableCFs (JSON) Arguments for removing tables from HBase replication peer.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

Starts a command that set the replication scope of the provided column families to the desired value.

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 ApiHBaseSetCFsReplicationScope (JSON) Arguments for setting the replication scope.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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

Starts a command that updates the state of an existing HBase replication peer.

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 ApiHBaseUpdateReplicationPeerState (JSON) Arguments for operation.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the started command.

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.

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. Optional, default value is 20. 20
offset query Index of first command to retrieve. Optional, default value is 0. 0
sort query The list of fields to order by. The value passed should be in the format of orderBy=field1:asc,field2:desc, where field1 will have the highest precedence. For every field provided, asc or also has to be provided. This param is optional, default behaviour is descending ordering by start time. n/a
status query Desired status of retrieved commands. Optional, default behaviour is not applying any filtering, and returning all commands. Check ApiReplicationHistoryItemStatus for possible values. n/a
view query The view to materialize. Optional, default is summary. summary
Response Body
media type data type description
application/json ApiReplicationCommandList (JSON) List of commands.

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

Starts a command that executes PostCopyReconciliation steps on a schedule.

Request Parameters
name type description default
clusterName path n/a
scheduleId path n/a
serviceName path The service name. n/a
pcrEnableCrcCheck query true
pcrEnableLengthCheck query true
pcrEnableModtimeCheck query true
Response Body
media type data type description
application/json ApiCommand (JSON)

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.

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

Executes a command to run a HBase replication retry on failed snapshots for the given schedule ID

Request Parameters
name type description default
clusterName path n/a
scheduleId path The HBase schedule ID to retry on n/a
serviceName path The service name. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) command to run hbase replication retry on failed snapshots