Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,261
Community Members
 
Community Events
168
Community Groups

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

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

0 votes

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
Site Admin
TAGS

Atlassian Community Events