Feeds¶
The following methods allow for interaction into the Tenable Security Center Feed API.
Methods available on sc.feeds
:
- class FeedAPI(api: APISession)[source]¶
- process(feed_type, fobj)[source]¶
Initiates an off-line feed update based on the specified feed_type using the file object passed as the update file.
- Parameters:
feed_type (str) – The feed type to specifically return. Valid types are active, passive, lce, sc, or all.
fobj (FileObject) – The file object to upload into SecurityCenter and use as the update package.
- Returns:
Update successfully requested.
- Return type:
Examples
updating the active plugins:
>>> with open('sc-plugins-diff.tar.gz', 'rb') as plugfile: ... sc.feeds.process('active', plugfile)
- status(feed_type=None)[source]¶
Returns the status of either a specific feed type (if requested) or all of the feed types if nothing is specifically asked.
- Parameters:
feed_type (str, optional) – The feed type to specifically return. Valid types are active, passive, lce, sc, or all.
- Returns:
If no specific feed type is specified, then a dictionary with each type listed with a sub-dictionary detailing the status is returned. If a specific feed type is requested, then only the status information for that feed type is returned.
- Return type:
Examples
Getting all of the feed types returned:
>>> status = sc.feed.status()
Getting the feed status for a specific type (e.g. active).
>>> status = sc.feeds.status('active')