Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,366,375
Community Members
 
Community Events
168
Community Groups

Custom field name in the API and webhook payload

Hi, 

We need to use webhooks to perform certain automation, that is not available from the Jira itself. 

So I've just set up an automation that fired the REST POST request towards our processing facility.

Now I found that all the custom fields are represented as 'customfield_10053' or the like.

With tens of the fields we have, it is very much inconvenient to expect the integration developer to remember all the fields by heart.

I saw a suggestion to use the https://<your instance name>.atlassian.net/rest/api/2/issue/<project key>-<sample issue number>?expand=names URL to obtain the JSON with the both human readable and the internal field names.

Is there any better way to get this information?

Like some generic API description, standard in the industry for some 10 years now?

Thank you,

Inna

 

1 answer

Hi @Inna S ,

I would recommend you to use ids instead of names (and add proper comments to your code).

Ids are unique identifiers of your custom fields. There can be more custom fields with the same name, so usage of ids is safer.

Hi @Hana Kučerová , 

in fact I see no way to use the field name anyway, so this is what we have. 

As you can imagine, with tens of the custom fields (we currently have some 75+), it is really inconvenient to work with the data.

And just to make sure, there are systems where the field has a display name, a unique name, human readable, and the internal ID used whenever. 

I'm trying to see if there is any way to have less impediments to the API related work in Jira.

Hana Kučerová Community Leader Aug 08, 2022

Thank you.

I believe you can also use endpoint Get fields , but there are some rules.

Thank you, @Hana Kučerová , I will look into this.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events