Craig Rose
03/25/2026, 12:31 AM/api/accounts/{account_id}/workspaces/{workspace_id}/events/filter . If I post to this with no request body it only returns total=20 records and next_page = null. I was expecting to get many more records than that. The cloud UI shows over a 1000 pages. Can you explain what I'm doing wrong.Marvin
03/25/2026, 12:31 AMMarvin
03/25/2026, 12:33 AMPOST <https://api.prefect.cloud/api/accounts/{account_id}/workspaces/{workspace_id}/events/filter>
Content-Type: application/json
{
"filter": {
"occurred": {
"since": "1970-01-01T00:00:00Z",
"until": "2026-12-31T23:59:59Z"
}
},
"limit": 50
}
Notes:
- limit is capped by the API (you’ll get up to 50 per page).
- total in the response will reflect the count for that filter window.
2) Follow pagination using next_page
- The response includes next_page when there are more results. Call that URL directly (it’s a GET) to fetch subsequent pages until next_page is null.
GET <https://api.prefect.cloud/api/events/filter/next?page-token=>...
3) Sanity checks if counts still look off
- Make sure you’re using the same account_id/workspace_id as the UI you’re viewing.
- Ensure your token is scoped to that workspace.
- Align the occurred filter with any time filters you’ve set in the UI.
Reference docs:
- Prefect Events concept: Events overview
- Cloud REST API reference (Redoc): Prefect Cloud API docs
If you can share the exact date range you’re trying to match from the UI, I can give you a precise filter body to use.