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

How to get possible options for a custom "label" field via the REST API (v2 or v3)?

Julian Götze January 27, 2025 edited

 

Setup:

I created a custom field with "Labels" via the Jira UI:

Screenshot 2025-01-27 at 14.26.00.png

Motivation:

I want to access all available options for this label from within a forge app, using the Rest API v2/ v3 (to create a custom issue-creation dialog in our application). 

Problem:

- First, I call

/rest/api/3/issue/createmeta/${projectIdOrKey}/issuetypes/${issueTypeId}

to obtain the create-issue metadata (containing the customField)

 

- In the response, the custom field yields the

 autoCompleteUrl:"https://api.atlassian.com/ex/jira/.../rest/api/1.0/labels/suggest?"

- But when trying to call this endpoint from my forge-app, I always get a

{ code: 401, message: 'Unauthorized; scope does not match' }

 

Question (or what I've tried so far):

Is there a v2/v3 equivalent for "https://api.atlassian.com/ex/jira/.../rest/api/1.0/labels/suggest"?

I've tried:

- `/rest/api/3/label` -> only yields the system-labels

- `/rest/api/3/field/{fieldId}/context/{contextId}/option` -> yields:  errorMessages: [ "The custom field doesn't support options." ])

 

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 27, 2025

Hi @Julian Götze -- Welcome to the Atlassian Community!

You may want to also ask this question in the developer community: https://community.developer.atlassian.com/

Kind regards,
Bill

Julian Götze January 28, 2025

Ah, oops, thanks @Bill Sheboy!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
atlassian, ace, atlassian community event, donation, girls who code, women in tech, malala fund, plan international, kudos, community badge, badge, atlassian badge, International Women’s month, International Women’s Day, women's month, women's day

10 for Change at Atlassian Community Events

Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!

Join an Atlassian Community Event!
AUG Leaders

Upcoming Jira Events