permvar: finish API to set values