Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-70805

The rest/api/3/user endpoint example is missing the parameter

      The rest/api/3/user endpoint example is missing the parameter.

      Indeed, while in the text right above the example it says you have to pass either the username or the key or the accountID (preferred, since the key and username are going to be removed soon as announce in: REST API migration guide and deprecation notice - removal of username and userkey), then nothing similar is found in the example below:

      curl --request GET \
        --url 'https://your-domain.atlassian.net/rest/api/3/user' \
        --header 'Authorization: Bearer <access_token>' \
        --header 'Accept: application/json'
      

       

      If you try to run the above example as it is, you'll get below error in return:

      {"errorMessages":["Either the 'externalId', 'username' or the 'key' query parameters need to be provided"],"errors":{}}
      

       

      On the other hand, the parameter is visible in the example REST Response:

      {
        "self": "http://your-domain.atlassian.net/rest/api/3/user?username=mia",
        "key": "mia",
        "accountId": "99:27935d01-92a7-4687-8272-a9b8d3b2ae2e",
      ....
      ..
      

       

       

      Please fix the example in the documentation for the REST Request so that it matches the one in the Response:

      "http://your-domain.atlassian.net/rest/api/3/user?username=mia
      

              skarp Sarah Karp
              dbonotto Dario B
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: