APIZDocs

APIZ guide

Choose And Operate A Policy

Policy is optional. Add it when a Client Binding is still broader than the job the agent should perform. Both Policy types use the same fail-closed lifecycle:

Working Draft -> credential-free Fixtures -> Published Revision
              -> published suite passes -> Enable -> Attach

Editing or testing a Working Draft does not change live traffic. Publishing does not enable or attach it. Each transition is explicit.

Choose Structured Or Scripted

NeedStructured PolicyScripted Policy
Guided authoring without codeBest choiceNo
Match adapter action, method, resource, tags, origin, or GeoYes, when exposed by the descriptorYes
Simple allow/deny/reply/rate-limit outcomeYesYes
Inspect or rewrite the logical requestLimited to supported structured parametersYes, through the bounded request API
Return a synthetic responseWhen supported by the structured outcomeYes
Custom branching or combined conditionsLimitedYes
Runtime error behaviorDenyDeny

Start with Structured Policy. Choose Scripted Policy only when the task cannot be expressed clearly with guided fields.

If the requirement is simply “accept this API only from these source networks,” configure the API Instance IP and Geo filtering first. The API Instance IP allowlist is evaluated before Policy and cannot be overridden by an allow decision.

Detailed Tutorials

Each tutorial has separate Web Console and CLI procedures and ends with attachment, live verification, and Access Log evidence.

Attachment Order

  • A Client Binding Policy affects one Client-to-API route and runs first.
  • An API Instance Policy affects every request reaching the API Instance and runs afterward.
  • Policies at the same layer run in ascending execution order.
  • A required Policy always runs. An optional Policy may be skipped only by an earlier decision that explicitly requests it.

For a first Policy, attach it to one Client Binding with order 100. Move a rule to the API Instance layer only when it should apply to every Client using that upstream connection.

Fixture Safety

Policy Fixtures contain synthetic requests and expected decisions. They never resolve an upstream credential or send traffic upstream. Do not paste tokens, cookies, ciphertext, customer payloads, private logs, or production requests into a Fixture.

See Writing Policy Fixtures for the complete Fixture contract.