How to get the current open workspace path in the backend service?

So I have a backend service but how that service knows the current open workspace URI (path) to access certain file there ?

[original thread by Soumesh Banerjee]

Server does not know, the user session belongs to the frontend. Service which are interested should receive this information as a part of request.

It is designed like that to support multiple clients using different workspaces for the same backend, i.e. think sharing your dev environments with colleagues and they open another folder.