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.
Obtain the target system's configuration using
GET
.curl -XGET -H "Authorization: Bearer ${STYRA_API_TOKEN}" \
"<das-id>.styra.com/v1/systems/ff023b9d5a88476f9f7" \
| jq .result > system-ff023b9d5a88476f9f7.jsonThe above command uses jq to extract the
result
field from theGET /v1/systems/:id
response to obtain the current configuration of the system.Edit the deployment parameters to set partial evaluation to true.
jq '.deployment_parameters.enable_partial_eval = true' system-ff023b9d5a88476f9f7.json > updated-system-ff023b9d5a88476f9f7.json
Update the target system's configuration with a
PUT
.curl -XPUT -H "Authorization: Bearer ${STYRA_API_TOKEN}" \
-H "Content-Type: application/json" \
"<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 article on the OPA blog.