Policies

Resolve the effective policy for an effect type

Returns the workspace default with is_default=true when no explicit policy exists.

get/v1/policies/{effectType}

Request

  • Base URL: https://ratchetgate.com
  • URL: https://ratchetgate.com/v1/policies/{effectType}
  • Auth: HTTP bearer

Path parameters

effectTypestring required

Response

Default Response

effect_typestring
mode'allow' | 'require_approval' | 'deny'
on_indeterminate'block' | 'retry' | 'probe'
lease_secondsinteger
max_attemptsinteger
max_cost_microsinteger nullable
daily_budget_microsinteger nullable
retention_daysinteger
require_costboolean
reconcile_every_hoursinteger nullable

How often this effect type should be compared against the vendor's own record. Ratchet cannot perform that comparison — it keeps the calendar and says when one is overdue, via the reconciliation.due event.

approval_above_microsinteger nullable

Declared cost at or above which begin returns approval_required instead of execute. Raises the decision only — it never turns an approval or a denial back into an allow. Null disables it.

structuring_threshold_microsinteger nullable

A line watched but never enforced. Nothing is refused for exceeding it; the structuring analysis measures how closely declared amounts crowd it.

required_dimensionsstring[]

Dimensions a caller must declare on begin, or the call is refused. Without this a ceiling keyed on a dimension is evaded by simply not declaring it.

dimension_limitsobject

Per-dimension daily ceilings, e.g. {"counterparty":{"daily_micros":200000000,"daily_count":20}} for "no more than $200 and no more than 20 effects to any one counterparty per UTC day". daily_count applies even to effects that declare no cost, which is what makes it usable for outbound messaging.

surge_per_hourinteger nullable

New effects of this type per hour above which the circuit breaker opens. Null disables surge containment, which is the default.

surge_action'monitor' | 'require_approval' | 'deny'
surge_cooldown_secondsinteger
surge_multiplierinteger nullable

Relative surge threshold: how many times normal is definitely wrong. Use when you do not know your own traffic. Does nothing until enough history exists to compute a baseline.

surge_baseline_per_hourinteger nullable

Median hourly volume over the last 7 days. Computed for you.

surge_effective_ceilinginteger nullable

The hourly ceiling actually in force, whichever rule produced it.

surge_ceiling_source'absolute' | 'learned' | 'null' nullable
is_defaultboolean

Changes

No recorded changes to this operation across all 1 revision of this API.