Folders

The following methods allow for interaction into the Tenable Vulnerability Management folders API endpoints.

Methods available on tio.folders:

class FoldersAPI(api: APISession)[source]
create(name)[source]

Create a folder.

folders: create

Parameters:

name (str) – The name of the new folder.

Returns:

The new folder id.

Return type:

int

Examples

>>> folder = tio.folders.create('New Folder Name')
delete(id)[source]

Delete a folder.

folders: delete

Parameters:

id (int) – The unique identifier for the folder.

Returns:

None

Examples

>>> tio.folders.delete(1)
edit(id, name)[source]

Edit a folder.

folders: edit

Parameters:
  • id (int) – The unique identifier for the folder.

  • name (str) – The new name for the folder.

Returns:

The folder was successfully renamed.

Return type:

None

Examples

>>> tio.folders.edit(1, 'Updated Folder Name')
list()[source]

Lists the available folders.

folders: list

Returns:

List of folder resource records.

Return type:

list

Examples

>>> for folder in tio.folders.list():
...     pprint(folder)