-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Work Item - Backend - Create
-
1
-
Minor
-
1
Summary
Some autoCompleteUrls returned via the below endpoint are not accessible through OAuth token and return 401 error, while they work via Basic Authentication:
Steps to Reproduce
Make a call to the following endpoint via OAuth 2.0
curl --location 'https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/issue/createmeta/{projectIdOrKey}/issuetypes/{issueTypeId}' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer xxxx'
Using the response you got from the endpoint above, make a get request to the autoCompleteUrl via Oauth 2.0 like the ff:
curl --location 'https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/user/assignable/search?project={projectKey}&query=' \ --header 'Authorization: Bearer xxxxx'
AutoCompleteURLs accessible via Bearer Token
- /rest/api/3/user/assignable/search?project={projectKey}&query=
- /rest/api/3/issue/picker?currentProjectId=&showSubTaskParent=true&showSubTasks=true¤tIssueKey=null&query=
AutoCompleteUrls not accessible via Bearer token
- /rest/api/1.0/labels/suggest?query=
- /gateway/api/v1/recommendations (Note: This Url is not working neither via Basic OAuth nor Bearer token )
- /rest/api/3/user/recommend?context=Reporter&issueKey=
Some urls being returned can be accessed via Oauth 2.0, some are not.
Expected Results
As for /rest/api/1.0/labels/suggest?query= endpoint, we expect to see a result as below: (We get the this response when accessing the endpoint via Basic OAuth)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <suggestionListStruct> <token></token> <suggestions> <label>LabelName1</label> <html><b></b>LabelName1</html> </suggestions> <suggestions> <label>LabelName2</label> <html><b></b>LabelName2</html> </suggestions> </suggestionListStruct>
Actual Results
While trying to access the /rest/api/1.0/labels/suggest?query= endpoint via Bearer token, we encounter the below error:
{ "code": 401, "message": "Unauthorized; scope does not match"}
Workaround
Currently there is no workaround.
- was cloned as
-
AI-968 Provide a public REST API endpoint to access the same data returned by /gateway/api/v1/recommendations endpoint
- Gathering Interest
-
JRACLOUD-84826 /rest/api/3/user/recommend API autoCompleteUrl is not accessible
- Gathering Interest
- is action for
-
ISSUE-18812 Loading...