UpdateUserProfile (v1), UpdateUser (v2)
This API updates the information of a user profile.
The settings can be found on the AhsayCBS web console at:
- Backup / Restore > Users, Groups & Policies > Backup User > %User Name%
v1 UpdateUserProfile.do
URL
https://CBS.EXAMPLE.COM/obs/api/json/UpdateUserProfile.do
Deprecated Since Version: 7.15.6.38
v2 UpdateUser.do
To facilitate the Quota Management feature, a new version of the UpdateUserProfile.do API (v2 UpdateUser.do) was introduced.
URL
https://CBS.EXAMPLE.COM/obs/api/json/2/UpdateUser.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 | Name of the backup user. |
Owner | String | The owner of backup user (if applicable). |
Alias | String | Backup user alias (if applicable). |
Status | String | Status of the backup user, either SUSPENDED or ENABLE. |
Type | String | Type of backup user, either TRIAL or PAID. Default to TRIAL if not specified. |
ClientType | String | Type of backup client, either OBM or ACB. |
Password | String | Password of the user account. |
Language | String | Language used by the backup user. |
Notes | String | User notes. |
QuotaList | JSON object | Refer to QuotaList. |
HostQuotaEnabled | Boolean | Enable or disable the client host. |
HostQuota | Long | Client host limit. |
RunDirectQuotaEnabled | Boolean | Enable or disable Run Direct. |
RunDirectQuota | Long | Run Direct limit. |
ModuleSettings | JSON object | Used to assign modules. |
WindowsEventLogSettings | WindowsEventLogSettings | Log |
Contact | Array | If "AppendContact" is "Y", all contacts in the array will be appended to the contacts. |
AppendContact | String | "Y" or "N" to modify an existing contact (retrieve the corresponding keys required with the GetUser.do API). |
ChangeContact | String | "Y" or "N" to change and overwrite an existing contact (retrieve the corresponding keys required with the GetUser.do API). |
OldContact | Array | Existing contacts. It is used if "ChangeContact" is "Y". |
NewContact | Array | If "ChangeContact" is "Y", all contacts in OldContact will be updated with NewContact. |
SecuritySettings | JSON object |
Parameter available only if global MFA Setting is ON. Update to PhoneList array is by replacement of whole list.
If modifying the PhoneList, most recent phone number (based on LastSuccessfulLoginInfo “PhoneNumber”) cannot be removed by API, due to API validation check. That phone number must be included when updating PhoneList.
|
QuotaType | String | Quota type, either TOTAL_QUOTA or PER_DESTINATION_QUOTA. |
StorageQuota | Long | Total quota in GB. Value validity examined when used by TOTAL_QUOTA. |
EnableAUA | Boolean | Auto Update Agent setting. |
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, it appears only if status is "Error". |
JSON Objects
ModuleSettings
Key | Type | Description |
---|---|---|
MSExchangeMailboxBackupEnabled | Boolean | Defines whether module MS Exchange Mailbox backup will be enabled. |
MSExMailboxQuota | Long | Quota for MSExchangeMailBox. |
MSSQLBackupEnabled | Boolean | Defines whether module MS SQL backup will be enabled. |
MSExchangeBackupEnabled | Boolean | Defines whether module MS Exchange backup will be enabled. |
OracleBackupEnabled | Boolean | Defines whether module Oracle backup will be enabled. |
LotusDominoBackupEnabled | Boolean | Defines whether module Lotus Domino backup will be enabled. |
LotusNotesBackupEnabled | Boolean | Defines whether module Lotus Notes backup will be enabled. |
MySQLBackupEnabled | Boolean | Defines whether module MySQL backup will be enabled. |
InFileDeltaEnabled | Boolean | Defines whether module In-File Delta will be enabled. |
ShadowCopyEnabled | Boolean | Defines whether module Volume Shadow Copy will be enabled. |
NasClientEnabled | Boolean | Defines whether module Synology NAS Client will be enabled. |
QnapEnabled | Boolean | Defines whether module QNAP NAS Client will be enabled. |
DeltaMergeEnabled | Boolean | True / False |
MSHyperVBackupEnabled | Boolean | Defines whether module MS Hyper-V backup will be enabled. |
MSHyperVVMQuota | Long | Defines module MS Hyper-V VM quota. |
MSHyperVVMQuotaType | String | MS Hyper-V VM quota type, either GUESTVM or SOCKET. |
VMwareBackupEnabled | Boolean | Defines whether module VMware backup will be enabled. |
VMwareVMQuota | Long | Defines module VMware VM quota. |
VMwareVMQuotaType | String | VMware VM quota type, either GUESTVM or SOCKET. |
CDPEnabled | Boolean | Defines whether module CDP will be enabled. |
ShadowProtectBackupEnabled | Boolean | Defines whether module ShadowProtect backup will be enabled. |
MSWindowsSystemBackupEnabled | Boolean | Defines whether module MS Windows System backup will be enabled. |
MSWindowsSystemStateBackupEnabled | Boolean | Defines whether module MS Windows System State backup will be enabled. |
Office365MailEnabled | Boolean | Defines whether module Microsoft 365 Mail backup will be enabled. |
Office365MailQuota | Long | Defines module Microsoft 365 quota. |
MobileEnabled | Boolean | Deprecated from v8.5; no new mobile v1 modules can be Enabled for users. |
MobileV2Enabled | Boolean | Defines whether module MobileV2 will be enabled. |
MobileQuota | Long | Deprecated from 8.5. |
MobileQuotaV2 | Long | Fixed at 10. |
OpenDirectEnabled | Boolean | Defines whether module OpenDirect will be enabled. |
OpenDirectQuota | String | Defines module OpenDirect quota. Only works on pre-v9.13 AhsayCBS. |
MariaDBBackupEnabled | Boolean | Defines whether module MariaDB backup will be enabled. |
DeduplicationEnabled | Boolean | Defines whether module Deduplication will be enabled. |
TiberoBackupEnabled | Boolean | Defines whether module Tibero Database Server backup will be enabled. |
LinuxBareMetalBackupEnabled | Boolean | Defines whether module Linux Bare Metal backup will be enabled. |
PostgreSQLBackupEnabled | Boolean | Defines whether module PostgreSQL Server backup will be enabled. |
ProxmoxVEBackupEnabled | Boolean | Defines whether module Proxmox VE backup will be enabled. |
Contact
Key | Type | Description |
---|---|---|
Company | String | Company where contact is from. |
String | Contact email address. | |
Address | String | Address of contact. |
Website | String | Website of contact. |
Name | String | Contact name. |
Phone1 | String | Contact phone number. |
Phone2 | String | Contact alternate phone number. |
WindowsEventLogSettings
Key | Type | Description |
---|---|---|
Enabled | Boolean | True / False |
LogError | Boolean | Log type |
LogProfile | Boolean | Log option |
LogServices | Boolean | Log option |
LogUtilities | Boolean | Log option |
LogBackup | Boolean | Log option |
LogSoftwareUpdate | Boolean | Log option |
LogReport | Boolean | Log option |
LogLogInLogOut | Boolean | Log option |
LogInfo | Boolean | Log type |
LogBuy | Boolean | Log option |
LogLicense | Boolean | Log type |
LogWarn | Boolean | Log type |
LogRestore | Boolean | Log option |
QuotaList
Key | Type | Description |
---|---|---|
Enabled | Boolean | True / False |
Quota | Long | Quota of the backup destination, unit in byte. Value validity examined when used by PER_DESTINATION_QUOTA. |
DestinationKey | String | Key of the backup destination. |
UserSuspendSettings
Key | Type | Description |
---|---|---|
Enabled | Boolean | True / False |
Date | String | Date in Unix time. |
SystemSettings
Key | Type | Description |
---|---|---|
Enabled | Boolean | True / False |
PhoneList | Array | Array list of phone numbers. |
CountryCode | Long | Country code. |
PhoneNumber | String | SMS phone number. |
Verified | Boolean | Not applicable by API. Default value is "False". |
VerifiedTime | Long | Not applicable by API. |
Id | Long | Not applicable by API. |
Examples
Example 1
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"QuotaList":[
{
"Enabled":true,
"DestinationKey":"OBM",
"Quota":73400320
}
]
}
OUTPUT
{
"Status":"OK"
}
Example 2: Add contacts (ChangeContact (Y))
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"ChangeContact":"Y",
"NewContact":[
{
"Company":"Ahsay",
"Email":"newcontact1@example.com",
"Address":"newcontact1",
"Website":"www.ahsay.com",
"Name":"newcontact1",
"Phone1":"1234",
"Phone2":"1234"
},
{
"Company":"Ahsay",
"Email":"newcontact2@example.com",
"Address":"newcontact2",
"Website":"www.ahsay.com",
"Name":"newcontact2",
"Phone1":"1234",
"Phone2":"1234"
}
]
}
OUTPUT
{
"Status":"OK"
}
Example 3: Update contact (ChangeContact (Y))
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"ChangeContact":"Y",
"OldContact":[
{
"Company":"Ahsay",
"Email":"oldcontact1@example.com",
"Address":"oldcontact1",
"Website":"www.ahsay.com",
"Name":"oldcontact1",
"Phone1":"1234",
"Phone2":"1234"
},
{
"Company":"Ahsay",
"Email":"oldcontact2@example.com",
"Address":"oldcontact2",
"Website":"www.ahsay.com",
"Name":"oldcontact2",
"Phone1":"1234",
"Phone2":"1234"
}
],
"NewContact":[
{
"Company":"Ahsay",
"Email":"newcontact1@example.com",
"Address":"newcontact1",
"Website":"www.ahsay.com",
"Name":"newcontact1",
"Phone1":"1234",
"Phone2":"1234"
},
{
"Company":"Ahsay",
"Email":"newcontact2@example.com",
"Address":"newcontact2",
"Website":"www.ahsay.com",
"Name":"newcontact2",
"Phone1":"1234",
"Phone2":"1234"
}
]
}
OUTPUT: 'oldcontact1' and "oldcontact2' have been updated to 'newcontact1' and 'newcontact2'
{
"Status":"OK"
}
Example 4 - Delete contact (ChangeContact (Y))
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"ChangeContact":"Y",
"OldContact":[
{
"Company":"Ahsay",
"Email":"oldcontact1@example.com",
"Address":"oldcontact1",
"Website":"www.ahsay.com",
"Name":"oldcontact1",
"Phone1":"1234",
"Phone2":"1234"
},
{
"Company":"Ahsay",
"Email":"oldcontact2@example.com",
"Address":"oldcontact2",
"Website":"www.ahsay.com",
"Name":"oldcontact2",
"Phone1":"1234",
"Phone2":"1234"
},
{
"Company":"Ahsay",
"Email":"newcontact1@example.com",
"Address":"newcontact1",
"Website":"www.ahsay.com",
"Name":"newcontact1",
"Phone1":"1234",
"Phone2":"1234"
},
{
"Company":"Ahsay",
"Email":"newcontact2@example.com",
"Address":"newcontact2",
"Website":"www.ahsay.com",
"Name":"newcontact2",
"Phone1":"1234",
"Phone2":"1234"
}
],
"NewContact":[
{
"Company":"Ahsay",
"Email":"oldcontact1@example.com",
"Address":"oldcontact1",
"Website":"www.ahsay.com",
"Name":"oldcontact1",
"Phone1":"1234",
"Phone2":"1234"
},
{
"Company":"Ahsay",
"Email":"oldcontact2@example.com",
"Address":"oldcontact2",
"Website":"www.ahsay.com",
"Name":"oldcontact2",
"Phone1":"1234",
"Phone2":"1234"
},
{
"Company":"Ahsay",
"Email":"newcontact2@example.com",
"Address":"newcontact2",
"Website":"www.ahsay.com",
"Name":"newcontact2",
"Phone1":"1234",
"Phone2":"1234"
}
]
}
OUTPUT
{
"Status":"Error"
}
Example 5: Append contacts with duplication (AppendContact (Y))
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"AppendContact":"Y",
"Contact":[
{
"Company":"Ahsay",
"Email":"oldcontact1@example.com",
"Address":"oldcontact1",
"Website":"www.ahsay.com",
"Name":"oldcontact1",
"Phone1":"1234",
"Phone2":"1234"
}
]
}
OUTPUT
{
"Status":"Error",
"Message":"[UpdateUserProfile.checkDuplicatedEmail] Contact already exists <oldcontact1@example.com>",
"ExptType":"com.ahsay.obs.core.dbs.DbsException"
}
Example 6: Append contacts without duplication (AppendContact (Y))
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"AppendContact":"Y",
"Contact":[
{
"Company":"None",
"Email":"oldcontact@example.com",
"Address":"oldcontact",
"Website":"www.ahsay.com",
"Name":"oldcontact",
"Phone1":"1234",
"Phone2":"1234"
}
]
}
OUTPUT
{
"Status":"OK"
}
Example 7: Delete all contacts (AppendContact (N))
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"AppendContact":"N",
"Contact":[
{
"Company":"None",
"Email":"oldcontact@example.com",
"Address":"oldcontact",
"Website":"www.ahsay.com",
"Name":"oldcontact",
"Phone1":"1234",
"Phone2":"1234"
}
]
}
OUTPUT
{
"Status":"OK"
}
Example 8: Replace all contacts (AppendContact (N))
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"AppendContact":"N",
"Contact":[
{
"Company":"None",
"Email":"oldcontact1@example.com",
"Address":"oldcontact1",
"Website":"www.ahsay.com",
"Name":"oldcontact1",
"Phone1":"1234",
"Phone2":"1234"
}
]
}
OUTPUT
{
"Status":"OK"
}
Example 9: Change module settings
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"ModuleSettings":{
"ShadowCopyEnabled":true,
"NasClientEnabled":true,
"DeduplicationEnabled":false
}
}
OUTPUT
{
"Status":"OK"
}
Example 10: Change subscription type to 'PAID' and disable 'suspend at' option
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"Type":"PAID",
"UserSuspendSettings":{
"Enabled":false,
"Date":2106396800000
}
}
OUTPUT
{
"Status":"OK"
}
Example 11 - Add or change 2FA phone number or Enable
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"Type":"PAID",
"UserSuspendSettings":{
"Enabled":false,
"Date":2106396800000
}
}
OUTPUT
{
"Status":"OK"
}