Forums

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

Issue search API returns results only from team-managed projects

Pradeep Agrawal
October 17, 2022

I am trying to search all issues but getting results only from team-managed projects and not from company-managed ones. The endpoint I am using is:

 

https://api.atlassian.com/ex/jira/<cloud_id>/rest/api/3/search?startAt=#0&maxResults=1000
Am I missing something?

3 answers

0 votes
Nic Brough -Adaptavist-
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 Champions.
October 18, 2022

My guess is that your search includes a clause looking for content in a custom field.  One that only exists in a team-managed project, so other projects will be ignored (this is one of the reasons that team-managed projects are not yet useful for any organisation with more than one team using Jira)

Pradeep Agrawal
October 18, 2022

Hi @Nic Brough -Adaptavist- there are no custom fields that I have in my query, here is the full url I am using with the parameters:

https://api.atlassian.com/ex/jira/<cloud_id>/rest/api/3/search?startAt=#0&maxResults=1000

Nic Brough -Adaptavist-
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 Champions.
October 18, 2022

Is that search really the one you are running?  There are no search terms at all?

Pradeep Agrawal
October 18, 2022

Yes there aren't. I am trying to query all tickets.

Nic Brough -Adaptavist-
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 Champions.
October 18, 2022

Ok, that means that either the user you are using for the query does not have "browse project" permission (possibly because your process is not logging in, and the projects you do get issues from have anonymous access enabled), or the API you are using is not right.

I say the second one because https://api.atlassian.com is not one you should be using - it should be https://<your atlassain site>.atlassian.net

Trudy Claspill
Community Champion
October 18, 2022

@Nic Brough -Adaptavist- 

I wondered about that too. The OP provided a reference document link:

 https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#about under "Other integrations"

Like # people like this
Nic Brough -Adaptavist-
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 Champions.
October 18, 2022

It is an API link I've never used, other than for authentication.  Certainly not for reading issue/page/git data from any of the Cloud services.

Like Stefan Salzl likes this
0 votes
Brant Schroeder
Community Champion
October 17, 2022

@Pradeep Agrawal Does the account / credentials that you are using have access to the projects that you are not seeing?

Pradeep Agrawal
October 17, 2022

Yes, I have confirmed that it does

Brant Schroeder
Community Champion
October 17, 2022

@Pradeep Agrawal If you perform a search through a filter and order it by the created date are you seeing the same list?  It could be that a company managed issue is not in the first 1000.

Pradeep Agrawal
October 17, 2022

I am getting less than a page of results. And I have also confirmed (through other cloud id queries) that my pagination code is correct.

0 votes
Trudy Claspill
Community Champion
October 17, 2022

Hello @Pradeep Agrawal 

Can you provide a link to the documentation you are referencing that tells you how to use the API? Based on my limited work with the Jira API and accessing Jira Cloud that URL doesn't look correct at all, starting with your own Jira Cloud URL should be where you have "api.atlassian.com".

Like I said, though, my experience with the API is limited, so you may be using it in a way that I have not. Seeing your reference document will help us advise you in the context of those reference materials.

Pradeep Agrawal
October 17, 2022

Suggest an answer

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

Atlassian Community Events