Skip to content

Unable to get all events at a given point in time #2

@cyrill-k

Description

@cyrill-k

When using the GRIP API (https://api.grip.inetintel.cc.gatech.edu/json/events), I encountered the issue that if many events occur simultaneously, it is not (easily) possible to fetch all events due to the limit of returning at most 10000 results for a given query.
To solve this issue, I initially tried to split my query into smaller queries using the available search filters described in (https://github.com/InetIntel/grip-api-legacy/blob/master/api-spec.md). In particular, I tried to narrow down the time range (ts_start and ts_end), the event duration (min_duration and max_duration), the event type (event_type), and the suspicion level (min_susp and max_susp). However even when narrowing all of these filters down to a single value, I still hit the limit of 10000 events.

search_after_view_ts = queryparams.get("search_after_view_ts", type=int)
search_after_id = queryparams.get("search_after_id", type=str)
if search_after_view_ts is not None and search_after_id is not None:
    kwargs["search_after"] = [search_after_view_ts, search_after_id]

Unfortunately, since I do not have access to the database and the elasticsearch backend, I cannot test whether this change will solve the issue or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions