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

API access not working for one project

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

0 votes
Answer accepted

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.

0 votes
Adrian Atlassian Team Jan 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.  

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
TAGS

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