Editor¶
The following methods allow for interaction into the Tenable.io editor API endpoints. While these endpoints are pythonized for completeness within pyTenable, the Editor API endpoints should generally be avoided unless absolutely necessary. These endpoints are used to drive the Tenable.io UI, and not designed to be used programmatically.
Methods available on io.editor:
- class EditorAPI(api: restfly.session.APISession)[source]¶
- audits(etype, object_id, file_id, fobj=None)[source]¶
Retrieves an audit file from Tenable.io
- Parameters
etype (str) – The type of template to retrieve. Must be either
scanorpolicy.object_od (int) – The unique identifier of the object.
file_id (int) – The unique identifier of the file to export.
fobj (FileObject) – An optional File-like object to write the file to. If none is provided a BytesIO object will be returned.
- Returns
A File-like object of of the audit file.
- Return type
file
- details(etype, id)[source]¶
Constructs a valid scan document from the specified item.
Important
Please note that the details method is reverse-engineered from the responses from the editor API, and while we are reasonably sure that the response should align almost exactly to what the API expects to be pushed to it, this method by very nature of what it’s doing isn’t guaranteed to always work.
- Parameters
- Returns
The constructed scan configuration resource.
- Return type
Examples
>>> policy = tio.editor.details('scan', 1) >>> pprint(scan)
- plugin_description(policy_id, family_id, plugin_id)[source]¶
Retrieves the plugin description for the specified plugin.