The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello Community !
I'm facing an issue with the REST Api while trying to search issues in a Jira Cloud instance.
I'm using the Java Rest Client from Atlassian.
I created an App and allowed it for my cloud jira, then created a code/state, generated a token, and tried to test some Rest queries, which worked.
For example, a list of project works well :
curl --request GET --url https://api.atlassian.com/ex/jira/(cloud_id)/rest/api/2/project --header 'Authorization: Bearer (token)' --header 'Accept: application/json'
But when I try to search for issues, it won't work.
Here is the query :
curl --request GET --url https://api.atlassian.com/ex/jira/(cloud_id)/rest/api/latest/search?jql=project%3DMSHUK&expand=schema,names&maxResults=0&startAt=0 --header 'Authorization: Bearer (token)' --header 'Accept: application/json'
And the error :
{"errorMessages":["OAuth 2.0 is not enabled for this method."]}
Hi Frederic,
I understand that you are using the java rest client in an app, but getting back an error in regards to the REST API endpoint that app is trying to call. Sorry for the inconvenience here, it seems that this has been documented as a bug. Please see JRACLOUD-72126 for more details.
This particular bug appears to happen when called the /api/latest/ but does not seem to be happening when calling either the /api/2/ or /api/3/ (beta) endpoints. As such, perhaps you can work around this problem by explicitly calling either the v2 or v3 endpoint instead of using the latest URI here.
I hope this helps.
Andy
Oh thanks for the answer Andy,
I'll try this as soon as possible, but it seems to fit the issue I'm facing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.