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
Key | Type | Description |
---|---|---|
SysUser | String | Username of an AhsayCBS System User with Admin or API role. |
SysPwd | String | Password matching SysUser. |
Return Values
Key | Type | Description |
---|---|---|
Status | String | "OK" or "Error" |
Data | JSON Object | See JSON Objects. |
Message | String | Error message, it only appears if status displays "Error". |
ExptType | String | The type of exception, will only be displayed if the status is "Error". |
JSON Objects
Receiver
Key | Type | Description |
---|---|---|
Id | Long | ID of the receiver. |
ReplicationEnabled | Boolean | Replication receiver status. |
LoginName | String | Login name of the replication receiver account. |
Password | String | The password of the replication receiver.. |
Alias | String | Alias of the receiver. |
ListenPort | Integer | Listening port (e.g. 9444) of the source backup server. (applies to v6 only) |
ListenHost | String | Bind to (example "0.0.0.0") (applies to v6 Replication). |
V6ReplicationEnabled | Boolean | If v6 Replication setting is enabled or not. |
SystemHome | String | The Replication System Home path (default Home Directory) for the replication receiver. |
RestoreRunning | Boolean | If the replication snapshot will be restored or not. |
TrafficLimits | Array of TrafficLimit | Limit the usage of network bandwidth by the replication service. |
UserHomeMappings | Array of UserHomeMapping | The source backup server user home location. |
RestoringPath | String | Path of the restore. |
IPRestrictions | Array of IPRestriction | To restrict the range of IP that can access the receiver. |
RestoreStatus | String | Restore job status. |
ObsHost | String | Backup server host (FQDN). |
ObsProtocol | String | Can either be HTTP or HTTPS. |
ObsSysUser | String | The system user login of the backup server, stored when Add New Receiver. |
ObsSysPwd | String | The system user password login of the backup server. |
ObsPort | Integer | The backup server connector port. |
ObsVersion | Integer | The backup server version. If 0, means v6 Sender. If 1, means v7+. |
RestorePointInterval | Integer | Value for the Replication Retention Setting. |
RetentionCustomizationPolicy | Integer | Value for the Replication Retention Setting. |
CrcEnabled | Boolean | Cyclic Redundancy Check checking. (applies to v6 Replication) |
CrcHour | Integer | Monthly at HH:HH. (applies to v6 Replication |
CrcMinute | Integer | Monthly at HH:HH. (applies to v6 Replication |
TrafficLimit
Key | Type | Description |
---|---|---|
ID | Long | ID of the limit. |
Name | String | Label name. |
Always | Boolean | If True, MaxTransferRate is always applied regardless of time. |
FromDayOfWeek | Integer | 0 = Sunday, 6 = Friday. |
FromHour | Integer | In 24-hour format. |
FromMin | Integer | In 60-minute format. |
ToDayOfWeek | Integer | 0 = Sunday, 6 = Friday. |
ToHour | Integer | In 24-hour format. |
ToMin | Integer | In 60-minute format. |
MaxTransferRate | Long | Maximum transfer rate in bytes. |
UserHomeMapping
Key | Type | Description |
---|---|---|
RPSDir | String | Replication Home. |
OBSHome | String | Backup server user home. |
IPRestriction
Key | Type | Description |
---|---|---|
Id | Long | ID of the restriction. |
From | String | IP address |
To | String | IP 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
Key | Type | Description |
---|---|---|
SysUser | String | Username of an AhsayCBS System User with Admin or API role. |
SysPwd | String | Password matching SysUser. |
Id | Long | Use ListReceiver.do to obtain the response output from existing ‘Id’, then pass it back using UpdateReceivers.do with your changes. |
ReplicationEnabled | Boolean | Enable replication of the receiver. |
LoginName | String | Login name of the replication receiver account. |
Password | String | Password or the replication receiver. |
Alias | String | Alias of the reciver. |
ListenPort | Integer | Listening port (e.g. 9444) of the source backup server. (applies to v6 only) |
ListenHost | String | Bind to (example "0.0.0.0") (applies to v6 Replication). |
SystemHome | String | The Replication System Home path (default Home Directory) for the replication receiver. |
RestoreRunning | Boolean | If the replication snapshot will be restored or not. |
TrafficLimits | Array of TrafficLimit | Limit the usage of network bandwidth by the replication service. |
UserHomeMappings | Array of UserHomeMapping | The source backup server user home location. |
RestoringPath | String | Path of the restore. |
IPRestrictions | Array of IPRestriction | To restrict the range of IP that can access the receiver. |
RestoreStatus | String | Restore job status. |
ObsVersion | Integer | The backup server version. If 0, means v6 Sender. If 1, means v7+. |
ObsHost | String | Backup server host (FQDN). |
ObsProtocol | String | Can either be HTTP or HTTPS. |
ObsSysUser | String | The system user login of the backup server, stored when Add New Receiver. |
ObsSysPwd | String | The system user password login of the backup server. |
ObsPort | Integer | The backup server connector port. |
RestorePointInterval | Integer | Value for the Replication Retention Setting. |
RetentionCustomizationPolicy | Integer | Value for the Replication Retention Setting. |
CrcEnabled | Boolean | Cyclic Redundancy Check checking. (applies to v6 Replication) |
CrcHour | Integer | Monthly at HH:HH. (applies to v6 Replication) |
CrcMinute | Integer | Monthly at HH:HH. (applies to v6 Replication) |
MigrateFromV6 | Boolean | Whether to migrate from v6 or not. |
V6ReplicationEnabled | Boolean | If v6 Replication setting is enabled, then pass the ListentPort and ListenHost keys. |
Return Values
Key | Type | Description |
---|---|---|
Status | String | "OK" or "Error" |
Message | String | Error message, it only appears if status displays "Error". |
ExptType | String | The type of exception, will only be displayed if the status is "Error". |
JSON Objects
TrafficLimit
Key | Type | Description |
---|---|---|
ID | String | ID of the limit. |
Name | String | Label name. |
Always | Boolean | If True, MaxTransferRate is always applied regardless of time. |
FromDayOfWeek | Integer | 0 = Sunday, 6 = Friday. |
FromHour | Integer | In 24-hour format. |
FromMin | Integer | In 60-minute format. |
ToDayOfWeek | Integer | 0 = Sunday, 6 = Friday. |
ToHour | Integer | In 24-hour format. |
ToMin | Integer | In 60-minute format. |
MaxTransferRate | Long | Maximum transfer rate in bytes. |
UserHomeMapping
Key | Type | Description |
---|---|---|
RPSDir | String | Replication Home. |
OBSHome | String | Backup server user home. |
IPRestriction
Key | Type | Description |
---|---|---|
ID | Long | ID of the restriction. |
From | String | IP address |
To | String | IP 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
Key | Type | Description |
---|---|---|
SysUser | String | Username of an AhsayCBS System User with Admin or API role. |
SysPwd | String | Password matching SysUser. |
Id | Long | Use ListReceiver.do to obtain the response output from existing ‘Id’, then pass it back using UpdateReceivers.do with your changes. |
Return Values
Key | Type | Description |
---|---|---|
Status | String | "OK" or "Error" |
Message | String | Error message, it only appears if status displays "Error". |
ExptType | String | The type of exception, will only be displayed if the status is "Error". |
Example
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"Id":"1"
}
OUTPUT
{
"Status":"OK"
}