The REST-API is here: https://docs.camunda.org/manual/7.7/reference/rest/execution/local-variables/.
But Cockpit isn’t able to set new local variables.
To set local variables in user forms, the most easy way is to define them in a task-listener creating the task. Then you can reference the variables with cam-variable-name
in the form.
Have a look at this post for further details: Variables in parallel process
Hope this helps,
Ingo