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
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.
@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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.