Evaluate an expressionAdded in 8.9
POST/expression/evaluation
Strongly Consistent About endpoint data consistency
Evaluates a FEEL expression and returns the result. Supports references to tenant scoped
cluster variables when a tenant ID is provided. Optionally, provide a scopeKey to make the
variables of a specific process instance or element instance visible while evaluating the
expression.
When the expression references a secret (camunda.secrets.<name>), the endpoint never
returns the resolved secret value. Instead, each reference resolves to its own literal
placeholder text camunda.secrets.<name>, which composes like any other string. This
changed in 8.10; previously such references evaluated to null and logged a warning:
=camunda.secrets.TESTnow returns"camunda.secrets.TEST".="Bearer " + camunda.secrets.TESTnow returns"Bearer camunda.secrets.TEST".
This placeholder mechanism is bypassed if the request-body variables include a variable
literally named camunda. In that case the request-body variable takes precedence, so
camunda.secrets.<name> resolves against it instead of producing a placeholder (typically
evaluating to null).
Every secret reference the evaluation encountered from a trusted source is listed in the
referencedSecrets array of the response. That array reports every camunda.secrets.<name>
name that was referenced, whether or not a matching secret is configured: a misspelled or
unconfigured name is still listed here and only surfaces as an error later, in the errors
array of the follow-up POST /v2/secrets/resolve call. To obtain the actual secret values,
resolve those references yourself with that endpoint
(POST /v2/secrets/resolve).
For background on how the cluster resolves secret references in other contexts, such as during job activation, see Secret resolution and job activation. That page describes a different mechanism than this endpoint uses.
Request
Responses
- 200
- 400
- 401
- 403
- 500
Expression evaluated successfully
The provided data is not valid.
The request lacks valid authentication credentials.
Response Headers
Forbidden. The request is not allowed.
An internal error occurred while processing the request.