Forums

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

Return info for a filter in REST API

bruno.teruel
January 20, 2025

I have a filter with a JQL query that brings information such as execution date, creation date, project and some other information.

I created a Python module to execute a request in the API to execute this filter and capture information from the API.

In the filter I limited a date so as not to bring too much data, but even bringing a maximum of 10 items, none of the items correspond to the filter performed in the application.

In other words, my query in the API does not correspond to the query in JIRA.

1 answer

0 votes
Trudy Claspill
Community Champion
January 20, 2025

Hello @bruno.teruel 

Welcome to the Atlassian community.

Can you show us the JQL you use?

Can you show us the API you are calling and share the payload with us?

What results do you get from the query in Jira vs. the info returned by the API call?

bruno.teruel
January 21, 2025
JQL = project = ISSM AND issuetype = Change AND resolution != Canceled AND "Planned start date[Time stamp]" >= "2025/01/21"
The path used to make the request was: search? + JQL


Comparing the two screens, the web screen returned only 2 results, but the REST API returned 3896032 ISSUES.

 

8e301941-ac2e-48c7-af3f-43062503edc7.png648d99c5-4481-4295-bc5f-3fff30e711dc.png

Trudy Claspill
Community Champion
January 21, 2025

What browser are you executing that in?

So far I have not been able to get a comparable discrepant result using Chrome Incognito.

bruno.teruel
January 22, 2025

Google Chrome.

The problem is that I am searching for information via REST API and the two JQL results that were demarcated by date do not appear.

Trudy Claspill
Community Champion
January 22, 2025

I understand the problem.

I think I have now reproduced it.

How did you construct the URL that you are using? Specifically, how did you insert the text for the JQL statement?

I created a search in the View All Issues page. I then modified the URL on that page to replace /issues/?jql= with /rest/api/2/search?jql=

I notice in your command you are missing the jql= portion. If I leave that out then I get similar results to what you get.

 

You should also note that endpoint has been deprecated according to the documentation.

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-search/#api-rest-api-2-search-get

You should instead use the new endpoint:

https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-search/#api-rest-api-2-search-jql-get

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events