Api Limit Policies Create 2

POST handler with superadmin-only field protection.

Strips superadmin-only fields from non-superadmin requests before delegating to OrganizationInjectionMixin.post() for org injection.

Authentication

AuthorizationBearer
JWT access token or Respan API key

Path parameters

idstringRequired

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