Api Limit Policies Update 2

PUT handler with superadmin lock and field protection.

Same as patch() - checks lock and field protection before delegating.

Authentication

AuthorizationBearer
JWT access token or Respan API key

Path parameters

idstringRequired

Request

This endpoint expects an object.
namestringOptional<=255 characters
scopestringOptional<=64 characters
rulesanyOptional
priorityintegerOptional-2147483648-2147483647
is_activebooleanOptional

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.

rulesanyRead-only
anchorenum
  • calendar - Calendar
  • first_event - First event
  • explicit_ts - Explicit timestamp
anchor_atdatetime or nullRead-only
refill_ratedouble or nullRead-only