You need to sign in to do that
Don't have an account?

Server URL
Is there an equivalent of $Api.Enterprise_Server_URL_111 in an Apex
Class? To get the session Id, I need UserInfo.getsessionid(), but is
the only way to get the URL by setting it as a formula field somewhere
and retrieve it? I can't see any other way...

Passing the url to a visualforce controller via the visualforce page is possible.