Is there any way to get labels of issue?
When I sent request to find specific issue by ID, I can not find label in the response.
https://techfides.atlassian.net/rest/api/3/issue/${issueId}/worklog
Hello @David Smejkal ,
Thanks for reaching out to the community and welcome.
Your on the right track looking at the endpoint for the issue "GET /rest/api/3/issue/{issueIdOrKey}" but to get a specific custom field value output you need to expand on the field content as described in the link via:
fields
Array<string>
A list of fields to return for the issue. This parameter accepts a comma-separated list. Use it to retrieve a subset of fields. Allowed values:
*all
Returns all fields.*navigable
Returns navigable fields.- Any issue field, prefixed with a minus to exclude.
Examples:
summary,comment
Returns only the summary and comments fields.-description
Returns all (default) fields except description.*navigable,-comment
Returns all navigable fields except comment.This parameter may be specified multiple times. For example,
fields=field1,field2& fields=field3
.
So if you wanted to get the labels on issue ABC-123 the GET would be:
GET /rest/api/3/issue/ABC-123?fields=labels
Regards,
Earl
Thank you, it helped me a lot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Earl McCutcheon ,
I tried the following end point but response returns status as 404:Although I added 2 labels and it was added successfully and is displayed in my issue.
10403 is my Issue ID.
GET: http://localhost:8080/rest/api/3/issue/10403?fields=labels
Could you please advise.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.