I'm using the JIRA REST API as part of a microservice. I want to be able to pull stories from a board that share a certain label and return them as a list. I can find issues by number, but the returned value doesn't have label data, and I can't find anything that mentions labels in the API.
I found this question, which has an answer, but I can't resolve the link and don't have the REST API browser (which I assume is what the link is for).
My service is running Node.js with the npm jira-client package.
Hey Stanislav,
Searching by label (code below assumes the label you want is "labelname" - change accordingly, you can use https://jira.company.com/rest/api/2/search?jql=labels%20IN%20(%22labelname%22)
The below is returning the labels for a jira issue PROJECTKEY-123 (if you remove the fields=labels, you get all the fields but it takes a bit longer
https://jira.company.com/rest/api/2/issue/PROJECTKEY-123?fields=labels
Tested on Jira server 7.6.2
Hopefully this helps, but if not, let us know
CCM
Thank you, Craig!
That's definitely steering me in the right direction. I neglected to mention that I'm trying to do this programatically from my service in javascript using the npm jira-client package.
I did find this, which I think might be more along the lines of what I'm looking for, if it works the way I think it will. I'll report back.
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.