Important

The Nessus Package is currently a Technology Preview

Folders

Methods described in this section relate to the folders API. These methods can be accessed at Nessus.folders.

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

Create a new folder

Parameters:

name (str) – The name of the new folder

Returns:

The id for the created folder.

Return type:

int

Example

>>> id = nessus.folders.create('Example')
delete(folder_id: int) None[source]

Deletes a user-defined folder

Parameters:

folder_id (int) – The unique identifier for the folder to delete

Example

>>> nessus.folders.delete(id)
edit(folder_id: int, name: str) None[source]

Updated the name of the specified folder.

Parameters:
  • folder_id (int) – Unique identifier for the folder to edit

  • name (str) – New name for the folder

Example

>>> nessus.folders.edit(id, name='New Example')
list() List[source]

Gets the list of available folders

Returns:

List of folder objects

Return type:

List

Example

>>> for folder in nessus.folders.list():
...     print(folder)