AddFilter
October 14, 2025
This API allows you to add filters to the backup source of a backup set. You can choose to include or exclude files which match a specific pattern.
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% > Source > Apply filters to the backup source
URL
https://CBS.EXAMPLE.COM/obs/api/json/AddFilter.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 filter. |
| TopDir | String | Directory where filter will be applied. |
| Type | String | Type of filter, can either be DEFAULT or CUSTOM. |
| Include | Boolean | Exclude or include matched files/folders under the top directory. |
| Only | Boolean | If set to true, will not include all unmatched files/folders. If set to false, will include all unmatched files/folders. |
| Apply2Dir | Boolean | Apply filter to folders. |
| Apply2File | Boolean | Apply filter to files. |
| Patterns | Array of PatternBean | Refer to PatternBean. |
| 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". |
JSON Objects
PatternBean
| Key | Type | Description |
|---|---|---|
| Pattern | String | Description of pattern for filter. |
Example
INPUT
{
"SysUser":"system",
"SysPwd":"system1",
"LoginName":"obm",
"BackupSetID":"1687137085658",
"Name":"filter1",
"TopDir":"C:\\test",
"Type":"DEFAULT",
"Include":false,
"Only":true,
"Apply2Dir":true,
"Apply2File":true,
"Patterns":[
{
"Pattern":".txt"
},
{
"Pattern":".png"
}
]
}
OUTPUT
{
"Status":"OK"
}