AP.getLocation not documented

AP offers AP.getLocation(callback()) . However it seems this is not documented. Is that because this function is deprecated or not official?

3 Likes

Is this not the docs you’re looking for? https://developer.atlassian.com/cloud/jira/platform/jsapi/navigator/

2 Likes

@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.

1 Like

@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"
2 Likes

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/

2 Likes