Assets V3 endpoints¶
The following methods allow for interaction into the Tenable.io assets API endpoints.
Methods available on tio.v3.explore.assets
:
- class AssetsAPI(api: restfly.session.APISession)[source]¶
This will contain methods related to Explore -> Assets V3 API endpoints.
Tenable.io Assets V3 APIs are deprecated. Tenable recommends you use the equivalent V2 APIs for search_host() and refrain from using the other functions.
- get_asset_uuids(**kw)[source]¶
Retrieves all the assets UUID’s for the matching filter tags.
- Parameters
filter (tuple, dict, optional) –
A nestable filter object detailing how to filter the results down to the desired subset. .. rubric:: Examples
>>> ('and', ('tags','eq', ['00000000-0000-0000-0000-000000000000']), ... ('tags', 'neq', ['00000000-0000-0000-0000-000000000001']) ... )
- Returns
List of asset UUID’s.
- Return type
Examples
>>> tio.v3.assets.get_asset_uuids(filter=('and', ('tags','eq', ['00000000-0000-0000-0000-000000000000']), ... ('tags', 'neq', ['00000000-0000-0000-0000-000000000001']) ... ) ...)
- search_all(**kw) → Union[tenable.io.v3.base.iterators.explore_iterator.SearchIterator, tenable.io.v3.base.iterators.explore_iterator.CSVChunkIterator, requests.models.Response][source]¶
Retrieves all the assets.
Tenable.io Assets V3 APIs are deprecated and must no longer be used.
- Parameters
filter (tuple, dict, optional) –
A nestable filter object detailing how to filter the results down to the desired subset. .. rubric:: Examples
>>> ('or', ('and', ('test', 'oper', '1'), ... ('test', 'oper', '2') ... ), ... 'and', ('test', 'oper', 3) ... ) >>> { ... 'or': [{ ... 'and': [{ ... 'value': '1', ... 'operator': 'oper', ... 'property': '1' ... }, ... { ... 'value': '2', ... 'operator': 'oper', ... 'property': '2' ... } ... ] ... }], ... 'and': [{ ... 'value': '3', ... 'operator': 'oper', ... 'property': 3 ... }] ... }
sort (list[tuple], optional) –
sort is a list of tuples in the form of (‘FIELD’, ‘ORDER’). It describes how to sort the data that is to be returned. .. rubric:: Examples
>>> [('field_name_1', 'asc'), ... ('field_name_2', 'desc')]
limit (int, optional) – Number of objects to be returned in each request. Default and max_limit is 200.
next (str, optional) – The pagination token to use when requesting the next page of results. This token is presented in the previous response.
return_resp (bool, optional) – If set to true, will override the default behavior to return a requests.Response Object to the user.
return_csv (bool, optional) – If set to true, it will return the CSV response or iterable (based on return_resp flag). Iterator returns all rows in text/csv format for each call with row headers.
- Returns
The iterable that handles the pagination for the job. requests.Response:
If
return_resp
is set toTrue
, then a response object is returned instead of an iterable.- Return type
Iterable
Examples
>>> tio.v3.assets.search_all(filter=('netbios_name', 'eq', 'SCCM'), ... limit=2, sort=[('last_observed', 'asc')])
- search_cloud_resource(**kw) → Union[tenable.io.v3.base.iterators.explore_iterator.SearchIterator, tenable.io.v3.base.iterators.explore_iterator.CSVChunkIterator, requests.models.Response][source]¶
Retrieves the cloud resource assets.
Tenable.io Assets V3 APIs are deprecated and must no longer be used.
- Parameters
filter (tuple, dict, optional) –
A nestable filter object detailing how to filter the results down to the desired subset. .. rubric:: Examples
>>> ('or', ('and', ('test', 'oper', '1'), ... ('test', 'oper', '2') ... ), ... 'and', ('test', 'oper', 3) ... ) >>> { ... 'or': [{ ... 'and': [{ ... 'value': '1', ... 'operator': 'oper', ... 'property': '1' ... }, ... { ... 'value': '2', ... 'operator': 'oper', ... 'property': '2' ... } ... ] ... }], ... 'and': [{ ... 'value': '3', ... 'operator': 'oper', ... 'property': 3 ... }] ... }
sort (list[tuple], optional) –
sort is a list of tuples in the form of (‘FIELD’, ‘ORDER’). It describes how to sort the data that is to be returned. .. rubric:: Examples
>>> [('field_name_1', 'asc'), ... ('field_name_2', 'desc')]
limit (int, optional) – Number of objects to be returned in each request. Default and max_limit is 200.
next (str, optional) – The pagination token to use when requesting the next page of results. This token is presented in the previous response.
return_resp (bool, optional) – If set to true, will override the default behavior to return a requests.Response Object to the user.
return_csv (bool, optional) – If set to true, it will return the CSV response or iterable (based on return_resp flag). Iterator returns all rows in text/csv format for each call with row headers.
- Returns
The iterable that handles the pagination for the job. requests.Response:
If
return_resp
is set toTrue
, then a response object is returned instead of an iterable.- Return type
Iterable
Examples
>>> tio.v3.assets.search_cloud_resource(filter=('netbios_name', 'eq', 'SCCM'), ... limit=2, sort=[('last_observed', 'asc')])
- search_host(**kw) → Union[tenable.io.v3.base.iterators.explore_iterator.SearchIterator, tenable.io.v3.base.iterators.explore_iterator.CSVChunkIterator, requests.models.Response][source]¶
Retrieves the host assets.
Tenable.io Assets V3 APIs are deprecated. Tenable recommends that you use the tio.exports.assets() method instead.
- Parameters
filter (tuple, dict, optional) –
A nestable filter object detailing how to filter the results down to the desired subset. .. rubric:: Examples
>>> ('or', ('and', ('test', 'oper', '1'), ... ('test', 'oper', '2') ... ), ... 'and', ('test', 'oper', 3) ... ) >>> { ... 'or': [{ ... 'and': [{ ... 'value': '1', ... 'operator': 'oper', ... 'property': '1' ... }, ... { ... 'value': '2', ... 'operator': 'oper', ... 'property': '2' ... } ... ] ... }], ... 'and': [{ ... 'value': '3', ... 'operator': 'oper', ... 'property': 3 ... }] ... }
sort (list[tuple], optional) –
sort is a list of tuples in the form of (‘FIELD’, ‘ORDER’). It describes how to sort the data that is to be returned. .. rubric:: Examples
>>> [('field_name_1', 'asc'), ... ('field_name_2', 'desc')]
limit (int, optional) – Number of objects to be returned in each request. Default and max_limit is 200.
next (str, optional) – The pagination token to use when requesting the next page of results. This token is presented in the previous response.
return_resp (bool, optional) – If set to true, will override the default behavior to return a requests.Response Object to the user.
return_csv (bool, optional) – If set to true, it will return the CSV response or iterable (based on return_resp flag). Iterator returns all rows in text/csv format for each call with row headers.
- Returns
The iterable that handles the pagination for the job. requests.Response:
If
return_resp
is set toTrue
, then a response object is returned instead of an iterable.- Return type
Iterable
Examples
>>> tio.v3.assets.search_host(filter=('netbios_name', 'eq', 'SCCM'), ... limit=2, sort=[('last_observed', 'asc')])
- search_webapp(**kw) → Union[tenable.io.v3.base.iterators.explore_iterator.SearchIterator, tenable.io.v3.base.iterators.explore_iterator.CSVChunkIterator, requests.models.Response][source]¶
Retrieves the WAS assets.
Tenable.io Assets V3 APIs are deprecated and must no longer be used.
- Parameters
filter (tuple, dict, optional) –
A nestable filter object detailing how to filter the results down to the desired subset. .. rubric:: Examples
>>> ('or', ('and', ('test', 'oper', '1'), ... ('test', 'oper', '2') ... ), ... 'and', ('test', 'oper', 3) ... ) >>> { ... 'or': [{ ... 'and': [{ ... 'value': '1', ... 'operator': 'oper', ... 'property': '1' ... }, ... { ... 'value': '2', ... 'operator': 'oper', ... 'property': '2' ... } ... ] ... }], ... 'and': [{ ... 'value': '3', ... 'operator': 'oper', ... 'property': 3 ... }] ... }
sort (list[tuple], optional) –
sort is a list of tuples in the form of (‘FIELD’, ‘ORDER’). It describes how to sort the data that is to be returned. .. rubric:: Examples
>>> [('field_name_1', 'asc'), ... ('field_name_2', 'desc')]
limit (int, optional) – Number of objects to be returned in each request. Default and max_limit is 200.
next (str, optional) – The pagination token to use when requesting the next page of results. This token is presented in the previous response.
return_resp (bool, optional) – If set to true, will override the default behavior to return a requests.Response Object to the user.
return_csv (bool, optional) – If set to true, it will return the CSV response or iterable (based on return_resp flag). Iterator returns all rows in text/csv format for each call with row headers.
- Returns
The iterable that handles the pagination for the job. requests.Response:
If
return_resp
is set toTrue
, then a response object is returned instead of an iterable.- Return type
Iterable
Examples
>>> tio.v3.assets.search_webapp(filter=('netbios_name', 'eq', 'SCCM'), ... limit=2, sort=[('last_observed', 'asc')])