post
https://sandbox.saner.secpod.com/AncorWebService/perform
Update an existing remediation rule for one group.
This method allows you to update remediation rule for a set of groups.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| accountid | Account identifier | No | string |
| rulename | Name of the remediation rule | Yes | string |
| ruledesc | Description of the rule | No | string |
| type | Type of rule (VULNERABILITY or COMPLIANCE) | Yes | string |
| starttime | Start time (HH:MM:AM/PM format) | Yes | string |
| endtime | End time (HH:MM:AM/PM format) | No | string |
| startwindowtime | Start window time (HH:MM:AM/PM format) | Yes | string |
| scheduletype | Schedule type | Yes | string |
| groupname | Group name(s) | Yes | string |
| forcereboot | Force reboot option (true/false) | No | string |
| remediationdelayindays | Delay in days before remediation (1–7, default 0 if not provided) | No | string |
| includeasset | Asset(s) to include | No | string |
| excludeasset | Asset(s) to exclude | No | string |
| skipfeatureupdate | Skip feature update option | No | string |
| apifilters | Filters for rule selection using tags | No | 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.updateRemediationRule(
rulename="demo rule1",
type="VULNERABILITY",
starttime="03:24:AM",
scheduletype="daily",
apifilters={
"tags": {
"in": {
"Owner": [
"User1",
"User2"
]
},
"not in": {
"Category": [
"Finance"
]
}
}
}
)
print(response)
client.close()Requires Python 3.9 or later.