Until today I could make a request to
https://api.atlassian.com/ex/jira/{cloudId}/rest/api/2/search
with jql in body and always get results. But now I always get 400 status code with message "Issue does not exist or you do not have permission to see it." I did not change anything in my integration, it just stopped working. I get this error for every request I try to make.
My request body looks like:
{
"startAt":0,
"maxResults":1000,
"jql":"issue in ('mt-4517', 'demo-3', 'test-99', 'ts-2', 'test-310') and project in (projectsWhereUserHasPermission('Work on issues')) ORDER BY createdDate DESC",
"fields":["summary","project"]
}
I found out that the problem is in "issue in ('mt-4517', 'demo-3', 'test-99', 'ts-2', 'test-310') and" part of the JQL. If I create a request with JQL with only "project in (projectsWhereUserHasPermission('Work on issues')) ORDER BY createdDate DESC" it returns correct results
Hello @Tilen
Given that you're accessing Jira Cloud via https://api.atlassian.com/, then I assume you're using an OAuth 2.0 based connection, not Basic Auth.
That being the case, please note that CHANGE-1462 came into effect a few days ago, which was the application of CHANGE-1320 from December last year, whereby notice was given that requests to that endpoint that contain certain mistakes will no longer be accepted.
Double check your entire request URL to see if it contains any of the mistakes described in that deprecation notice as no longer being allowed.
Hi @Tilen
When you search this query in Jira UI, does it return any issues?
Please also check Search for issues using JQL (POST), Authentication and authorization.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
yes it works in Jira UI. I pasted the wrong JQL before, the one that does not work via API request but it works in Jira UI is
"issue in ('mt-4517', 'demo-3', 'test-99', 'ts-2', 'test-310') and project in (projectsWhereUserHasPermission('Work on issues')) ORDER BY createdDate DESC".
But all other request returns correct result like creating or updating worklogs, getting projects or issue statues and also if I create request with this JQL, the API returns correct result "project in ('DEMO', 'MK', 'MT', 'OT', 'TES', 'TEST', 'TS') and status in (10201, 10211, 6, 10001, 10217, 10212, 3, 10216, 10100, 1, 10210, 4, 5, 10202, 10000, 10215, 10222, 10213, 10209, 10208, 10214) ORDER BY createdDate DESC".
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.