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:
File diff suppressed because one or more lines are too long
@@ -53,7 +53,11 @@ def main():
|
|||||||
"alert_time__gte": inputs.get("from_date"),
|
"alert_time__gte": inputs.get("from_date"),
|
||||||
"alert_time__lte": inputs.get("to_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:
|
try:
|
||||||
|
|||||||
@@ -40,7 +40,11 @@ def main():
|
|||||||
"alert_time__gte": inputs.get("created_after"),
|
"alert_time__gte": inputs.get("created_after"),
|
||||||
}
|
}
|
||||||
url = base + "/api/data/alert/alert/Alert/" + qs(params)
|
url = base + "/api/data/alert/alert/Alert/" + qs(params)
|
||||||
print(json.dumps(request("GET", url, headers)))
|
out = request("GET", url, 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:
|
try:
|
||||||
|
|||||||
@@ -39,7 +39,11 @@ def main():
|
|||||||
"creation_date__gte": inputs.get("created_after"),
|
"creation_date__gte": inputs.get("created_after"),
|
||||||
}
|
}
|
||||||
url = base + "/api/data/alert/alert/Threat/" + qs(params)
|
url = base + "/api/data/alert/alert/Threat/" + qs(params)
|
||||||
print(json.dumps(request("GET", url, headers)))
|
out = request("GET", url, 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:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user