Plugins¶
Methods described in this section relate to the plugins API.
These methods can be accessed at TenableOT.plugins.
- class PluginsAPI(api: restfly.session.APISession)[source]¶
- list(query: str = '\nquery plugins(\n $filter: PluginExpressionsParams\n $search: String\n $sort: [PluginSortParams!]!\n $limit: Int\n $startAt: String\n) {\n plugins(\n filter: $filter\n search: $search\n sort: $sort\n first: $limit\n after: $startAt\n ) {\n pageInfo {\n endCursor\n }\n nodes {\n id\n name\n source\n family\n severity\n vprScore\n comment\n owner\n totalAffectedAssets\n affectedAssets {\n nodes {\n id\n name\n }\n }\n }\n }\n}\n', query_filter: Optional[dict] = None, search: Optional[str] = None, sort: Optional[List[dict]] = None, start_at: Optional[str] = None, limit: Optional[int] = 200, **kwargs) → tenable.ot.graphql.iterators.OTGraphIterator[source]¶
Retrieves a list of plugins via the GraphQL API.
- Parameters
query (str) – A GraphQL query .
query_filter (dict, optional) – A document as defined by Tenable.ot online documentation.
search (str, optional) – A search string to further limit the response.
sort (List[dict], optional) – A list of order documents, each of which must contain both the
fieldanddirectionkeys and may also contain the optionalfunctionkey. Default sort is by descending id order. Please refer to Tenable.ot online documentation for more information.start_at (str, optional) – The cursor to start the scan from (the default is an empty cursor).
limit (int, optional) – Max number of objects that get retrieved per page (the default is 200).
- Returns
An iterator object that will handle pagination of the data.
- Return type
OTGraphIterator
Example
>>> for plugin in tot.plugins.list(limit=500): print(plugin)
- plugin(plugin_id: int, **kwargs) → tenable.ot.graphql.iterators.OTGraphIterator[source]¶
Retrieve a specific plugin with additionals details by ID.
- Parameters
plugin_id (int) –
- Returns
An iterator object handling data pagination.
- Return type
OTGraphIterator
Example
>>> tot.plugins.plugin(1)
- schema_class¶
alias of
tenable.ot.graphql.schema.plugins.PluginsSchema