Our monitoring system generates alerts, into which I'd like to put a link to Confluence for the alert in question. Since we create alerts all the time, the Confluence pages for them aren't yet written though, so I'd like to pro-actively like to put a link to where the page will be, if someone writes it (yes, I know you can argue the doco should get written first, but it isn't, so we've got to work with it).
The URLs of Confluence pages are no longer predictable because of the PageID (this wasn't the case some years ago, but never mind..)
If the alert has no page created, then obviously I'd expect Confluence to return a 404 type message. However, for pages that have been created, I'd like the user to end up there as normal.
All the alert documentation will be below a specific ancestor page, which already exists, so I know the URL/pageID for it.
By way of an example, let's say I have an alert called "disk_space". I'd like to generate a URL something like:
https://example.atlassian.net/wiki/spaces/ME/pages/1234567890/Monitoring+disk_space
(the actual page will called "Monitoring: disk_space")
Onto possible solutions:
The PageIDs aren't predictable, so I think I'm out of luck there.
Short URLs (like the share URLs) are based on PageID, so I'm out of luck there too.
The search feature is quite close to what's required. I can perform a search with:
https://example.atlassian.net/wiki/search?text=Monitoring%3A%20disk_space&title=true&ancestor=23452345
This returns at most one or two results, but there's apparently no way to do an "I'm feeling lucky" to immediately go to the first result.
Are there any other ways to work out a (possibly non-existent) page URL and send the user there?