Closed bedchr closed 4 years ago
which method?
I modified the sample script that provides the Crit numbers for TenableSC. I just don’t get the regular JSON output I get when using cURL. I get each pluginid with the fields below enclosed in their own {} but not a typical JSON format. It won’t even format as a JSON when I try in vscode after the fact. Here’s what I have: Plugins = sc.plugin.list( Fields([‘id’,’name’,’description’,’pluginPubDate’])) For plugin in plugins: Print(plugin)
The docs and code clearly detail that its an iterable thats returned. The iterable handles all of the pagination for you. Each item returned is a python dict already. I'm also confused as to your use of a field object. that technically should't work. I just ran this before posting:
>>> for p in sc.plugins.list(fields=['id', 'name', 'description', 'pluginPubDate']):
... print(p['id'])
I’m having trouble getting a normal JSON output when running the plugins API. Is there a way to fix this?