JIRA Atlassian是否有任何API可以获取项目图标/徽标。
我使用/ rest / api / latest / project API从JIRA Atlassian获取项目详细信息,但是此api中没有针对每个项目的Project头像。
答案 0 :(得分:3)
如果您使用: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 部分以不同的分辨率提及项目图标的网址。
请注意, lead 下还有 avatarUrls 部分。这提到了项目负责人头像的URL。