GET /workspaces/{workspace}/policies/{policy}/simulate/
Changed onSimulates 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.
Request
- Base URLhttps://api.cloudsmith.io/v2
- Auth
- API key in header X-Api-Key
- or HTTP basic
Path parameters
The slug_perm (identifier) of the Policy.
The name of the Workspace.
Query parameters
A package search query by which to filter the packages being evaluated.
A page number within the paginated result set.
Number of results to return per page.
Response
Changes
- breaking
added to the
///response propertyoneOflist for the response status - info
added
BlockPackagediscriminator mapping keys to the///response property for the response status - info
added the required property
//////////////to the response with the status - info
added the required property
//////////////to the response with the status - info
added the required property
//////////////to the response with the status - info
added the required property
//////////////to the response with the status
- breaking
- breaking
added to the
////response propertyoneOflist for the response status - info
added
MavenPackagediscriminator mapping keys to the////response property for the response status
- breaking