Forums

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

Pulling the number of search results to a web page

Kane Short
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 13, 2018

Hi There,

I'm a total novice when it comes to API's so I apologise in advance.

 

I am trying to do a search of jira with certain filters (name on ticket, a label and the status). Then I want a numeric value of the number of results.

Also, I want to make this automatically run every half hour on a webpage.

 

I literally have no idea how to do this (even after looking at the documentation).

Any help would be greatly appreciated.

 

Thanks (:

1 answer

1 accepted

1 vote
Answer accepted
Warren
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.
September 13, 2018

Hi Kane

I'll give some advice for the first part, to get you started. An assumption I'll make is that you're on Jira cloud, but it would be very similar for server. The API documentation is here. All API calls take the form https://yourURL.atlassian.net/rest/api/

If you're searching across multiple projects, you would probably use the "search" api, so

https://yourURL.atlassian.net/rest/api/3/search

If you're searching within a project / board, there are more relevant calls in the documentation.

Parameters are passed in with the standard notation of ? for the first one then & for each further one.

For your filters, it's probably

jql=assignee=name AND labels=FE_Dev AND status="In Progress"

so that total call would be

https://yourURL.atlassian.net/rest/api/3/search?jql=assignee=name AND labels=FE_Dev AND status="In Progress"

How you get this to run every half an hour may not be that relevant for this forum, but more for a coding site

Suggest an answer

Log in or Sign up to answer