Forums

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

REST API for Custom field collection

Sunil Singh May 25, 2020

Which REST API should be hit to get collection of custom fields. preferably, with Name, Id and Type (Project/Issue etc.), what I could get so far is something like this  rest/api/latest/issue/createmeta?expand=projects.issuetypes.fields which gives all projects and their custom fields. but i am looking at some kind of Master API which will give me collection of custom fields. 

1 answer

1 accepted

0 votes
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 28, 2020

Hello @Sunil Singh ,

It looks like you are following the path of looking up the meta-data for creating issues as detailed in this developer documentation:

However, Following the method described above you would want to iterate per the project you wanted to update or add additional field content to

If you are just looking for a list of the fields check out the following endpoint, I think this may do what you are looking for:

Regards,
Earl

Sunil Singh May 28, 2020

thanks it really helped. Just to confirm if to bifurcate fields can i use schema ? where it says project/issues etc. 

Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 3, 2020

Hi @Sunil Singh ,

Thanks for the additional question, I was not fully understanding what you asking initially, and the GET /rest/api/3/field option is going to be a master list of all fields across all projects, but it sound like you are looking more for the master list on a single project.  Let me know if I am still misreading this one or if this is the case.

So, if you want All fields in a single Project you were on the right track with the Use of the REST endpoint call to GET /rest/api/2/issue/createmeta. But also adding in a project key variable to isolate the project before adding in the expand details on the call to the desired project like this:

/rest/api/2/issue/createmeta?projectKeys=EXAMPLE&expand=projects.issuetypes.fields

Regards,
Earl

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events