post
https://sandbox.saner.secpod.com/AncorWebService/perform
This method allows users to add a network scanner config. Supported schedule field values are “daily”, “weekly” and “monthly”.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| account | Account name or ID | Yes | string |
| configname | Name of the network scan configuration | Yes | string |
| description | Description of the network scan configuration | No | string |
| targets | Target IP ranges for scanning | Yes (either targets or target) | array |
| target | Target domain name for scanning | Yes (either targets or target) | string |
| excludetargets | Targets excluded from scanning | No | array |
| enableudpports | Enable UDP ports option (TRUE or FALSE) | No | string |
| tcpports | TCP ports to scan. Applies independently of portoption, so supplying it is how a custom TCP port list is scanned | No | array |
| udpports | UDP ports to scan, used with enableudpports. Applies independently of portoption | No | array |
| portoption | Port selection option. Accepted value: default ports, matched case-insensitively and returned as Default Ports. A custom port list is supplied through tcpports/udpports rather than through this field | Yes | string |
| schedule | Schedule frequency (daily, weekly, monthly) | No | 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.addNetworkScanConfig(
account="Demo Account",
configname="test_config",
targets=["172.16.15.39","172.16.15.96"],
portoption="default ports"
)
print(response)
client.close()Requires Python 3.9 or later.