Tags

The following methods allow for interaction with the Tenable One Tags APIs.

Methods available on TenableOne.tags:

class TagsAPI(api: APISession)[source]
list(query_text: str | None = None, query_mode: QueryMode | None = None, filters: list[PropertyFilter] | None = None, extra_properties: list[str] | None = None, offset: int | None = None, limit: int | None = None, sort_by: str | None = None, sort_direction: SortDirection | None = None) Tags[source]

Retrieve tags

Parameters:
  • query_text (str, optional) – The text to search for.

  • query_mode (QueryMode, optional) – The search mode. Defaults to QueryMode.SIMPLE.

  • filters (list, optional) – A list of filters to apply. Defaults to None.

  • extra_properties (list, optional) – Additional properties to include in the response. Defaults to None.

  • offset (int, optional) – Number of records to skip. Defaults to 0.

  • limit (int, optional) – Maximum number of records per page. Defaults to 1000.

  • sort_by (str, optional) – Field to sort by.

  • sort_direction (SortDirection, optional) – Sorting direction, either SortDirection.ASC or SortDirection.DESC.

Returns:

The request tags.

Examples

>>> tags = tenable_inventory.tags.list()
>>> for tag in tags:
...     pprint(tag)
list_properties() list[Field][source]

Retrieve tags properties

Returns:

The tags properties.

Examples

>>> tenable_inventory_tags_properties = tenable_inventory.tags.list_properties()
>>> for tag_property in tenable_inventory_tags_properties:
...     pprint(tag_property)