If you are like me and are using many workspaces, it is easy to get lost which workspace works on which host and I also tend to mix up/forget workspace names. The easy solution is to have bookmarks/favorites that store access to a specific workspace.
However this doesn’t work out of the box.
If the login page on the same host is called a second time, then the workspace name stays. This is implemented via a cookie (ORA_WWV_REMEMBER_UN in Apex 18+). The cookie stores the most recent workspace name and user name for a certain time. If you have several different workspaces under the same url, the cookie will only remember the last one. If you try to bookmark this url, then it will always show the most recent workspace not active one when you bookmarked it. And not even the last workspace might be remembered once you come back from vacation, because the cookie expired meanwhile.
APEX is written in APEX. We can use our knowledge about APEX urls, to set the correct workspace via url parameters.
The login page for the internal apex application 4550 is page 1.
We can inspect the login page to find out about the correct item name.
The field with the workspace name is F4550_P1_COMPANY.
Simply supply the name of item and the value (=workspace name) like in any other apex application to the url.
Here is an example for apex.oracle.com. One of my workspace names is “SYNTESTWS”. And this will be the url, that I bookmark.
It also works with the username. Although I find that slightly less useful.
If you copy a real url, don’t forget to remove the session identifier information from the url. It does not make sense to bookmark that.
other related information
In Apex 18 the cookie info was improved (more in compliance with GDPR I think).
The parts of the url (especially the “p” parameter of the “f” function) are documented:
Also my Apex Quick Reference which sports APEX url syntax as a quick lookup tool and the next Syntegris 2019 calendar will feature Apex Urls. So try to get one of those during the next conferences (cu at DOAG 2018).