post
https://sandbox.saner.secpod.com/AncorWebService/perform
This method allows you to roll back the installed misconfiguration patches for a group. 'Account ID' is the required field.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| accountid | The account ID or name under which the rollback task is created | Yes | string |
| name | The name of the rollback task | Yes | string |
| schedule | The scheduled date for the rollback task in YYYY-MM-DD format (e.g., 2023-09-24) | Yes | string |
| starttime | The start time of the rollback task in HH:MM:SS format (e.g., 15:00:00) | Yes | string |
| endtime | The end time of the rollback task in HH:MM:SS format (e.g., 18:30:00) | No | string |
| startwindowtime | The start window time for the rollback task in HH:MM:AM/PM format (e.g., 15:24:PM) | Yes | string |
| startmessage | Message displayed when the remediation starts | No | string |
| endmessage | Message displayed when the remediation finishes | No | string |
| autoreboot | Whether to automatically reboot after rollback; accepted values: TRUE or FALSE | No | string |
| forcereboot | Whether to force reboot after rollback; accepted values: TRUE or FALSE | No | string |
| rebootmessage | Message displayed before the system reboots | No | string |
| autoreboottime | The scheduled date and time for auto reboot in YYYY-MM-DD.HH:MM:SS format (e.g., 2023-09-25.18:00:00) | No | string |
| device | List of target device names on which the rollback task will run | No | array |
| rollbackpatchesinfo | JSON array containing device name and associated patch IDs to be rolled back | Yes | array |
Python SDK code
Install:
pip install secpod-saner-sdkCall this endpoint:
from saner.cvem import CvemClient
client = CvemClient(
api_key="<YOUR_API_KEY>",
accountid="<YOUR_ACCOUNT_ID>",
base_url="https://saner.secpod.com"
)
response=client.Compliance.createMisconfigurationRollbackTask(
accountid="Demo Account",
name="Rollback_Job",
starttime="15:00:00",
startwindowtime="15:24:00",
schedule="2026-03-15",
rollbackpatchesinfo={
"devicename": "desktop-1",
"rollbackpatchinfo": [
{
"patchid": "cce-91967-0-patch.sh"
},
{
"patchid": "cce-91977-9-patch.sh "
}
]},
startmessage="rem start",
endmessage="end",
autoreboot="TRUE",
forcereboot="FALSE",
rebootmessage="rebooting",
autoreboottime="2026-09-25.18:00:00",
endtime="18:30:00"
)
print(response)
client.close()Requires Python 3.9 or later.