post
https://sandbox.saner.secpod.com/AncorWebService/perform
This method allows users to add a discovery config for a network scanner. Account, device name, targets, and schedule field values as mandatory input fields for this method. Supported schedule field values are “daily”, “weekly”, “monthly”, and “date”.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| account | Account name or ID | Yes | string |
| devicename | Name of the network scanner device | Yes | string |
| targets | Target IP addresses for discovery scan | Yes | array |
| target | Target domain name for discovery scan | No | string |
| schedule | Schedule frequency (daily, weekly, monthly, date) | Yes | string |
| starttime | Scan start time (format: HH:MM:AM/PM) | No | string |
| endtime | Scan end time (format: HH:MM:AM/PM) | No | string |
| monthoftheyear | Month of the year (numeric value) | No | string |
| weekofthemonth | Week of the month (numeric value) | No | string |
| dayoftheweek | Day of the week (numeric value) | 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.NetworkScanner.addDiscoveryScanConfig(
account="Demo Account",
devicename="endpoint_device",
targets=["172.28.0.12"],
schedule="weekly",
starttime="08:10:AM",
endtime="08:10:PM",
dayoftheweek="1",
monthoftheyear="1",
weekofthemonth="2",
target="example.com"
)
print(response)
client.close()Requires Python 3.9 or later.