AddUser (v1,v2)
This API can be used to add new backup user.
The settings can be found on the AhsayCBS web console at:
- Backup / Restore > Users, Groups & Policies > Backup User
v1 AddUser.do
URL
https://CBS.EXAMPLE.COM/obs/api/json/AddUser.do
Deprecated Since Version: 7.15.6.38
v2 AddUser.do
URL
https://CBS.EXAMPLE.COM/obs/api/json/2/AddUser.do
Available Since Version: 9.5
Parameters
| Key | Type | Description |
|---|---|---|
| SysUser | String | Username of an AhsayCBS System User with Admin or API role. |
| SysPwd | String | Password matching SysUser. |
| LoginName | String | Backup user name. |
| Owner | String | Owner of the backup user (if applicable). |
| Password | String | Password of the backup user. |
| String | Contact email. | |
| QuotaList | JSON Object Array | See QuotaList. |
| Status | String | If this value is “SUSPENDED”, the user is suspended. Otherwise, the user is enabled. |
| ClientType | String | Type of backup client, either ACB or OBM. |
| Type | String | User type, either TRIAL or PAID. Default to TRIAL if not specified. |
| UserHome | String | Default to the first user home on your user home configuration if not specified. |
| MobileQuota | Long | Deprecated from v8.5, old v1 AhsayMOB quota. |
| MobileV2Quota | Long | Fixed at 10 regardless of input. |
| ExchangeMailboxQuota | Long | Exchange mail level backup quota. Mandatory if the corresponding add-on module is enabled (e.g. “ExchangeMailboxQuota” is mandatory if “EnableExchangeMailbox” is set to true). |
| MsVmQuota | Long | Hyper-V VM backup quota. Mandatory if the corresponding add-on module is enabled (e.g. “MsVmQuota” is mandatory if “EnableMsVm” is set to true). |
| MsVmQuotaType | String | The value can be any one of the following: GUESTVM or SOCKET. Default value is GUESTVM if not provided. |
| VMwareQuota | Long | VMware VM backup quota. Mandatory if the corresponding add-on module is enabled (e.g. “VMwareQuota” is mandatory if “EnableVMware” is set to true). |
| VMwareQuotaType | String | The value can be any one of the following: GUESTVM or SOCKET. Default value is GUESTVM if not provided. |
| RunDirectQuotaEnabled | Boolean | True / False |
| RunDirectQuota | Long | Run Direct maximum VM quota. Mandatory if the RunDirect is enabled (e.g. "RunDirectQuota" is mandatory if "RunDirectQuotaEnabled" is set to true). |
| EnableOffice365Mail | Boolean | True / False |
| Office365MailQuota | Long | Microsoft 365 mail backup quota. Mandatory if the corresponding add on module is enabled (e.g. "Office365MailQuota" is mandatory if "EnableOffice365Mail" is set to true). |
| Language | String | Language used by the user. |
| DisplayName | String | Alias and contact name. |
| Notes | String | Notes of the account profile. |
| HostQuotaEnabled | Boolean | Enalbe or disable client host quota |
| HostQuota | Long | Storage quota, unit in bytes. |
| EnableMobile | Boolean | AhsayMOB module, deprecated from v8.5. |
| EnableMobileV2 | Boolean | Enable or disable Ahsay Mobile module (when enabled, "MobileV2Quota" fixed value at 10). |
| EnableExchangeMailbox | Boolean | Enable or disable Exchange Mailbox module. |
| EnableMSSQL | Boolean | Enable or disable MS SQL module. |
| EnableMSExchange | Boolean | Enable or disable MS Exchange module. |
| EnableOracle | Boolean | Enable or disable Oracle module. |
| EnableLotusDomino | Boolean | Enable or disable Lotus Domino module. |
| EnableLotusNotes | Boolean | Enable or disable Lotus Notes module. |
| EnableMySQL | Boolean | Enable or disable MySQL module. |
| EnableInFileDelta | Boolean | Enable or disable In-File Delta module (pre-v9). |
| EnableShadowCopy | Boolean | Enable or disable Volume Shadow Copy module. |
| EnableNASClient | Boolean | Enable or disable NAS - Synology module. |
| EnableQnap | Boolean | Enable or disable NAS - QNAP module. |
| EnableMsVm | Boolean | Enable or disable Hyper-V module. |
| EnableVMware | Boolean | Enable or disable VMware module. |
| EnableCDP | Boolean | Enable or disable Continuous Data Protection module. |
| EnableShadowProtectBareMetal | Boolean | Enable or disable ShadowProtect System Backup module. |
| EnableWinServer2008BareMetal | Boolean | Enable or disable Windows System Backup module. |
| EnableMsWinSysState | Boolean | Enable or disable Windows System State Backup module. |
| EnableOpenDirect | Boolean | Enable or disable OpenDirect module. |
| OpenDirectQuota | String | Number of OpenDirect allowed. Only works on pre-v9.13 AhsayCBS. |
| EnableMariaDB | Boolean | Enable or disable MariaDB Database Server module. |
| EnableDeduplication | Boolean | Enable or disable Deduplication module. |
| QuotaType | String | Quota Type, either TOTAL_QUOTA or PER_DESTINATION_QUOTA, default to PER_DESTINATION_QUOTA, if not specified. |
| StorageQuota | Long | Default to 100, if not specified. Unit in GB. |
| QuotaList | JSON Object Array | Mandatory if QuotaType is PER_DESTINATION_QUOTA or if QuotaType is not specified. |
| EnableAUA | Boolean | Enable or disable Auto Update Agent setting. |
| EnableTibero | Boolean | Enable or disable Tibero Database Server module. |
| EnableLinuxBareMetal | Boolean | Enable or disable Linux Bare Metal Backup module. |
| EnablePostgreSQL | Boolean | Enable or disable PostgreSQL Server module. |
| EnableProxmox | Boolean | Enable or disable Proxmox VE module. |
| EnableGws | Boolean | Enable or disable Google Workspace Backup module. |
| GoogleWorkspaceQuota | String | Google Workspace backup quota. Mandatory if the corresponding add-on module is enabled (e.g. "GoogleWorkspaceQuota" is mandatory if "EnableGws" is set to true.) |
QuotaList
| Key | Type | Description |
|---|---|---|
| Enabled | Boolean | True / False |
| DestinationKey | String | ID of the predefined destination or "OBS" for quota on AhsayCBS. |
| Quota | Long | Unit in bytes. |
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". |
Examples
Example 1: Add AhsayOBM paid user with AhsayCBS quota 50 GB and predefined destination quota of 50 GB
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm2",
"Password":"obm2",
"Email":"obm2@example.com",
"Type":"Paid",
"Status":"ENABLE",
"ClientType":"OBM",
"QuotaList":[
{
"Enabled":true,
"DestinationKey":"-1686812937526",
"Quota":53687091200
}
]
}
OUTPUT
{
"Status":"OK"
}
OUTPUT 2: If destination is not visible to user
{
"Status":"Error",
"Message":"Destination ‘-1686812937526’ is not visible to user ‘obm2’ according to policy’s [Destinations Visible to Users] settings.",
"ExptType":"java.lang.Exception"
}
OUTPUT 3: If the Enable parameter is missing from a destination in the QuotaList
{
"Status":"Error",
"Message":"Value ‘Enabled’ is missing in item ‘-1686812937526’ of ‘QuotaList’.",
"ExptType":"java.lang.Exception"
}
OUTPUT 4: If Enable is invalid for a destination in the QuotaList
{
"Status":"Error",
"Message":"Invalid ‘Enabled’ in item ‘-1686812937526’ of ‘QuotaList’.",
"ExptType":"java.lang.Exception"
}
OUTPUT 5: If a destination is duplicated in the QuotaList
{
"Status":"Error",
"Message":"Duplicated DestinationKey (-1686812937526) are not allowed in the QuotaList.",
"ExptType":"java.lang.Exception"
}
OUTPUT 6: If the Quota value for a destination is invalid (e.g. a negative number)
{
"Status":"Error",
"Message":"Invalid value for ‘Quota’ for item ‘-1686812937526’ of ‘QuotaList’. Error: Must be a positive number.",
"ExptType":"java.lang.Exception"
}
OUTPUT 7: If the Quota value for a destination is invalid
{
"Status":"Error",
"Message":"Invalid value ‘Quota’ for item ‘-1686812937526’ of ‘QuotaList’. Error: JSONObject [\”Quota\”] is not a long (class java.lang.String: ac130).",
"ExptType":"java.lang.Exception"
}
Example 2: Add AhsayOBM paid user with AhsayCBS quota 50 GB and Total Quota 75 GB
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm1",
"Password":"obm1",
"Email":"testobm@example.com",
"Type":"Paid",
"Status":"ENABLE",
"ClientType":"OBM",
"QuotaType":"TOTAL_QUOTA",
"StorageQuota":75,
"QuotaList":[
{
"DestinationKey":"OBS",
"Quota":53687091200,
"DestinationName":"AhsayCBS",
"Enabled":true
}
]
}
OUTPUT
{
"Status":"OK"
}
Example 3: Invalid Quota value specified
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm2",
"Password":"obm2",
"Email":"obm2@example.com",
"Type":"Paid",
"Status":"ENABLE",
"ClientType":"OBM",
"QuotaList":[
{
"Enabled":true,
"DestinationKey":"OBS",
"Quota":53687091200
}
]
}
OUTPUT
{
"Status":"OK"
}