extracting username from Community Hub

Hi,

I am building a workflow where i would need to extract the username (only logged in user can run on specific Teams Hub)

I would like to extract the username who is running it.

-already tried with the system extractor node, it only returned knime.

-also tried to extract the knime.execution.user variable with a java snippet, but it seems unavailable (probs changed something or does not have permissions in Community Hub Teams.)

Is there any way to get the username who started the data app/execution?

Thank you in advance

Hi @GZ92,

Are you looking to fetch this as the WFs are being executed live or more of batched analysis?

I suppose you could this using a GET request call. You would also need to authenticate suing KNIME Hub authenticator node.

https://api.hub.knime.com/knime/rest/v4/execution-contexts/execution-context-id/jobs

replace the execution-context-id with your execution context id.

and then using JSON path and ungroup node get the users who started the job.

Jobs In KNIME hub community teams plan remains in memory for 1 week, so worth doing once every week and writing the results to a file for further long term tracking/data analysis.

Best,

Bilal