Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA API 2.0 - Unable to Find All Issue Fields

Tom Oakes February 10, 2024

Hello, 

I'm having a problem with the API endpoint "rest/api/2/field", in that I'm not returning all fields.   The call itself is a success, but we're only getting 66 fields, when in reality there are many many more.    The call returns a mix of custom and system fields (36 system, 30 custom), and each subset is missing many.  

We are self-hosted, I'm using basic auth, and my account is a Jira Admin.   We are otherwise pretty successful using the API, but this call is just not returning everything I'm expecting. 


Any ideas on what I might try? 

 

Thank you.

Tom Oakes

3 answers

2 accepted

1 vote
Answer accepted
Tom Oakes February 11, 2024

Update!  I got it figured out.  My assumption that administrative accounts are automatically granted project-level permissions (such as Browse) was erroneous.   This account was not part of our base "Users" group, and therefore didn't have access to Browse the project in question, and therefore was not seeing fields that were *only* associated with that project.   The fields this account could see were associated with other projects, to which it had browse perms. 

 

Thanks for helping me talk through this.

 

Vikrant Yadav
Community Champion
February 11, 2024

@Tom Oakes  Yes, correct. If Admin is not having Browse issue permission in a project, then even after having Jira admin permission, you can't see those project issues. 

Glad to hear you are able to fix this out :)

 

0 votes
Answer accepted
Vikrant Yadav
Community Champion
February 11, 2024

Hi @Tom Oakes ,

Welcome to Atlassian Community!

 

Try to run API call on a browser in which you are logged in as Jira admin. For eg : https://jira.abc.com/rest/api/2/field 
Check is it giving complete list of jira fields ?

 

Thanks,

V.Y

Tom Oakes February 11, 2024

Thanks for your reply Vikrant! 


I've since discovered that this does appear to be related to authentication.   We're using a dedicated service account (named JiraAPISvc) to run the API.   That account is an admin in Jira.  When I log in with that account and navigate to the endpoint URL (/rest/api/2/field ), I get the same abbreviated list of 66 fields.   When logged in with this account, I can navigate around in Admin settings, and my view of custom fields is complete.   I can find the field I'm looking for, modify it, etc.   This account is indeed an admin.   It is assigned to admin roles for all the projects, etc.

 

However - when I change the auth account to my own (which is also an admin account), I return all of the fields via the API.   My new challenge is locating the difference between these two accounts in terms of authorization.    They appear to be identically configured.  Any ideas on what I might look at to locate the delta between accounts?

Thank you.

 

Like Vikrant Yadav likes this
0 votes
Pascal Champagne
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!
March 25, 2025

Hi,

For the endpoint in question, the doc says Returns a list of all fields, both System and Custom.

I did the test logged in with my admin and system-admin account to GET https://jira.abc.com/rest/api/2/field and it does not return all fields.

How would the permissions in a given project affect the list of existing fields on the instance?  When I go in the admin section I see the fields that are missing from the call to  https://jira.abc.com/rest/api/2/field using the same user in both scenarios.

Suggest an answer

Log in or Sign up to answer