Schema introspection
Every command below with arguments supports two read-only flags for tooling and AI agents:--show-file-schema: print the JSON Schema for the full request object (the format--filenameaccepts).--show-argument-schema <flag-name>: print the JSON Schema for one argument’s value. Pass the kebab flag name without the leading--(e.g.org-id, not--org-id).
get-org
Get an org retention policy
Requires org.retention_policy.get at the scope in the URL.
The key must cover that scope. Scope headers do not select the target.
Returns the explicit policy, if present, and the effective policy with its source scope.
The nearest current policy supplies both windows. Fields are not merged across scopes.
When no scope in the lineage has a current policy, effective_policy is null and data is
retained indefinitely.
Usage
Options
--show-file-schema, --show-argument-schema <flag-name>, and --filename. See Schema introspection for details.
replace-org
Replace an org retention policy
Requires org.retention_policy.put at the scope in the URL.
The key must cover that scope. Scope headers do not select the target.
Replaces both windows. Both fields are required. Null retains data indefinitely.
A shorter window makes older data expire. Runs of the retention expiry job delete it, and a
large amount of expired data can take more than one run. Deleted data cannot be recovered.
An explicit policy overrides inherited windows, including when both values are null.
Creates a new policy version and preserves the previous version for audit.
Usage
Options
--show-file-schema, --show-argument-schema <flag-name>, and --filename. See Schema introspection for details.
delete-org
Delete an org retention policy
Requires org.retention_policy.delete at the scope in the URL.
The key must cover that scope. Scope headers do not select the target.
Retires this scope’s current override and returns the inherited effective policy.
Preserves prior policy values and records the retiring actor, time, and cleared reason.
Repeated deletion is safe when no override exists.
Usage
Options
--show-file-schema, --show-argument-schema <flag-name>, and --filename. See Schema introspection for details.
get-workspace
Get a workspace retention policy
Requires workspace.retention_policy.get at the scope in the URL.
The key must cover that scope. Scope headers do not select the target.
Returns the explicit policy, if present, and the effective policy with its source scope.
The nearest current policy supplies both windows. Fields are not merged across scopes.
When no scope in the lineage has a current policy, effective_policy is null and data is
retained indefinitely.
Usage
Options
--show-file-schema, --show-argument-schema <flag-name>, and --filename. See Schema introspection for details.
replace-workspace
Replace a workspace retention policy
Requires workspace.retention_policy.put at the scope in the URL.
The key must cover that scope. Scope headers do not select the target.
Replaces both windows. Both fields are required. Null retains data indefinitely.
A shorter window makes older data expire. Runs of the retention expiry job delete it, and a
large amount of expired data can take more than one run. Deleted data cannot be recovered.
An explicit policy overrides inherited windows, including when both values are null.
Creates a new policy version and preserves the previous version for audit.
Usage
Options
--show-file-schema, --show-argument-schema <flag-name>, and --filename. See Schema introspection for details.
delete-workspace
Delete a workspace retention policy
Requires workspace.retention_policy.delete at the scope in the URL.
The key must cover that scope. Scope headers do not select the target.
Retires this scope’s current override and returns the inherited effective policy.
Preserves prior policy values and records the retiring actor, time, and cleared reason.
Repeated deletion is safe when no override exists.
Usage
Options
--show-file-schema, --show-argument-schema <flag-name>, and --filename. See Schema introspection for details.
get-project
Get a project retention policy
Requires project.retention_policy.get at the scope in the URL.
The key must cover that scope. Scope headers do not select the target.
Returns the explicit policy, if present, and the effective policy with its source scope.
The nearest current policy supplies both windows. Fields are not merged across scopes.
When no scope in the lineage has a current policy, effective_policy is null and data is
retained indefinitely.
Usage
Options
--show-file-schema, --show-argument-schema <flag-name>, and --filename. See Schema introspection for details.
replace-project
Replace a project retention policy
Requires project.retention_policy.put at the scope in the URL.
The key must cover that scope. Scope headers do not select the target.
Replaces both windows. Both fields are required. Null retains data indefinitely.
A shorter window makes older data expire. Runs of the retention expiry job delete it, and a
large amount of expired data can take more than one run. Deleted data cannot be recovered.
An explicit policy overrides inherited windows, including when both values are null.
Creates a new policy version and preserves the previous version for audit.
Usage
Options
--show-file-schema, --show-argument-schema <flag-name>, and --filename. See Schema introspection for details.
delete-project
Delete a project retention policy
Requires project.retention_policy.delete at the scope in the URL.
The key must cover that scope. Scope headers do not select the target.
Retires this scope’s current override and returns the inherited effective policy.
Preserves prior policy values and records the retiring actor, time, and cleared reason.
Repeated deletion is safe when no override exists.
Usage
Options
--show-file-schema, --show-argument-schema <flag-name>, and --filename. See Schema introspection for details.