Skip to main content

Enable Partial Evaluation

note

Before you enable partial evaluation for a specific system, ensure that the BUNDLE_PARTIAL_EVAL feature flag is configured for your DAS instance. This feature flag can only be toggled by the platform administrator. For more information, contact support@styra.com.

Partial Evaluation for bundles can be enabled on individual systems on Styra DAS. The configuration for partial evaluation is toggled using a setting in the deployment parameters that are part of a system's configuration.

The following provides a sample request that updates a system's deployment_parameters.enable_partial_eval configuration. For more information, see the OpenAPI docs specific for systems.

1. Obtain the target system's configuration using GET.

curl -XGET -H "Authorization: Bearer ${STYRA_API_TOKEN}" \
"styra-das-id.styra.com/v1/systems/ff023b9d5a88476f9f7" \
| jq .result > system-ff023b9d5a88476f9f7.json

The above command uses jq to extract the result field from GET /v1/systems/:id response to obtain the current configuration of the system.

2. Edit the deployment parameters to set partial evaluation to true.

jq '.deployment_parameters.enable_partial_eval = true' system-ff023b9d5a88476f9f7.json > updated-system-ff023b9d5a88476f9f7.json

3. Update the target system's configuration with a PUT.

curl -XPUT -H "Authorization: Bearer ${STYRA_API_TOKEN}" \
-H "Content-Type: application/json" \
"styra-das-id.styra.com/v1/systems/ff023b9d5a88476f9f7" \
-d@updated-system-ff023b9d5a88476f9f7.json

To learn more about partial evaluation feature in OPA, see the Partial Evaluation on the OPA blog.