Autofocus API tags issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Autofocus API tags issue

L0 Member

Hello,

 

I'm having an issue trying to get tags out of sample search in Autofocus API (using pan-python).

 

Below is a working piece of code I use. It get search results the way it shoud, but there's no "tags" field in the results.

 

Do you have any idea how to solve this issue?

 

def get_results_iterator(data): # used later in the code
try:
r = afapi.samples_search_results(data, False)
return r
except pan.afapi.PanAFapiError as e:
print('ERROR while trying to get results iterator:', e)
sys.exit(1)

try:
afapi = pan.afapi.PanAFapi(panrc_tag='autofocus')
except pan.afapi.PanAFapiError as e:
print('pan.afapi.PanAFapi:', e)
sys.exit(1)

url = "http://ascii.net"

data = """{
"query": {
"operator": "all",
"children": [{
"field": "alias.url",
"operator": "contains",
"value": "%s"
}]
},
"scope": "public",
"size": 10
}""" % url
results = get_results_iterator(data)

for r in results:
print r.json

 

0 REPLIES 0
  • 1250 Views
  • 0 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!