fix(harfanglab): drop the 50 KB filters catalogue from list outputs (1.7.1)
HarfangLab's alert and threat list endpoints echo, on every call, the catalogue of every filterable field — about 50 KB, unrelated to the results. get_security_events, get_alerts and get_threats now drop it before printing, so a fetch carries the alerts and little else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CXFMuDDLohs4qnL12mBJoP
This commit is contained in:
@@ -53,7 +53,11 @@ def main():
|
||||
"alert_time__gte": inputs.get("from_date"),
|
||||
"alert_time__lte": inputs.get("to_date"),
|
||||
}
|
||||
print(json.dumps(request("GET", base + "/api/data/alert/alert/Alert/" + qs(params), headers)))
|
||||
out = request("GET", base + "/api/data/alert/alert/Alert/" + qs(params), headers)
|
||||
# The list endpoints echo the catalogue of filterable fields (~50 KB) on
|
||||
# every call; it says nothing about the results, so it is not passed on.
|
||||
out.pop("filters", None)
|
||||
print(json.dumps(out))
|
||||
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user