how to get created and updated issues last one hour in jira using rest api

Nageswara Rao Koppisetti February 23, 2018

Hi All,

I am new for using jira rest apis. Could you please anyone suggest me how to get created and updated  issues for last one hour in jira using rest api.

 

Regards,

Nageswara K.

3 answers

1 vote
Adrián Plaza [DEISER]
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.
February 23, 2018

Hi,

You can find the complete JIRA REST API specification here.


I think this can help you to solve your question:

/rest/api/2/search?jql=created>=-1h%20OR%20updated>=-1h

 

You need to add you JIRA URL before for example:  https://jira.atlassian.com/rest/api/2/search?jql=created%3E=-1h%20OR%20updated%3E=-1h

Best regards,
Adrián.

Nageswara Rao Koppisetti February 25, 2018

Adrián Plaza,

 

I  have tried your suggestion.I am not getting response.could you please post some rest sample response for this particular rest api which you suggested above that should be great.

 

Thank you..

Nageswara K.

Adrián Plaza [DEISER]
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.
February 25, 2018

Hi Nageswara Rao Koppisetti,

 

Of course, this is an example of my local JIRA instance do this call:

http://localhost:8080/jira/rest/api/2/search?jql=created%3E=-1h%20OR%20updated%3E=-1h

 I use Firefox to view the result that has a plugin to view JSON formatted:

Screenshot_3.png

Best regards,

Adrián.

0 votes
Nageswara Rao Koppisetti February 26, 2018

Hi Adrián Plaza,

I am consuming below  jira rest service using java.I am not able to getting response.i am getting response code as 400.

https://itc-cloudio.atlassian.net/rest/api/2/search?jql=created>=-1h OR updated>=-1h

The same service which i am testing postman getting response successfully.

Could you please suggest below

Can i use JQL in java consuming side?

Adrián Plaza [DEISER]
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.
February 26, 2018

Hi Nageswara Rao Koppisetti,

 

In your cloud instance, I did the call without authenticating and this is the result:

https://itc-cloudio.atlassian.net/rest/api/2/search?jql=created%3E=-1h%20OR%20updated%3E=-1h

 Screenshot_3.png

In the navigator side works fine, then the problem is the java side, you scape the string correctly?

 

Regards,
Adrián.

Sachit Sharma September 3, 2021

Hi 
Is there any way/parameter we can get worklogs and users info who have added those worklogs.
It would be very helpful.

Thanks

0 votes
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.
February 23, 2018

So here is some documentation for the API https://developer.atlassian.com/cloud/jira/software/rest/#api-board-boardId-issue-get and you can pass in some JQL as a parameter

/rest/agile/1.0/board/{boardId}/issue?jql=

I wasn't sure if this would answer your question, or if you actually wanted a sample of JQL, but this is a start

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events