Look up a device you can already identify, by hostname, IP, MAC, serial number, or a tag filter.
This endpoint does not list the devices in an account. To enumerate every device under an account, use Basic System Details instead.
Exactly one selector should be sent. The request accepts more than one, but resolves them by position rather than intersecting them: hostname before apifilters returns that host, while apifilters before hostname returns nothing. Send one.
| Key | Meaning | Mandatory | Data Type |
|---|---|---|---|
| hostname | Device hostname | No | string |
| ip | Device IP address | No | string |
| mac | Device MAC address | No | string |
| serialnumber | Device serial number | No | string |
| apifilters | Tag-based filtering; see below | No | object |
Tag filters
apifilters matches against the tags a device carries. The value is a tags wrapper holding one or both operators, in and not in, each mapping a tag key to a list of values:
{"tags": {"in": {"group": ["ubuntu"]}}}
{"tags": {"in": {"group": ["ubuntu"]}}, "not in": {"os": ["Ubuntu 22.04"]}}Tag keys are specific to the account. Use Device Tag Keys to list the ones an account has. There is no account tag: the account is selected by the accountid query parameter.
A malformed filter fails silently, in two opposite directions.
- A value that cannot be read as a tag filter — no
tagswrapper, or a misspelt one, such as{"account": ["acme"]}— is ignored, and every device in the account is returned.- A well-formed filter naming a tag key the account does not have returns no devices, which looks the same as a tag that genuinely matches nothing.
Neither is reported as an error, so verify the filter against the shape above rather than inferring it from the size of the result. This matters most on the endpoints that use
apifiltersto scope an action rather than a query, where an ignored filter widens the action to the whole account.
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.getInfo(apifilters={
"tags": {
"in": {
"ip_address": ["192.168.1.1"]
}
}
})
#OR
response=client.Device.getInfo(hostname="windows 7")
#OR
response=client.Device.getInfo(ip="192.168.12.56")
print(response)
client.close()Requires Python 3.9 or later.