post
https://sandbox.saner.secpod.com/AncorWebService/perform
Create Patch Rollback Job.
This method allows you to roll back the installed patches for a group.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| accountid | Account identifier | Yes | string |
| name | Name of the rollback job | Yes | string |
| schedule | Schedule date (YYYY-MM-DD format), or immediate to run at once | Yes | string |
| starttime | Start time (HH:MM:SS or HH:MM:AM/PM format) | No (required unless schedule is immediate) | string |
| startmessage | Message displayed at start | No | string |
| endmessage | Message displayed at end | No | string |
| autoreboot | Auto reboot option (TRUE/FALSE) | No | string |
| rebootmessage | Message before reboot | No | string |
| startwindowtime | Start window time (HH:MM:AM/PM format) | No (required unless schedule is immediate) | string |
| forcereboot | Force reboot option | No | string |
| autoreboottime | Scheduled reboot time (YYYY-MM-DD.HH:MM:SS format) | No | string |
| rollbackpatchesinfo | Rollback patch details including device and patch ids (JSON array) | 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.Patch.createRollbackTask(
accountid="Demo Account",
name="rollback job",
schedule="immediate",
rollbackpatchesinfo=[
{
"devicename": "2ca553c1988f",
"rollbackpatchinfo": [
{
"patchid": "gcc-14-base"
}
]
}
]
)
print(response)
client.close()Requires Python 3.9 or later.