简体   繁体   中英

Fetch Application Navigator Content from Atlassian JIRA

I am just browsing through the Atlassian docs for some hours now and still didn't find any hooks for this.

Basically I want to implement the Application Navigator to other internal tools. There is no need to modify them - just display all existing Application Navigator links.

Any idea where/ how I can fetch all entries from the Application Navigator via any API Atlassian provides? We also use Confluence and could use one of the API's this tool provides but I didn't finy any hook there either.

Thank you in advance!

Looking in my network traffic in Chrome, I see that there is a REST call to get the links in the app switcher. As of the time of this answer (JIRA 7.1), calling rest/menu/latest/appswitcher will return JSON of an array of objects, structured like so:

[
    {
        key: "home",
        link: "https://jira.company.com/secure/MyJiraHome.jspa",
        label: "JIRA",
        local: false,
        self: true,
        applicationType: "jira"
    },
    {
        key: "home",
        link: "https://confluence.company.com/",
        label: "Confluence",
        local: false,
        self: false,
        applicationType: "confluence"
    },
    {
        key: "home",
        link: "https://something.company.com",
        label: "Custom Web App",
        local: true,
        self: false,
        applicationType: "jira"
    }
]

The menu API is undocumented, so I rooted around the minified JS to see what I could find out about how this data is used.

  • key is an identifier, and seems to be unused.
  • Obviously, link and label are the link href and text, respectively.
  • local does nothing at all, it seems.
  • If self is true, that just means that it's the currently selected link.
  • applicationType seems to have something to do with suggesting apps to the user, but it's also not used for building the link list.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM