Logical Filter Types
-
not—Logical "not" filter of object specified by "
filter
". -
and—Logical "and" filter of list of filter objects specified by "
filters
". -
or—Logical "or" filter of list of filter objects specified by "
filters
".
Response object:
Keys |
Values |
---|---|
offset |
Response offset to be passed for the next page of results |
results |
List of results |
To generate the next page of results, take the object received by the response in offset
and pass it as the value for the offset
of the next query.
Sample python code
req_payload = {"t0": "2016-11-07T09:00:00-0700",
"t1": "2016-11-07T19:00:00-0700",
"scopeName": "Default:Prod:Web",
"limit": 10,
"filter": {"type": "and",
"filters": [
{"type": "subnet", "field": "src_address", "value": "1.1.11.0/24"},
{"type": "regex", "field": "src_hostname", "value": "web*"}
]
}
}
resp = restclient.post('/flowsearch', json_body=json.dumps(req_payload))
print resp.status_code
if resp.status_code == 200:
parsed_resp = json.loads(resp.content)
print json.dumps(parsed_resp, indent=4, sort_keys=True)