1

I'm using Jira atlassian rest API to pull the issue details updated/created between date range using Python requests. But it seems not working.

Say for example, I wanted to extract the issue's which has been updated/created between 1st Jan 2018 to 31st Dec 2018 I have tried below API with JQL search. However that returns all the issue's created/updated since 1st Jan 2018 to till date and not limited to 31st Dec 2018.

Can someone help me to achieve the desired result please. Thanks.

Sample API

https://xxx-abc.atlassian.net/rest/api/3/search/?jql=updatedDate>=2018-01-01&updatedDate<=2018-12-31

1 Answer 1

1

I see two main problems with your REST API call:

  1. You do not escape some special characters (=, /, etc.), which are not allowing in URLs.
  2. You (possibly) provide the date in the wrong format. Not sure about this, might be correct, depending on your settings.

Generally most of the time it is a good idea to develop the JQL query within Jira itself, to see if it is working correctly. Jira helps to write JQL queries, as it validates them before actually performing the query.

So I tried to resemble you JQL on my Jira instance, where the following was working:

updatedDate >= "2018/01/01" and updatedDate <= "2018/12/31"

After running this query, you will see the URL translation of the request in the URL window of your browser. With the JQL query from the URL contains following snippet regarding the JQL statement:

?jql=updatedDate >%3D "2018%2F01%2F01" and updatedDate <%3D%20 "2018%2F12%2F31"
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks @AnsFourtyTwo.. this worked using "and" instead of & in between the dates. However the quotes and date format is not an issue I guess.. I have tried with following format and that has provided the desired result.. rest/api/3/search/?jql=updatedDate>=2015-01-01 and updatedDate<=2015-12-31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.