Package com.google.gerrit.httpd.restapi
Class RestApiQuotaEnforcer
- java.lang.Object
-
- com.google.gerrit.httpd.restapi.RestApiQuotaEnforcer
-
public class RestApiQuotaEnforcer extends Object
Enforces quota on specific REST API endpoints.Examples:
- GET /a/accounts/self/detail => /restapi/accounts/detail:GET
- GET /changes/123/revisions/current/detail => /restapi/changes/revisions/detail:GET
- PUT /changes/10/reviewed => /restapi/changes/reviewed:PUT
Adds context (change, project, account) to the quota check if the call is for an existing entity that was successfully parsed. This quota check is generally enforced after the resource was parsed, but before the view is executed. If a quota enforcer desires to throttle earlier, they should consider quota groups in the
/http/*
space.