API Actions: FinalizeReplication

API Actions: FinalizeReplication

Supported in product version 12.44 and above. Applicable only if the replication was initiated with replication method ContinuousWithSemiAutoSeeding.

Request Syntax

JSON

POST /api/FinalizeReplication HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/json
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74
 
{
	"replicationId": "XXXXXXX-c158-4689-93ff-6d50ce4f0547",
	"authenticationType": "SqlServerAuthentication", --  or ActiveDirectoryIntegratedAuthentication 
	"server": "{ReplicaEndPoint}",
	"database": "{replicaDatabsse}",
	"username": "{replicaUser}",
	"password": "{replicaPPassword}",
	"disableReplicaCt": true // Applicable to Change Tracking only. Not applicable to CDC (CDC status is not transferred via backup-restore)
}

 

XML

POST /api/FinalizeReplication HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/xml
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74
 
<FinalizeReplicationRequest>
	<ReplicationId>776a11e1-c158-4689-93ff-6d50ce4f0547</ReplicationId>
	<AuthenticationType>SqlServerAuthentication</AuthenticationType> 
	<Server>your-server</Server>
	<Database>your_database</Database>
	<Username>your_username</Username>
	<Password>your_password</Password> 
	<DisableReplicaCt>false</DisableReplicaCt> 
        <!--
        <DisableReplicaCdc>false</DisableReplicaCdc>
        --> 

</FinalizeReplicationRequest>

 

Request Parameters

Parameter Description Required
ReplicationId The ID returned by /api/CreateReplication. Yes
Type: String
Default: None
AuthenticationType& SqlServerAuthentication or ActiveDirectoryIntegratedAuthentication Yes
Type: String
Default: None
Valid value: SqlServerAuthentication/ActiveDirectoryAuthentication
Server The End Point of the destination/replica server Yes
Type: String
Default: None
Database The database name Yes
Type: String
Default: None
Username The login name to the destination/replica server Yes
Type: String
Default: None
Password Password Yes
Type: String
Default: None
DisableReplicaCt Applicable only if the replication was activated with the default change tracking type ChangeTracking
If set to TRUE, the finalize process will attempt to disable Change Tracking on the restored database (backup of the source database is taken after change tracking is activated)
Yes
Type: String
Default: None
Valid value: true/ false
DisableReplicaCdc Applicable only if the replication was activated with change tracking type CDC.
If set to TRUE, the finalize process will attempt to disable CDC on the restored database (backup of the source database is taken after CDC is activated)
Yes
Type: String
Default: None
Valid value: true/ false

 

Request Headers

This implementation uses only request headers that are common to all operations. For more information please see the section Common Request Headers

Response Syntax:

JSON

HTTP/1.1 200
status: 200
 
{
}

XML

HTTP/1.1 200
status: 200
 

Response Parameters

None

 

Error Response Syntax:

JSON

HTTP/1.1 400
status: 400

{
   "errors": [
       "{AuthenticationType}: Valid values for AuthenticationType=[SqlServerAuthentication,ActiveDirectoryAuthentication]. Found value = ActiveDirectory1"
 	],
	"requestId": 20
}

XML

HTTP/1.1 400
status: 400
 
<?xml version="1.0" encoding="utf-8"?>
<ErrorResponse> 
	<RequestId>request-id</RequestId> 
	<Errors> 
		<Error> {AuthenticationType}: Valid values for AuthenticationType=[SqlServerAuthentication,ActiveDirectoryAuthentication]. Found value = ActiveDirectory1 </Error> 
	</Errors> 
</ErrorResponse>