I am experiencing issues with the Jira API where I am getting empty result sets, but with no errors (200 OK). I even regenerated the API token to no avail. I am a project admin to my project, but when I call my permissions for browsing projects, I get the following:
Hello @dmiranda
The response from the REST API is most like just telling you the truth.
Just because you are the Administrator of a Project(s) (you have access to the Project(s) Settings to manage workflows, components, versions, roles, etc.) does not automatically mean you also have permission to view (browse) and / or edit what's inside that Project(s) (the Work Items, the Boards, the backlog, etc etc). The two roles / permissions are intentionally separate and you are probably just observing the expected behaviour.
I recommend that you spend some time reading the related documentation, such as:
As @Trudy Claspill has said, you need to advise which specific API endpoint you used and what the actual request was and any parameters you used. You might have confused getting your Global BROWSE_PROJECTS permissions versus getting a Project specific BROWSE_PROJECTS permission.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @dmiranda
Welcome to the Atlassian community.
What endpoint are you calling? What parameters/payload are you providing tto the endpoint?
Can you provide links to any documents you used for reference?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
/rest/api/3/project this endpoint is also giving empty result
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What data are you supplying with the API call?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
get request /rest/api/3/project
with authorization using basic auth nothing else
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Based on the documentation you need to provide a project key or id.
If you don't provide a project key or id then the API will return no results because it doesn't know what project you want to get data for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried both https://[domain].atlassian.net/rest/api/3/project and https://[domain].atlassian.net/rest/api/3/project/search, but both returned empty results. I'm just trying to list all projects that I have visibility to before trying other things. My Jira admin confirmed that I have project admin role to my project but you can see from my original post that I don't even have BROWSE_PROJECTS permission. I already tried regenerating my API token.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @dmiranda
Thank you for the additional clarification about what you are trying to do.
If you are in the Jira UI and you go to
https://[yourDomain].atlassian.net/jira/projects?page=1&sortKey=name&sortOrder=ASC
...do you see a list of projects?
If you go to a new tab in the same browser and plug in the URL
https://[yourDomain].atlassian.net/rest/api/3/project/search
...do you get output?
If the answer is yes in both cases then that suggests there is something wrong with the authentication/token in your API call. The API can be executed anonymously, so if the authentication does not match up to an actual user the results set will be the projects that can be accessed anonymously.
Can you show us how you are providing your authentication information with the API call? Change the content so that we don't see you personal token or email.
How are you executing the API call? Are you using curl, or including it in a script of some sort?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't get any output on either call. I am using Postman. My system admin is getting results from Postman using the same call. As a project admin, I can't even browse my own project/space.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The ability to see a project is determined by the Permissions configuration for the project. Being assigned to the Administrator role does not automatically give you permission to browse the content of the project.
Do you know the project key for the project for which you are an admin?
With that it may be possible for you to see the project settings and examine the Permissions configuration for the project.
Or you can work with the person who has Jira App Admin access to examine that configuration and get you assigned to a role or user groups that does have the Browse Projects permission or get the Permission configuration changed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My admin sent me a screenshot confirming I have browse projects permission. It says:
Project Permissions
Permission
Browse Projects
Ability to browse projects and the issues within them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That text does not provide us with confirmation that you have the Browse Projects permission.
Your admin could use the Admin Permissions Helper to generate a screen image confirming that you have that permission. This would be an example of confirmation:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.