cURL command to fetch AEM data between two specific dates | Community
Skip to main content
Level 2
February 15, 2022
Solved

cURL command to fetch AEM data between two specific dates

  • February 15, 2022
  • 1 reply
  • 1109 views

Hi Team,

I want to write a curl command to fetch data from AEM between two specific dates. 

 

Would be very helpful if i can get the command for the same.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Kishore_Kumar_
Level 9
February 15, 2022

Hi @arindam15 ,

 

Try with Querybuilder to get the results, http://localhost:4502/libs/cq/search/content/querydebug.html  , 

 

path=/content/wknd
type=cq:Page
daterange.property=jcr:created
daterange.lowerBound=2022-01-30
daterange.upperBound:2022-02-02
p.limit=-1

Then use the query result json with Curl

 

curl -u admin:admin GET "http://localhost:4502/libs/cq/search/content/querydebug.html?_charset_=UTF-8&query=path%3D%2Fcontent%2Fwknd%0D%0Atype%3Dcq%3APage%0D%0Adaterange.property%3Djcr%3Acreated%0D%0Adaterange.lowerBound%3D2022-01-30%0D%0Adaterange.upperBound%3A2022-02-02%0D%0Ap.limit%3D-1"
Arindam15Author
Level 2
February 15, 2022

its showing that, -bash: daterange.property=jcr%3acreated: command not found

-bash: daterange.upperBound=2021-05-01T00%3a00%3a00Z: command not found

 

Please help me out.