post
https://sandbox.saner.secpod.com/AncorWebService/perform
This method updates the device name to a given custom name that will be displayed in Saner web console. The 'accountid' must be passed as a query parameter.
| Key Name | Meaning | Mandatory | Data Type |
|---|---|---|---|
| hostname | Hostname of the device whose alias needs to be updated | Yes | string |
| alias | Custom alias name to be assigned to the device | Yes | 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.Device.updateAlias(
hostname="DemoHost",
alias="NewDemoHost"
)
print(response)
client.close()Requires Python 3.9 or later.