AP offers AP.getLocation(callback()) . However it seems this is not documented. Is that because this function is deprecated or not official?
AP.getLocation not documented
Is this not the docs you’re looking for? https://developer.atlassian.com/cloud/jira/platform/jsapi/navigator/
@rwhitbeck No, the function AP.navigator.getLocation returns a json object with different information. AP.getLocation returns a string with the host Url of the atlassian.net location.
These functions are very similar called, but return different information.
@rwhitbeck
AP.navigator.getLocation returns:
{"target":"contentview","context":{"contentId":123456789,"contentType":"page","spaceKey":"TEST"}}
while AP.getLocation returns:
"https://XXXXX.atlassian.net/wiki/spaces/TEST/pages/123456789/PAGENAME"
I just hit this as well and I am confused why this is not documented (anymore?). @rwhitbeck there is a post here that refers to AP.getLocation
but like @marc mentioned this is different from AP.navigator.getLocation
.
This method is still documented for Bitbucket Cloud: https://developer.atlassian.com/cloud/bitbucket/jsapi/ap/