post
https://sandbox.saner.secpod.com/AncorWebService/perform
Register one device by its IP, MAC address, and hostname.
This method allows you to add devices. It requires IP, Hostname, MAC address, and Operating system. You may also assign the device to a group using tags.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| ip | Device IP address | Yes | string |
| hostname | Device hostname | Yes | string |
| mac | Device MAC address | Yes | string |
| os | Operating system of the device | No | string |
| tags | Key/value metadata for device grouping | No | object[] |
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.Device.add(
ip="192.168.89.45",
mac="99-4D-XX-XX-XX-XX",
hostname="windows 7",
tags={
"Location":"New York",
"type":"endpoint"
}
)
print(response)
client.close()Requires Python 3.9 or later.