AddPreCommand
July 21, 2025
This API can be used to add a pre-backup command to a backup set.
The settings can be found on the AhsayCBS web console at:
- Backup / Restore > Users, Groups & Policies > Backup User > %User Name% Backup Set > %Backup Set Name% > Command Line Tool
URL
https://CBS.EXAMPLE.COM/obs/api/json/AddPreCommand.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. |
LoginName | String | Username of the backup user. |
BackupSetID | String | ID of the backup set. Obtainable in ListBackupSets API. |
Name | String | Name of the command. |
WorkingDir | String | Directory where the command takes place. |
Command | String | Actual command. |
Username | String | If username and password are empty, add the address without credential. |
Password | String | If username and password are empty, add the address without credential. |
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
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"BackupSetID":"1687755057644",
"Name":"test,
"WorkingDir":"test",
"Command":"test"
}
OUTPUT
{
"Status":"OK"
}