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:
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
problem is that i do not get anything, no error, just a blank {}
but i will add the read:jira-user
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.