I have REST URL as below using in ServiceNow doing "get" it is working fine, but I also want to get the records that are updated in last 1hr.
Please suggest how can I do that
I tried like this as your mentioned above, still not able to retrieve records
getting an error invalid query
https://jira.abc.com/rest/api/2/search?jql=project =REC and updated >-1h
Please let me know if I'm doing anything wrong here
I'm guessing your query is not valid due to a problem something like a shell expansion (because '>' is a control character in shell) OR you are not authenticating in the request and so it cannot find the project.
Works fine for me without html char encryption if I paste the query in browser, so it makes me think that likely it's stemming from your client that you're sending the request from.
Do you have an option to wrap the URL parameter? Or you could try the POST format and provide the jql query as body.
Just to clarify what I mean is that if I use the raw jql, it will work OK in the browser, but if I were to send this with cURL, and the URL is not wrapped in single quotes '', then it will fail and try to redirect the output to a file "-1h". Something like this I think.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event