post
https://sandbox.saner.secpod.com/AncorWebService/perform
This method is used to add a scheduled scan to perform a PA scan for an existing account.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| organization | Name of the organization for which the scan configuration is being added. | Yes | string |
| account_name | Name of the account for which the posture anomaly scan schedule will be configured. | Yes | string |
| schedule | Defines the scan schedule type (for example: monthly). | Yes | string |
| starttime | Time when the scan should start (format example: 10:00:AM). | No | string |
| monthoftheyear | Month of the year when the scan should run (numeric value representing month). | No | string |
| weekofthemonth | Week of the month in which the scan should run. | No | string |
| dayoftheweek | Day(s) of the week when the scan should run (comma separated numeric values). | No | string |
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.PostureAnomaly.addScannerConfig(
account_name="Default",
organization="Demo Org",
schedule="daily"
)
print(response)
client.close()Requires Python 3.9 or later.