Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Use of /rest/api/3/search?jql from forge app (OAuth2)

German Distel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 25, 2022

Hello, I'm trying to get a list of issues (I just need the keys) from a given project in the context of a forge app.
With the Jira Rest API I can use the endpoint 

/rest/api/3/search?jql=project=MY-PROJECT-KEY
However, when attempting this inside a forge app I get that the method is not enabled for OAuth2.

It doesn't seem to be an issue with the scopes I have in the manifest:
scopes:
- read:jira-work
- read:issue:jira
- read:jql:jira

Instead, it seems that the endpoint is just not available for forge apps?
Is there another way I can get the issues for X project?

Thanks!

1 answer

1 vote
German Distel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 26, 2022

So, found the answer myself. In case anyone is being blocked by this:

Pay attention that the api needs to be called as api.asApp() instead of api.asUser().

Then just try the POST version of the search endpoint (jql goes in the body), instead of the GET version with the query in the queryparams.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events