---
title: "How many events the caller holds this quota period"
method: GET
path: "/api/event_count/"
tags: ["Events"]
---

# How many events the caller holds this quota period

`GET /api/event_count/`

## Request

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

Returns the number of the caller's stored event rows that count toward their quota period (the current calendar month for a regular user, all time for an admin), plus the caller's event limit. The event limit applies to each view separately at its full value, so pass view to get the tally the matching events list is actually capped by; omit it for the total across every view you can open, which for an account with more than one view is a number no single list is capped by. Counting is O(rows) on the caller's whole partition, so the value is cached per (user, view) and refreshed in the background: a repeat call is served instantly from cache and may be up to a few minutes stale. The dashboard events page calls this separately from the events query so a slow count never delays the page, and refetches it on a tab switch.

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

## Query parameters

- `view` string

## 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)
