Assets¶
Methods described in this section relate to the the assets API.
These methods can be accessed at TenableOT.assets
.
- class AssetsAPI(api)[source]¶
- connections(id)[source]¶
Retreive the connections of a given asset
- Parameters
id (str) – The unique identifier for the asset.
- Returns
The list of connections present on the given asset.
- Return type
Example
>>> connections = ot.assets.connections(id)
- details(id)[source]¶
Retreive the details of a given asset
- Parameters
id (str) – The unique identifier for the asset.
- Returns
The resource record for the asset
- Return type
dict
Example
>>> asset = ot.assets.details(id)
- list(**kwargs)[source]¶
Retreives a list of assets.
- Parameters
filters (list[tuple], optional) – A list of filter tuples.
orderBy (list[dict], optional) – A list of order documents, each of which must contain both the
field
anddirection
keys.search (str, optional) – A search string to further limit the response.
- Returns
An iterator object that will handle pagination of the data.
- Return type
OTIterator
Example
>>> for asset in ot.assets.list(): ... print(asset)