Forums

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

Any JSON version of "rest/api/1.0/labels/suggest?customFieldId=xxxxx"

WeiKee Yong November 26, 2020

Hi, 

I have 2 question on getting Labels data 

1. Currently I am using this below rest to get the labels data from my custom field, It return in xml, any JSON version of the REST ?

 - https://<site>.atlassian.net/rest/api/1.0/labels/suggest?customFieldId=10037&query=

 

2. Is there any max return for this method "rest/api/1.0/labels/suggest?customFieldId=..." ? 

 

Thanks in advance. 

2 answers

1 accepted

2 votes
Answer accepted
Muhammad Ramzan_Atlassian Certified Master_
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.
November 26, 2020

For your first question , use .json in your query and it will return json data.

 - https://<site>.atlassian.net/rest/api/1.0/labels/suggest.json?customFieldId=10037&query=

WeiKee Yong November 26, 2020

Thanks for your reply. 

Not sure if you can help, i have another question about version 1 API, will it be depreciated and going with newer version? I been using many rest/api/3/.. version, and only this label i can't find it in version 3

Muhammad Ramzan_Atlassian Certified Master_
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.
November 29, 2020

I don't think so, it will be there , don't worry.

Like • WeiKee Yong likes this
Steven Pila August 15, 2023 edited

Hi @WeiKee Yong , I tried using the REST API mentioned for getting suggested labels for custom label fields but for some reason, we get a 403 error message.

Tried calling it via postman (used JWT as authentication) and even AP.request but to no avail.

May we know your setup and how you manage to call the API successfully? or is it still working as of now?

Thanks.

1 vote
Julian Götze January 27, 2025

Having the same issue here..

My custom "Labels" field yields "autocompleteUrl=.../rest/api/1.0/labels/suggest?query=" but I can't use it from within my Forge app.

 

And I'm not able to find any v3 equivalent:

- `/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." ])

 

Is there any way to obtain the allowed values for custom-field labels?

Suggest an answer

Log in or Sign up to answer