Skip to main content

Redirection

API’s that belong to this category deal with redirection functions like updating license and server configuration.

There are two sections with one API each:

 

Redirection License

UpdateLicense

This API can be used to update the licensee name and license key on the AhsayCBS server for the redirector.

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

  • System Settings > License > Redirector

 

URL

https://CBS.EXAMPLE.COM/rdr/api/json/UpdateLicense.do

Available Since Version: 9.1

Parameters

KeyTypeDescription
SysUserStringUsername of an AhsayCBS System User with Admin or API role.
SysPwdStringPassword matching SysUser.
LicenseeNameStringLicensee name of redirector key.
LicenseKeyStringProduct key for redirector.
UseProxyBooleanEnable / disable the use of proxy defined in AhsayCBS to connect to the Internet.
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",
	"LicenseeName":"Ahsay_Test_RDR",
	"LicenseKey":"qwerty-5jjM4+Sz-SCz68XG+J"
}

OUTPUT 1

{
	"Status":"OK",
	"Key":"qwerty-5jjM4+Sz-SCz68XG+J",
	"Deactivated":false,
	"Licensee":"Ahsay_Test_RDR"
}

OUTPUT 2

{
	"Status":"OK",
	"Key":"qwerty-5jjM4+Sz-SCz68XG+J",
	"Deactivated":false,
	"Info":"Internal Error 1012. Please press the [Update] button in license page to correct this problem. If the problem persists, please contact our technical support team to resolve this problem.",
	"Licensee":"Ahsay_Test_RDR"
}

OUTPUT 3

{
	"Status":"Error",
	"Message":"License key incorrect. Please try again"
}

OUTPUT 4

{
	"Status":"OK",
	"Key":"qwerty-5jjM4+Sz-SCz68XG+J",
	"Deactivated":false,
	"Info":"[OEM Liccense.checkLicTime] License expired on 2023-01-01. Backup server is stopped"
	"Licensee":"Ahsay_Test_RDR"
}

 

Server Config

UpdateServerConfig

This API can be used to update the Redirector module's setting.

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

  • Redirection > Hosting a Redirector > Server Configuration

 

URL

https://CBS.EXAMPLE.COM/rdr/api/json/UpdateServerConfig.do

Available Since Version: 9.1

Parameters

KeyTypeDescription
SysUserStringUsername of an AhsayCBS System User with Admin or API role.
SysPwdStringPassword matching SysUser.
SkipDuplicateUserCheckBooleanDo not check duplicate users.
BackupServerArrayRedirector will redirect user to these backup servers.
EnableRdrBooleanTrue / False.
FreeTrialServerIntegerID of the backup server for free trial registration.
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

Backup Servers

KeyTypeDescription
IDLongID of the configuration.
EnabledBooleanTrue / False.
HttpEnabledBooleanTrue / False.
SslEnabledBooleanTrue / False.
LoginNameStringLogin name used for the backup server.
PasswordStringPassword used for the backup server.
HostnameStringHostname or IP address.
HttpPortIntegerPort used by the backup server.
SslPortIntegerSSL port used by the backup server.
ClassIntegerThe value must be "com.ahsay.cbs.rdr.config.system.EditServerConfigBean$BackupServerBean".
Example

INPUT

{
	"SysUser":"system",
	"SysPwd":"system1",
	"BackupServers":[
		{
			"Id":"1",
			"Enabled":true,
			"HttpEnabled":false,
			"SslEnabled":true,
			"LoginName":"system",
			"Password":"system1",
			"Hostname":"rcvr.com",
			"HttpPort":80,
			"SslPort":443,
			"Class":"com.ahsay.cbs.rdr.config.system.EditServerConfigBean$BackupServerBean"
		}
	],
	"SkipDuplicateUserCheck":false,
	"EnabledRdrFreeTrial":true
}

OUTPUT

{
	"Status":"OK"
}