Use local and process variable in form

Hi, i tried to use process variable in UI Form. To do this i used Bonita REST API for:
localVar ../API/bpm/activityVariable/{{}}/localVar
processVar ../API/bpm/caseVariable/{{task.rootContainerId}}/processVar

[localVar] - Bonita process local variable (for task), of BDM Type.
[processVar] - Bonita process variable, the same type as above.

BDM Type
attr1 - string
attr2 - string
attr3 - int
attr4 - string

get mandatory fields in form (REST API)

Hi all,
How can I know if an input in a form is mandatory or not through the REST API?
Also I'm trying to update a process variable's value by giving it a value in an instantiation form..but the variable is not updating, any help?

this is my formInput (JSON):

"requestInput" : {
"leaveStart" : null,
"dayCount" : null
"mycenas" : null

this is my formOutput:

return {
'requestInput': $data.formInput.requestInput,
'mycenas': $data.cenasValue.value