We asked about this in the decommissioned Forge Slack channel and got advise from the Forge team how to deduce the site information, though it turned out to be only applicable for Jira and not Confluence at the time (right now you can still apply the Jira approach on Confluence because Forge is not enabled for Confluence only sites).
Unfortunately I’ve misplaced my notes and cannot recall the details right now - will reply once more in case I find/recall those.
I do recall our workaround though, which is based on Tim Pettersen’s clever answer to Status URL for monitoring?:
There isn’t a formal status API that I’m aware of, but the AppLinks Manifest end-point is a good URL you can hit for most of our products (JIRA, Confluence, Stash, Bamboo, FishEye and Crucible). If it returns a 200, your server is probably in good shape.
It does not require authentication and is available at:
in all products.
This still seems to work fine on Atlassian Cloud, though you need to parse the response XML, see e.g.:
<name>Jira - Utoolity Support</name>
<name>Confluence - Utoolity Support</name>