As we are porting our business logic from Jira to YouTrack, we've come to realise, that Workflow APIs are rather limited as compared to YouTrack's own REST APIs. For example, current user is unable to find out its own ID from within a Workflow, whereas it is possible outside the workflow using REST API (see /users/me).
Which brings us to the following question: in Jira it is possible to call its REST APIs with the privileges of the user executing the workflow via ScriptRunner - it automatically imports Unirest within the scope of the script and all requests made with Unirest are "magically" authenticated as the user executing the workflow. This doesn't seem to be the case with YouTrack's http module. Of course, we could create a token an use this token in the workflow for authorisation as a workaround, but this means that REST API calls will be executed with a different user than the workflow, which doesn't help in the situation described above.
Is there a way out here?
All the best,