Api Limit Policies Partial Update

PATCH handler with superadmin lock and field protection.

Checks:

  1. Object lock (is_managed=True -> non-superadmins can’t modify)
  2. Field protection (non-superadmins can’t modify specific fields)

Authentication

AuthorizationBearer
JWT access token or Respan API key

Response

idstringRead-only
namestringRead-only
scopestringRead-only
scope_valuestringRead-only
composeanyRead-only
metricenum
  • cost - Cost
  • request_count - Request count
  • token_count - Token count
algorithmenum
  • balance_fixed_window - Balance fixed window
  • token_bucket - Token bucket
periodstring or nullRead-only
effective_atdatetime or nullRead-only
expires_atdatetime or nullRead-only
priorityintegerRead-only
is_activebooleanRead-only
threshold_valuedoubleRead-only
meter_definition_idstringRead-only
updated_byobject
created_atdatetimeRead-only
updated_atdatetimeRead-only
current_stateobject

Live counter state for the policy’s current window. Sourced from Redis (same key apply_limits evaluates against). Populated by the view’s bulk prefetch on list responses; falls back to a single HGET on detail.

tagslist of objectsRead-only

GenericTag rows assigned to this policy. Managed via /api/tag-assignments/limit_policies/... — read-only here.