Skip to main content
This is a beta feature. Beta features provide early access to product functionality. These features may change between releases without warning, or can be removed in a future release. Please contact us to enable this feature for your organization.

Synopsis

Get a rego policy, or one version of it. Without --policy-version, the policy is shown with its newest version and its current version. The current version is the highest-numbered valid version, which is the one an evaluation runs, so it can be older than the newest version. With --policy-version, that version is shown with its status, its digest, who published it and when, and the reason when it is rejected or failed. The command exits 0 whatever the status of the version. With --download and --policy-version, the bundle of that version is written to the given file as a gzipped tar, unchanged and whatever the status of the version, in place of printing it. An existing file is not overwritten.

Flags

Flags inherited from parent commands

Examples Use Cases

These examples all assume that the flags --api-token, --org, --host, (and --flow, --trail when required), are set/provided.
Last modified on October 30, 2026