liveBook · Manning

Endpoint-level request metric

As explained in Secure APIs

An endpoint-level request metric is a quantitative measurement of requests directed to a particular API endpoint over time.

An endpoint-level request metric measures how often clients call a particular API endpoint over time. It reveals repeated-call patterns that a single log event may miss. section 11.6

For example, a counter on GET /books can record each request. Compare the average requests per minute with current activity, investigate unusual spikes, and consider rate limiting when the pattern appears abusive. section 11.6

Detecting endpoint enumeration

Repeated calls to a user-search endpoint can scrape existing users and their details. OpenTelemetry can report a custom list_books metric under the orders_meter scope; a sample value of 2 represents two GET /books requests.

How Secure APIs covers it

How deep it goes
Explains counter instrumentation, periodic metrics, threshold comparison, investigation, and rate-limiting response.
Examples
Uses GET /books, a user-search endpoint, the list_books counter, and an OpenTelemetry metrics log.
What it assumes
Assumes an API endpoint and basic instrumentation context while demonstrating the counter setup directly.
What you can do after
Builds an OpenTelemetry counter, compares request averages, investigates spikes, and applies rate limiting when warranted.
How it connects
Connects observability, OpenTelemetry, API endpoints, object enumeration, alerting, and rate limiting.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.