Autofocus API tags issue

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Autofocus API tags issue

L0 Member



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
r = afapi.samples_search_results(data, False)
return r
except pan.afapi.PanAFapiError as e:
print('ERROR while trying to get results iterator:', e)

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

url = ""

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


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!