API access not working for one project

John Jurisoo January 22, 2020

Using both the web and REST API, I am able to access almost all projects on my test server as an authenticated user without issue.  The log shows that basic authentication is working for my API testing.

I imported one project using the Project Configurator add-in.  This project is accessible from the web, but the API acts like I have no ability to access it, even as a system admin.  If I request a project list, I can see that it exists, but any request that involves data on the project returns nothing without any errors returned or in the logs.

For Example:

http://MyServer/rest/api/2/issue/createmeta?projectKeys=MYPROJ

returns

{"expand":"projects","projects":[]}

Done anyone have any suggestions on what needs to be changed to access this project via the API?

2 answers

1 accepted

1 vote
Answer accepted
John Jurisoo January 22, 2020

As it turns out, the admins of the source server that the project was exported from deleted or renamed the default Jira Roles.  This caused a permission issue in the test server.  They have a very complicated Jira configuration.

This doesn't explain why web access worked, but does explain why the API didn't  Since several permissions for accessing projects and issues were not granted, I never should have been able to access the project from the web.

Cyber BBH February 16, 2023

Great find by you- a similar scenario happened to us and it turned out to be altered permission scheme that prevented API access.

0 votes
Adrian Stephen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 22, 2020

Hi @John Jurisoo , 

 

Did you login to Jira first before executing that rest endpoint. I was able to reproduce it two ways:

  • If I'm not logged in
  • If the project doesn't exist or if the project key is wrong. 

 

If I am logged in and the project key is correct, it will return the data.  

John Jurisoo January 22, 2020

As I said, the logs show the correct users are properly authenticated, and the project key correctly matches the key returned by:

http://myserver/rest/api/2/project

I am also able to access other protected projects, which require authentication.  I am currently using Curl to test this, but I have used both the Python and C# Jira APIs with similar results.

Suggest an answer

Log in or Sign up to answer