v4

latestOpenAPI 3.0.3MIT2026-08-012188139.4 KB
workspaces

Simulates the execution of a Policy to verify its behavior without taking any actions.

Before using this endpoint, the Policy to simulate must be created with the creation endpoint. To experiment with the policy, it is recommended to create the policy with disabled=True, so that it does not take effect outside the simulation endpoint.

This endpoint evaluates all packages in the workspace, generating a "decision log" for each evaluation. Each log contains:

  • Package metadata provided to the policy engine at runtime.
  • Output from the user-defined Rego policy.

No actions associated with the policy are executed. Instead, the endpoint reports what would happen to each package if the policy were active.

get/workspaces/{workspace}/policies/{policy}/simulate/

Path parameters

policystring required

The slug_perm (identifier) of the Policy.

workspacestring required

The name of the Workspace.

Query parameters

package_query_stringstring

A package search query by which to filter the packages being evaluated.

pageinteger

A page number within the paginated result set.

page_sizeinteger

Number of results to return per page.

Response