Query Vision Events

Query vision events with filters, time ranges, and pagination.

Single Page Query

Use query_vision_events() to fetch a single page of results:

import roboflow

roboflow.login()

rf = roboflow.Roboflow()
ws = rf.workspace()

page = ws.query_vision_events(
    "a1b3c8e1",                          # use case ID (required)
    event_type="quality_check",          # filter by single event type
    start_time="2024-01-14T00:00:00Z",   # ISO 8601 start time
    end_time="2024-01-15T23:59:59Z",     # ISO 8601 end time
    limit=50,                            # max events per page
)

for evt in page["events"]:
    print(evt["eventId"], evt["eventData"])

You can also pass additional filters as keyword arguments. These are forwarded directly to the API:

For manual pagination, use the cursor parameter with the nextCursor value from a previous response:

Paginate Through All Results

Use query_all_vision_events() to automatically paginate through all matching events. It yields one page of events at a time:

For full details on available filters, operators, and response formats, see the REST API reference.

Last updated

Was this helpful?