Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

How to get list of all Jira server fields (system and custom) via REST-API

Use curl in a Linux Bash script:



curl -k -u ${admin_user}:${admin_password} -X GET -H "Accept: application/json" ${jira_server}${url_part2} \
| jq '.' > raw_file.json

# Extract field names, remove double quotes, sort

cat raw_file.json | jq '.[].name' | sed 's/"//g' | sort > nice_file.txt


Note: There is a separate REST-API to get only custom fields, but it's not working for me at this time. I will update once I find a solution.


1. The REST-API for Jira Server does not support getting only the custom fields.

Your recourse is to check the "id" key in the JSON (the file raw_file.json). If the value is "customfield_nnnnn", it's a custom field. Or, even simpler, you can check the key "custom" which is "true" for custom fields.

2. When you view the fields in the Jira UI

there may be fields which are marked Not configured for any context under the Available context(s) column.

I've found out that the REST-API call does not retrieve these fields.

1 comment

Suddha Atlassian Team Sep 29, 2020

Recently came across this requirement and taking hint from this script, was able to extract just the custom fields:

Hope that helps:

# small script to CSV export Custom Fields
# Author: Mr. Doubt Everyhim
# Date: 2020-09-22

# Get all the fields:
curl -k -u ${admin_user}:${admin_password} -X GET -H "Accept: application/json" ${jira_server}${url_part2} \
 | jq '.' > raw_file.json
# Create to_entries:
cat raw_file.json| jq 'to_entries' > raw_key_entry.json
# Extract keys:
cat raw_key_entry.json | grep -B2 customfield_ | grep key | awk '{print $2}' | sed 's/,//g' > key_entries.txt 
# Extract ID, Name, Field Types:
for i in $(cat key_entries.txt); do
  cat raw_file.json | jq -r "[.[$i].id, .[$i].name, .[$i].schema.custom] |@csv" >> CF_details.csv
echo "Results are printed in: ./CF_details.csv"
Like Amir Katz _Outseer_ likes this


Log in or Sign up to comment
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

637 views 16 18
Read article

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