Search code examples
jirajira-rest-apijira-rest-java-api

is there JIRA Rest API to get logo/icons of JIRA Projects


Is there any API for JIRA Atlassian to fetch project icon/logo.

I'm using /rest/api/latest/project API to fetch projects details from JIRA Atlassian, however there is no Project avatar in this api against each project.


Solution

  • If you retrieve the details of a project using: GET /project/{projectIdOrKey} you'll get a result like this:

    {
        "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"
        }
    }
    

    The avatarUrls part mentions the URLs for the project icon in diferent resolutions.

    Note that there is also an avatarUrls section under lead. This mentions the URLs for the project lead's avatar.