Forums

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

How to understand which scope you need with REST API?

Joost Landgraf May 28, 2025

Hi,

Trying to understand why my token without scope is returning issues as expected with jql.
However, when using a scoped API-token it's a bit of a guess which read-scopes I need to always make sure I get the result.

So my question is, is there a way to tell me which read-scopes I have used for a certain jql?

What I want is all issues and their state of certain epics of a certain project to start with.

I am using:
read:jira-work
read:issue-details:jira
read:issue-meta:jira
read:issue-status:jira
read:avatar:jira
read:audit-log:jira
read:field-configuration:jira

and the jql currently pretty basic:

{
  "fields": ["*all"],
  "fieldsByKeys": true,
  "jql": "project = MyFirstProject"
}

Any tips appreciated, especially since I cannot change the scope afterwards which I do not mind only if the UX for creating a new token is a tad better.

 

3 answers

1 accepted

1 vote
Answer accepted
Joost Landgraf June 2, 2025

Found the solution by a smart remark in a bug report.

so for the future :)

Unscoped Token
https://<yourdomain>/atlassian.net/rest/api/3/search/jql

Scoped Token
https://api.atlassian.com/ex/jira/<cloudid>/rest/api/3/search/jql

The pitfall was that using the unscoped-token url, you get a 200 and empty result, so I was thinking, ok there is something wrong with the scope.

 

0 votes
Dilip
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 28, 2025

Hi @Joost Landgraf 

You can check the api documentation for the particular API, to get the scope.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/

Regards,

Dilip Kumar

Joost Landgraf June 1, 2025

Thank, tried them, but still got a 200 with empty issues. so My bet is i am still missing some scopes which i have no clue which ones.. 

 

0 votes
Oliver Siebenmarck _Polymetis Apps_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2025

Hi @Joost Landgraf ,

Welcome to the community!

The new scopes come in two flavors: classic and granular. The first scope in your list (read:jira-work) should already be enough to hit the new search endpoint at: /rest/api/3/search/jql 

When you use the scoped token, what kind of error message are you seeing? Or is does the response differ in content? That would make it a lot easier to troubleshoot here.

Best regards,
 Oliver

EDIT: Thinking about it, you might want to add read:jira-user. This is another classic scope and while it is technically not required for the JQL endpoint, it might become important if your query includes user info.

Joost Landgraf June 1, 2025

problem is that i do not get anything, no error, just a blank {}
but i will add the read:jira-user

 

Suggest an answer

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

Atlassian Community Events