3
是否有JIRA Atlassian獲取項目圖標/徽標的API?是否有JIRA Rest API獲取JIRA Projects的徽標/圖標
我使用/ rest/api/latest/project API從JIRA Atlassian中獲取項目詳細信息,但是在這個api中沒有Project avatar對每個項目。
是否有JIRA Atlassian獲取項目圖標/徽標的API?是否有JIRA Rest API獲取JIRA Projects的徽標/圖標
我使用/ rest/api/latest/project API從JIRA Atlassian中獲取項目詳細信息,但是在這個api中沒有Project avatar對每個項目。
如果您檢索使用一個項目的細節:GET /project/{projectIdOrKey}你會得到的結果是這樣的:
{
"expand": "description,lead,url,projectKeys",
"self": "http://www.example.com/jira/rest/api/2/project/EX",
"id": "10000",
"key": "EX",
"description": "This project was created as an example for REST.",
"lead": {
"self": "http://www.example.com/jira/rest/api/2/user?username=fred",
"name": "fred",
"avatarUrls": {
"48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred",
"24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"
},
"displayName": "Fred F. User",
"active": false
},
...
"avatarUrls": {
"48x48": "http://www.example.com/jira/secure/projectavatar?size=large&pid=10000",
"24x24": "http://www.example.com/jira/secure/projectavatar?size=small&pid=10000",
"16x16": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
"32x32": "http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"
},
"projectCategory": {
"self": "http://www.example.com/jira/rest/api/2/projectCategory/10000",
"id": "10000",
"name": "FIRST",
"description": "First Project Category"
}
}
的avatarUrls部分提到的網址,在diferent分辨率項目圖標。
請注意,還有一個avatarUrls部分根據導致。這提到了項目主管化身的URL。
謝謝, 我得到了項目頭像使用下面的API。 /rest/api/2/project/{ProjectKey}/ –
此網址將在瀏覽器中運行,但在代碼中,我們需要使用GET請求下載圖像數據,然後將數據轉換爲圖像。我們無法將此圖片網址分配給imageView,因爲這不是精確的圖片網址。 –
如果我們有projectId(pid),那麼我們也可以在下面的url中替換pid的值來獲得頭像。 http://www.example.com/jira/secure/projectavatar?pid=10000 –