Hi
A GET on rest/api/2/search?jql=filter=123 gets me some info but not the actual results. How do I go about getting the actual results?
Your usage of the REST endpoint is wrong. If you have a filter ID, you use this REST endpoint:
https://docs.atlassian.com/jira/REST/latest/#d2e308
This gives you:
"searchUrl": "http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty",
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think what was being asked here, was how would someone execute a filter so that they don't need to manage the query manually. I too would like to know this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you go into a little more detail on this- how can you use the searchUrl from one rest endpoint, to set up another request? Are these all going in the args section of the template function?
I posted a similar follow up question here: https://answers.atlassian.com/questions/41462677
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To clarify the solution above, you are using the filter GET API in order to fetch the definition of the filter as a search url (with embedded JQL), then using that url to fetch the actual filter results from the search API. So your choice is to either embed a filter id in your code, or a JQL statement. If the former, you can at least manage the JQL query within JIRA's interface, and have your code fetch the latest definition of that filter before querying the search API for results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is quite easy, you first have to request the filter: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-filter-id-get
In the JSON answer the search url is build accordingly in the property "searchUrl".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My question:
I am new to JIRA api. Could some one help me with this. I have url : /rest/api/2/search?jql=project%3DIR&fields=id,summary,status,customfield_10112,priority,customfield_10115&filter=summary%20%3D%20XXX%20AND%20status%20%3D%20YYY&startAt=0&maxResults=3000
Here I am trying to display fields: id,summary,status,customfield_10112,priority,customfield_10115.
I am trying to filter tickets on the basis of: filter=priority%20%3D%20XXX%20AND%20status%20%3D%20YYY.
XXX and YYY are the custom field which I will replace on the basis of dropdown selected.
like
XXX="High or Low..."
YYY="In Progress or Open...."
With this I am not getting filter tickets. I am getting all tickets. Can someone help me with this please.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your usage of the REST endpoint is wrong. If you have a filter ID, you use this REST endpoint:
https://docs.atlassian.com/jira/REST/latest/#d2e308
This gives you:
"searchUrl": "http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty",
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.