Limit Policies

Get a limit policy

Changed on

Return the policy with its live current_state.

get/api/limit-policies/{id}/

Request

  • Base URL
    https://api.respan.ai
  • URL
    https://api.respan.ai/api/limit-policies/{id}/
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

Limit policy id.

Response

The policy.

idstring uuid
namestring

Human label.

scopestring

Display category (e.g. API Key, Model). Not used for matching.

scope_valuestring

Identity to meter. For composites, a JSON list of values in compose order.

composestring[]

Empty for single-dimension policies. Members: organization_id, api_key_id, user_id, customer_identifier, model, endpoint.

metric'cost' | 'request_count' | 'token_count'

What the cap counts. cost is US dollars, token_count is total tokens, request_count is calls.

algorithm'balance_fixed_window'

balance_fixed_window is the shipped algorithm. token_bucket is reserved and not yet enforced.

periodstring nullable

Cadence. A named bucket (minute, hour, day, week, month), a positive integer of seconds as a string, or null for a cumulative (lifetime) cap that never resets.

anchor'calendar' | 'first_event' | 'explicit_ts'

When a recurring window aligns. calendar resets on the boundary (e.g. the 1st of the month).

anchor_atstring date-time nullable

Required when anchor is not calendar.

effective_atstring date-time nullable

Active-range start. null = live since forever.

expires_atstring date-time nullable

Active-range end. null = live until deactivated. Must be after effective_at.

priorityinteger

Higher is checked first.

is_activeboolean
threshold_valuenumber

First hard-rule threshold; falls back to the largest soft threshold.

meter_definition_idstring

Stable hash of the policy identity. Same identity resolves to the same id across recreations.

created_atstring date-time
updated_atstring date-time

Changes

    • breaking

      the response property became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the / response's property format changed from double to no format for status

    • breaking

      the response's property format changed from double to no format for status

    • info

      api operation id limitPolicies_retrieve_limit_policy removed and replaced with retrieve_limit_policy

    • info

      api tag Limit Policies added

    • info

      api tag limitPolicies removed

    • info

      the response optional property became read-only for the status

    • info

      the response optional property became read-only for the status

    • info

      the response optional property became read-only for the status

    • info

      the response optional property became read-only for the status

    • info

      the response optional property became read-only for the status

    • breaking

      the response property // became nullable for the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status