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
Key | Type | Description |
---|---|---|
SysUser | String | Username of an AhsayCBS System User with Admin or API role. |
SysPwd | String | Password matching SysUser. |
LicenseeName | String | Licensee name of redirector key. |
LicenseKey | String | Product key for redirector. |
UseProxy | Boolean | Enable / disable the use of proxy defined in AhsayCBS to connect to the Internet. |
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",
"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
Key | Type | Description |
---|---|---|
SysUser | String | Username of an AhsayCBS System User with Admin or API role. |
SysPwd | String | Password matching SysUser. |
SkipDuplicateUserCheck | Boolean | Do not check duplicate users. |
BackupServer | Array | Redirector will redirect user to these backup servers. |
EnableRdr | Boolean | True / False. |
FreeTrialServer | Integer | ID of the backup server for free trial registration. |
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
Backup Servers
Key | Type | Description |
---|---|---|
ID | Long | ID of the configuration. |
Enabled | Boolean | True / False. |
HttpEnabled | Boolean | True / False. |
SslEnabled | Boolean | True / False. |
LoginName | String | Login name used for the backup server. |
Password | String | Password used for the backup server. |
Hostname | String | Hostname or IP address. |
HttpPort | Integer | Port used by the backup server. |
SslPort | Integer | SSL port used by the backup server. |
Class | Integer | The 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"
}