---
title: "Per-view event tallies for the events page tabs"
method: GET
path: "/api/event_view_counts/"
tags: ["Events"]
---

# Per-view event tallies for the events page tabs

`GET /api/event_view_counts/`

## Request

- Base URL: `https://eyalsec.com`
- URL: `https://eyalsec.com/api/event_view_counts/`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in cookie `__Host-es2session`

Returns how many of your stored events came from each agent kind you have access to. Every view you can open is always present, at zero when you have none, so a caller never has to guess whether a missing key means zero or an error. Which views you have is set per account: every product is one an administrator enables for you individually. An account with no products enabled receives {}. Each number is what the events list for that view would actually show, not a raw row count: your monthly event quota and the bucket parameter narrow it exactly as they narrow the list, so a tab and the rows under it cannot disagree. Admins have no quota. /api/event_count/ remains the separate quota-period tally. Counting is O(rows) on your whole partition, so the result is cached per (account, scope, bucket, quota) and refreshed in the background: a repeat call is served instantly and may be up to a minute stale.

This is a **read**: a read-only API key may call it.

## Query parameters

- `bucket` string
- `scope` string
- `scope_mode` string
- `scope_empty` boolean

## Response `200`

OK.

- object

## Other responses

- `401`: The API key is missing, wrong, revoked or expired.
- `429`: A rate limit was hit, or the account is locked after wrong passwords. Retry-After gives the seconds to wait.
- `default`: An error. Check the status first; the body carries a short message, as JSON ({"error": "..."}) on most endpoints and as plain text on some. 400: malformed JSON, an invalid regex, an unreadable cursor or date, or an unknown value. 401: the API key is missing, wrong, revoked or expired. 403: a failed CSRF check, a read-only key trying to write, a product or feature not enabled on your account, a wrong password, or a write on an account limited to reading. 404: not found, including things that belong to another account. 409: conflict with the current state. 422: a field is missing or invalid. 429: a rate limit was hit, or the account is locked after wrong passwords. 500: something failed on our side.

---

[API](https://skmtc.dev/eyalsec/apis/eyalsec-api.md) · [All operations](https://skmtc.dev/eyalsec/apis/eyalsec-api/llms.txt) · [OpenAPI document](https://skmtc.dev/eyalsec/apis/eyalsec-api/revisions/dc7520689cf1?raw)
