简体   繁体   English

从Atlassian JIRA获取Application Navigator内容

[英]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. 我现在浏览Atlassian文档已有几个小时,但仍然没有找到任何相关的钩子。

Basically I want to implement the Application Navigator to other internal tools. 基本上,我想将Application Navigator实施到其他内部工具。 There is no need to modify them - just display all existing Application Navigator links. 无需修改它们-仅显示所有现有的Application Navigator链接。

Any idea where/ how I can fetch all entries from the Application Navigator via any API Atlassian provides? 知道我在哪里/如何通过Atlassian提供的任何API从应用程序导航器中获取所有条目吗? We also use Confluence and could use one of the API's this tool provides but I didn't finy any hook there either. 我们还使用Confluence,并且可以使用此工具提供的API之一,但是我也没有在其中找到任何钩子。

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. 从Chrome中的网络流量来看,我看到有一个REST调用,用于在应用切换器中获取链接。 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: 截至本回答之时(JIRA 7.1),调用rest/menu/latest/appswitcher将返回对象数组的JSON,其结构如下:

[
    {
        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. menu API未记录,因此我扎根在缩小的JS上,以了解如何使用此数据。

  • key is an identifier, and seems to be unused. key是一个标识符,似乎未使用。
  • Obviously, link and label are the link href and text, respectively. 显然, linklabel分别是链接href和文本。
  • local does nothing at all, it seems. local似乎什么也没做。
  • If self is true, that just means that it's the currently selected link. 如果self为true,则仅表示它是当前选择的链接。
  • applicationType seems to have something to do with suggesting apps to the user, but it's also not used for building the link list. applicationType似乎与向用户建议应用程序有关,但是它也不用于构建链接列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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