Skip to main content

Replication

API’s that belong to this category deal with replication functions like listing, updating and removing receivers.

There are three APIs under this:

 

ListReceiver

This API can be used to list all the receiver and their settings.

The settings can be found on the AhsayCBS web console at:

  • Replication > Accepting Data > Receiver

 

URL

https://CBS.EXAMPLE.COM/rps/api/json/ListReceiver.do

Available Since Version: 9.1

Parameters

KeyTypeDescription
SysUserStringUsername of an AhsayCBS System User with Admin or API role.
SysPwdStringPassword matching SysUser.
Return Values
KeyTypeDescription
StatusString"OK" or "Error"
DataJSON ObjectSee JSON Objects.
MessageStringError message, it only appears if status displays "Error".
ExptTypeStringThe type of exception, will only be displayed if the status is "Error".
JSON Objects

Receiver

KeyTypeDescription
IdLongID of the receiver.
ReplicationEnabledBooleanReplication receiver status.
LoginNameStringLogin name of the replication receiver account.
PasswordStringThe password of the replication receiver..
AliasStringAlias of the receiver.
ListenPortIntegerListening port (e.g. 9444) of the source backup server. (applies to v6 only)
ListenHostStringBind to (example "0.0.0.0") (applies to v6 Replication).
V6ReplicationEnabledBooleanIf v6 Replication setting is enabled or not.
SystemHomeStringThe Replication System Home path (default Home Directory) for the replication receiver.
RestoreRunningBooleanIf the replication snapshot will be restored or not.
TrafficLimitsArray of TrafficLimitLimit the usage of network bandwidth by the replication service.
UserHomeMappingsArray of UserHomeMappingThe source backup server user home location.
RestoringPathStringPath of the restore.
IPRestrictionsArray of IPRestrictionTo restrict the range of IP that can access the receiver.
RestoreStatusStringRestore job status.
ObsHostStringBackup server host (FQDN).
ObsProtocolStringCan either be HTTP or HTTPS.
ObsSysUserStringThe system user login of the backup server, stored when Add New Receiver.
ObsSysPwdStringThe system user password login of the backup server.
ObsPortIntegerThe backup server connector port.
ObsVersionIntegerThe backup server version. If 0, means v6 Sender. If 1, means v7+.
RestorePointIntervalIntegerValue for the Replication Retention Setting.
RetentionCustomizationPolicyIntegerValue for the Replication Retention Setting.
CrcEnabledBooleanCyclic Redundancy Check checking. (applies to v6 Replication)
CrcHourIntegerMonthly at HH:HH. (applies to v6 Replication
CrcMinuteIntegerMonthly at HH:HH. (applies to v6 Replication

TrafficLimit

KeyTypeDescription
IDLongID of the limit.
NameStringLabel name.
AlwaysBooleanIf True, MaxTransferRate is always applied regardless of time.
FromDayOfWeekInteger0 = Sunday, 6 = Friday.
FromHourIntegerIn 24-hour format.
FromMinIntegerIn 60-minute format.
ToDayOfWeekInteger0 = Sunday, 6 = Friday.
ToHourIntegerIn 24-hour format.
ToMinIntegerIn 60-minute format.
MaxTransferRateLongMaximum transfer rate in bytes.

UserHomeMapping

KeyTypeDescription
RPSDirStringReplication Home.
OBSHomeStringBackup server user home.

IPRestriction

KeyTypeDescription
IdLongID of the restriction.
FromStringIP address
ToStringIP address
Examples

INPUT

{
	"SysUser":"system",
	"SysPwd":"system1"
}

OUTPUT

{
	"Status":"OK",
	"Data":[
		{
			"UserHomeMappings":[
				{
					"RPSDir":"F:\\rcvr",
					"OBSHome":"C:\\Program Files\\AhsayOBS and AhsayRPS\\user"
				}
			],
			"ObsPort":80,
			"MidButtons":[],
			"LoginName":"rcvr",
			"MigrateFromV6":false,
			"LatestSnapshot":"2024-06-29-10-48-19",
			"RestoringPath":"",
			"Classname":"com.ahsay.cbs.rps.config.receiver.EditReceiverBean",
			"ObsProtocol":"http",
			"RestoreRunning":false,
			"Update":false,
			"RestoreStatus":"",
			"Update":false,
			"ListenHost":"0.0.0.0",
			"TrafficLimits":[],
			"V6ReplicationEnabled":false,
			"ObsSysPwd":"system1",
			"SystemHome":"C:\\Program Files\\AhsayCBS\\system\\rps\\rcvshome\\rcvr",
			"RestorePointInterval":30,
			"RightButton":[
				{
					"Trigger":[],
					"OpenNewFrame":true,
					"ReadPrivilege":"",
					"ImageURL":"images/btn_ico_ok_72.pnt",
					"Style":"",
					"DynamicLabel":"",
					"WritePreview":"",
					"LabelRes":"com.ahsay.atl.jsp.LabelInfo.OK",
					"ReadPrivileges":""
				},
				{
					"Trigger":[],
					"OpenNewFrame":true,
					"ReadPrivilege":"",
					"ImageURL":"images/btn_ico_cancel_72.pnt",
					"Style":"",
					"DynamicLabel":"",
					"WritePreview":"",
					"LabelRes":"com.ahsay.atl.jsp.LabelInfo.Cancel",
					"ReadPrivileges":""
				},
				{
					"Trigger":[],
					"OpenNewFrame":true,
					"ReadPrivilege":"",
					"ImageURL":"images/btn_ico_help_72.pnt",
					"Style":"",
					"DynamicLabel":"",
					"WritePreview":"",
					"LabelRes":"com.ahsay.atl.jsp.LabelInfo.Help",
					"ReadPrivileges":""
				}
			],
			"Blockcount":0,
			"ObsHost":"10.3.121.64",
			"ProgressInfo":{},
			"ObsSysUser":"system",
			"LeftButtons":[],
			"RetentionCustomizationPolicy":60,
			"Password":"rcvr1",
			"RestoreDir":"",
			"RestoreDisableStop":false,
			"CrcEnabled":false,
			"IPRestrictions":[],
			"CrcHour":0,
			"ObsVersion":1,
			"TrafficLimit":{},
			"ListenPort":9444,
			"CrcMinute":0,
			"Alias":"rcvr"
			"Tabs":[],
			"Id":1,
			"ReplicationEnabled":true
		}
	]
}

 

UpdateReceivers

This API can be used to update settings of an existing replication receiver setting. You should use ListReceiver.do to obtain the current values, to pass back values to keep along with your changes, UpdateReceivers.do is designed as overwrite mode.

The settings can be found on the AhsayCBS web console at:

  • Replication > Accepting Data > Receiver

 

URL

https://CBS.EXAMPLE.COM/rps/api/json/UpdateReceivers.do

Available Since Version: 9.1

Parameters

KeyTypeDescription
SysUserStringUsername of an AhsayCBS System User with Admin or API role.
SysPwdStringPassword matching SysUser.
IdLongUse ListReceiver.do to obtain the response output from existing ‘Id’, then pass it back using UpdateReceivers.do with your changes.
ReplicationEnabledBooleanEnable replication of the receiver.
LoginNameStringLogin name of the replication receiver account.
PasswordStringPassword or the replication receiver.
AliasStringAlias of the reciver.
ListenPortIntegerListening port (e.g. 9444) of the source backup server. (applies to v6 only)
ListenHostStringBind to (example "0.0.0.0") (applies to v6 Replication).
SystemHomeStringThe Replication System Home path (default Home Directory) for the replication receiver.
RestoreRunningBooleanIf the replication snapshot will be restored or not.
TrafficLimitsArray of TrafficLimitLimit the usage of network bandwidth by the replication service.
UserHomeMappingsArray of UserHomeMappingThe source backup server user home location.
RestoringPathStringPath of the restore.
IPRestrictionsArray of IPRestrictionTo restrict the range of IP that can access the receiver.
RestoreStatusStringRestore job status.
ObsVersionIntegerThe backup server version. If 0, means v6 Sender. If 1, means v7+.
ObsHostStringBackup server host (FQDN).
ObsProtocolStringCan either be HTTP or HTTPS.
ObsSysUserStringThe system user login of the backup server, stored when Add New Receiver.
ObsSysPwdStringThe system user password login of the backup server.
ObsPortIntegerThe backup server connector port.
RestorePointIntervalIntegerValue for the Replication Retention Setting.
RetentionCustomizationPolicyIntegerValue for the Replication Retention Setting.
CrcEnabledBooleanCyclic Redundancy Check checking. (applies to v6 Replication)
CrcHourIntegerMonthly at HH:HH. (applies to v6 Replication)
CrcMinuteIntegerMonthly at HH:HH. (applies to v6 Replication)
MigrateFromV6BooleanWhether to migrate from v6 or not.
V6ReplicationEnabledBooleanIf v6 Replication setting is enabled, then pass the ListentPort and ListenHost keys.
Return Values
KeyTypeDescription
StatusString"OK" or "Error"
MessageStringError message, it only appears if status displays "Error".
ExptTypeStringThe type of exception, will only be displayed if the status is "Error".
JSON Objects

TrafficLimit

KeyTypeDescription
IDStringID of the limit.
NameStringLabel name.
AlwaysBooleanIf True, MaxTransferRate is always applied regardless of time.
FromDayOfWeekInteger0 = Sunday, 6 = Friday.
FromHourIntegerIn 24-hour format.
FromMinIntegerIn 60-minute format.
ToDayOfWeekInteger0 = Sunday, 6 = Friday.
ToHourIntegerIn 24-hour format.
ToMinIntegerIn 60-minute format.
MaxTransferRateLongMaximum transfer rate in bytes.

UserHomeMapping

KeyTypeDescription
RPSDirStringReplication Home.
OBSHomeStringBackup server user home.

IPRestriction

KeyTypeDescription
IDLongID of the restriction.
FromStringIP address
ToStringIP address
Examples

Example 1: Enable Replication

INPUT

{
	"SysUser":"system",
	"SysPwd":"system1",
	"Id":0,
	"ReplicationEnabled":true,
	"LoginName":"rcvr",
	"Password":"rcvr1",
	"Alias":"rcvr",
	"ObsProtocol":"https",
	"ObsHost":"rcvr.com",
	"ObsPort":"443",
	"ObsVersion":1,
	"ObsSysUser:"system",
	"ObsPwd":"system1",
	"V6ReplicationEnabled":false,
	"MigrateFromV6":false,
	"ListenHost":"0.0.0.0",
	"ListenPort":9444,
	"CrcEnabled":false,
	"CrcHour":0,
	"CrcMinute":0,
	"RestorePointInterval":30,
	"RetentionCustomizationPolicy":60,
	"SystemHome":"C:\\Program Files\\AhsayCBS\\system\\rps\\rcvshome\\rcvr",
	"UserHomeMappings":[
		{
			"RPSDir":"F:\\rcvr",
			"OBSHome":"C:\\Program Files\\AhsayCBS\\user"
		}
	],
	"IPRestrictions:[],
	"TrafficLimits":[]
}

OUTPUT

{
	"Status":"OK"
}

Example 2: Disable Replication

INPUT

{
	"SysUser":"system",
	"SysPwd":"system1",
	"Id":0,
	"ReplicationEnabled":false,
	"LoginName":"rcvr",
	"Password":"rcvr1",
	"Alias":"rcvr",
	"ObsProtocol":"https",
	"ObsHost":"rcvr.com",
	"ObsPort":"443",
	"ObsVersion":1,
	"ObsSysUser:"system",
	"ObsPwd":"system1",
	"V6ReplicationEnabled":false,
	"MigrateFromV6":false,
	"ListenHost":"0.0.0.0",
	"ListenPort":9444,
	"CrcEnabled":false,
	"CrcHour":0,
	"CrcMinute":0,
	"RestorePointInterval":30,
	"RetentionCustomizationPolicy":60,
	"SystemHome":"C:\\Program Files\\AhsayCBS\\system\\rps\\rcvshome\\rcvr",
	"UserHomeMappings":[
		{
			"RPSDir":"F:\\rcvr",
			"OBSHome":"C:\\Program Files\\AhsayCBS\\user"
		}
	],
	"IPRestrictions:[],
	"TrafficLimits":[]
}

OUTPUT

{
	"Status":"OK"
}

 

RemoveReceiver

This API can be used to remove a replication receiver and may help to remove when the GUI cannot.

The settings can be found on the AhsayCBS web console at:

  • Replication > Accepting Data > Receiver

 

URL

https://CBS.EXAMPLE.COM/rps/api/json/RemoveReceiver.do

Available Since Version: 9.1

Parameters

KeyTypeDescription
SysUserStringUsername of an AhsayCBS System User with Admin or API role.
SysPwdStringPassword matching SysUser.
IdLongUse ListReceiver.do to obtain the response output from existing ‘Id’, then pass it back using UpdateReceivers.do with your changes.
Return Values
KeyTypeDescription
StatusString"OK" or "Error"
MessageStringError message, it only appears if status displays "Error".
ExptTypeStringThe type of exception, will only be displayed if the status is "Error".
Example

INPUT

{
	"SysUser":"system",
	"SysPwd":"system1",
	"Id":"1"
}

OUTPUT

{
	"Status":"OK"
}