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.

feed: process

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:

None

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.

feed

feed: feed-type

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:

dict

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')
update(feed_type=None)[source]

Initiates an on-line feed update based on the specified feed_type. If no feed type is specified, then it will default to initiating an update for all feed types.

feed: update

Parameters:

feed_type (str, optional) – The feed type to specifically return. Valid types are active, passive, lce, sc, or all.

Returns:

Update successfully requested.

Return type:

None