Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

using the Jira API to list all projects

I am having a little trouble with something that I think should be quite simple. I've created an OAuth2 (3LO) app for Jira (on Atlassian Cloud) and have successfully connected to it with my app (i.e.: got the token and I can call the API).

I call the API to get the correct "cloudId" as the documentation states.

The user that I am authenticating with when connecting via OAuth2 is an Administrator for the Jira project that I am trying to query.

When I use this endpoint:


I get a response, but an empty one (i.e.: no projects listed):

> {"jira":{"self":"[my-cloud-id]/rest/api/3/project/search?maxResults=50&startAt=0","maxResults":50,"startAt":0,"total":0,"isLast":true,"values":[]}}

The documentation states, as I understand it, that I should get a list of any project that the logged in user has "browse" or "administration" permissions for. My user has both.

Has anyone had a similar trouble?

Thanks in advance,


Edit: searching by a specific project key works.


So I therefore no longer think that this is a permissions issue.

The URL:


Still returns an empty list of projects. I wonder if I am missing some kind of important parameter on this call?

2 answers

Hi @benji78  -- Welcome to the Atlassian Community!

I just tried getAllProjects and it worked for me:

Best regards,


Hi @Bill Sheboy thanks for your reply.

I had not seen this documentation before, so thank you for the reference. However, is seems that this API is authenticated via OAuth 1.0a or HTTP Basic Auth? I am attempting to support OAuth 2.0.

When I call the endpoint that you cite I get all public repositories, rather then private ones that I have access to. This implies to me that the API is not using my access token to authenticate.

I also note that the API root is different. In the API that you reference it is `` but in the OAuth2 API it is `` with the latter requiring the "cloud ID" to be present in the URL.

Using the OAuth2 API here are my results:








And the same responses from the version 3 URLs.

It seems suspicious to me that specifying `TESTJ` at the end of the URL renders a result, but leaving this out does not return all projects...




Oops! This is my fault. Thank you @Bill Sheboy for the answer and indeed you are correct that the endpoint works.

I simply had the required HTTP header set to:


> token <token>


Instead of:


> Bearer <token>


So muppetry on my part, but perhaps this will help someone else one day!

Hi @benji78 

I am glad that worked for you.  To help others find the solution faster, please consider marking this question as answered.  Thanks!


Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,139 views 8 28
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you