How do I get current login userid in plugin frontend?

I watched this tutorial on how to build a camunda plugin. But I can’t find more info about how {api, processInstanceId} work.

for example. I am trying to query some process-instance via /history/process-instance
with userid as param.

I use the tasklist.list plugin point in my custom script. I don’t know what I have access to in there. Do I have userid on the fly or I need some other steps. where can I find this informations.

also I found hot deployment on the tomcat distribution not working after I change my script. don’t know why. I changed my plugin label but after restart my plugin lable remains the same.