Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-43975

REST endpoint /rest/api/2/user documentation is incorrect

    XMLWordPrintable

    Details

      Description

      Problem

      The /rest/api/2/user endpoint documentation shows the following 200 response:

      {
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "name": "fred",
          "emailAddress": "fred@example.com",
          "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": true,
          "timeZone": "Australia/Sydney",
          "groups": {
              "size": 3,
              "items": [
                  {
                      "name": "jira-user",
                      "self": "http://www.example.com/jira/rest/api/2/group?groupname=jira-user"
                  },
                  {
                      "name": "jira-admin",
                      "self": "http://www.example.com/jira/rest/api/2/group?groupname=jira-admin"
                  },
                  {
                      "name": "important",
                      "self": "http://www.example.com/jira/rest/api/2/group?groupname=important"
                  }
              ]
          },
          "expand": "groups"
      }
      

      However, this actually returns:

      {
          "active": true,
          "avatarUrls": {
              "16x16": "http://quicksilver:8080/jira/secure/useravatar?size=xsmall&avatarId=10122",
              "24x24": "http://quicksilver:8080/jira/secure/useravatar?size=small&avatarId=10122",
              "32x32": "http://quicksilver:8080/jira/secure/useravatar?size=medium&avatarId=10122",
              "48x48": "http://quicksilver:8080/jira/secure/useravatar?avatarId=10122"
          },
          "displayName": "Matheus Fernandes",
          "emailAddress": "mfernandes@atlassian.com",
          "expand": "groups",
          "groups": {
              "items": [],
              "size": 7
          },
          "key": "matheus",
          "locale": "en_US",
          "name": "matheus",
          "self": "http://quicksilver:8080/jira/rest/api/2/user?username=matheus",
          "timeZone": "Brazil/East"
      }
      

      It also returns "key" that is not included in the documentation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              drauf Daniel Rauf
              Reporter:
              mfernandes@atlassian.com Matheus Fernandes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: