Why is Jira API returning an empty project list despite created projects? Description

Vishnudas v
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 19, 2024

 

 I am making an API call to retrieve the list of projects from my Jira account using the following endpoint:

URL: {{protocol}}://{{host}}/rest/api/3/project

I have replaced {{protocol}}, {{host}}, and provided the correct hostname, username, and apiToken.

Steps I have taken:
1. Created test projects in my Jira account.
2. Verified the authentication details (username and API token).
3. Made the GET request, which returns a 200 response but with an empty list ([]).

Here is the response I receive:

[]

Questions: -

Why is the API not returning the list of projects I have created?

Are there any specific permissions or configurations required to access the project list? 

Is there any additional parameter or scope I need to include in the API request?

Additional Notes:

I confirmed the projects exist and are visible in the Jira web interface.

Any guidance or troubleshooting steps would be appreciated!

2 answers

0 votes
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2024

Hi @Vishnudas v 

I'm assuming you're using a tool like postman to run this request. To verify if your URL is being built correctly I would suggestion checking the "Code" view, this gives the complete built URL that will be executed.

image.png

If this shows the correct URL, would suggest trying the other API endpoint that Trudy suggested, if that gives you a similar empty response, it maybe that your Basic Auth is not be correctly setup.

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2024

Hello @Vishnudas v 

Welcome to the Atlassian community.

That end point is deprecated. I suggest you try this alternate endpoint instead:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-search-get

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