Policy

Activate or replace the shadow policy for a bundle

Changed on

PUT upserts the shadow policy for the given bundle. A bundle has at most one shadow at a time; re-activating replaces the current one in place. Validation matches handlePutPolicyBundle — malformed YAML returns 400 before any Redis write.

put/api/v1/policy/shadows/{id}

Request

  • Base URL: http://localhost:8081
  • URL: http://localhost:8081/api/v1/policy/shadows/{id}
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Headers

X-Tenant-IDstring required

Tenant isolation header (required on all protected routes).

Request body

contentstring required

Raw YAML source of the candidate policy. Required.

metadataobject

Arbitrary operator-supplied key/value pairs; optional.

Response

Shadow policy activated

shadow_bundle_idstring required

Stable shadow-<12 hex> handle that persists across reactivation.

bundle_idstring required

Active bundle this shadow is tied to (one shadow per bundle).

tenant_idstring required
contentstring required

Raw YAML source of the candidate policy.

created_atstring date-time required
activated_atstring date-time required

Bumped on each re-activation; equals created_at on the first.

created_bystring required

Principal ID that activated the shadow.

metadataobject

Arbitrary operator-supplied key/value pairs (e.g. ticket refs).

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      endpoint added