v51

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01206322659.2 KB
k2

Author a new access-shaping rule on a knowledge base.

post/orgs/{org_id}/k2/{kb_id}/policies

Path parameters

org_idstring required
kb_idstring required

Request body

audit_level'none' | 'normal' | 'verbose'

Audit verbosity for matches against this rule.

break_glass_allowedboolean
column_masksBTreeMap
compliance_tagsstring[]
descriptionstring nullable
enabledboolean

Defaults to true; set false to author the rule in a draft state.

external_idstring nullable
labelsobject

Free-form key/value labels.

namestring required

Operator-facing label.

purpose_tagsstring[]
row_filter_dslobject required

Row predicate JSON. Stored opaquely in this release.

source'manual' | 'imported' | 'derived'

Provenance of the rule.

table_namestring nullable

Target table within the knowledge base. Omit to apply to every table.

Response

Policy created

audit_level'none' | 'normal' | 'verbose' required

Audit verbosity for matches against this rule.

break_glass_allowedboolean required

Whether sessions may bypass the rule via a logged escalation.

column_masksBTreeMap
compliance_tagsstring[] required

Compliance classifications (e.g. hipaa.phi, pci.pan).

created_atstring date-time required
descriptionstring nullable
enabledboolean required

When false, the rule body is inactive everywhere it is bound.

external_idstring nullable
idstring required
kb_idstring required
labelsobject required

Free-form key/value labels.

namestring required

Operator-facing label.

purpose_tagsstring[] required

Purpose-of-use bindings (e.g. treatment, research).

revisioninteger required

Revision token for optimistic concurrency on update and delete.

row_filter_dslobject required

Row predicate authored as JSON. Stored opaquely in this release.

source'manual' | 'imported' | 'derived' required

Provenance of the rule.

table_namestring nullable

Target table within the knowledge base. Null applies to every table.

updated_atstring date-time required