Policy Preview
POST/code/api/v1/policies/preview
Prisma Cloud Application Security supports policy-as-code capabilities using YAML-based policy definition files to enable attribute and connection checks (composite checks).
For information on defining YAML-based policies, see the Prisma Cloud documentation about the Code Editor and Custom Build Policy Examples. If you are upgraded to Darwin, see Code Editor and Custom Build Policy Examples.
To use the API request, add your token to the header. API supports both YAML and JSON configuration of Prisma Cloud Application Security custom policy schema.
This API gets up to 30 results (by default) of non-compliant resources for a specific policy. The input is the policy to test and the output is an array of resources results.
Use the first example to configure the API to test a policy, and use the second example as a reference of the expected output.
Request
Responses
- 200
- 403
- 404
- 422
- 500
Got policy preview
Response Headers
Payment required
policies are not found
Request arguments validation error
Could not get policy preview data