post
https://sandbox.saner.secpod.com/AncorWebService/perform
Create a remediation rule for one group and its applicable assets.
This method allows you to add remediation rule for a set of groups with the collection of applicable products and platforms.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| accountid | Account identifier | No | string |
| rulename | Name of the remediation rule (alphanumeric, ., _, - allowed) | 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 (e.g., daily) | Yes | string |
| groupname | Group name | 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 to include in remediation | Yes | string |
| skipfeatureupdate | Skip feature update option (true/false) | 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.addRemediationRule(
rulename="demo rule1",
type="VULNERABILITY",
starttime="03:24:PM",
scheduletype="daily",
startwindowtime="03:30:PM",
groupname="ubuntu",
includeasset="apparmor",
ruledesc="desc",
apifilters={
"tags": {
"in": {
"Owner": [
"User1",
"User2"
]
},
"not in": {
"Category": [
"Finance"
]
}
}
}
)
print(response)
client.close()Requires Python 3.9 or later.