GET /process-instance - Underscores in variable names

Hi there,

I want to use the REST API to query process information.

In particular, I’m using

GET /process-instance?variables=employee_email_eq_foo@bar.com

See https://docs.camunda.org/manual/7.3/api-references/rest/#process-instance-get-instances

So the point is that my process variables do contain underscores which causes the query to fail:

Cannot set query parameter 'variables' to value 'employee_email_eq_foo@bar.com': variable query parameter has to have format KEY_OPERATOR_VALUE.

Is there any way to handle this? Any way to escape the underscores in the variable name?

Thanks!
Frank

Hi Frank,

the correct html encoding for an underscore is %5f . Did you try to issue
the query with that?

Cheers,
Christian

Thanks! Yes I tried that already. It does not help.

There must be some way to tell Camunda which underscores are part of the variable name and which are the seperator for the “eq” operator.

There is also the possibility to use a POST to query for the process
instance. See
https://docs.camunda.org/manual/7.3/api-references/rest/#process-instance-get-instances-post
. You can then add your query in the json body like shown in the example
here: https://docs.camunda.org/manual/7.3/api-references/rest/#request

Does that help you?

1 Like