Custom field name in the API and webhook payload

Inna S August 7, 2022

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

0 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 7, 2022

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.

Inna S August 7, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 8, 2022

Thank you.

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

Inna S August 9, 2022

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
AUG Leaders

Atlassian Community Events