Been to the curl example pages, but haven't found what I am looking for.
I want a curl command that will list all the nodes and child nodes under a specific node.
Anyone know of a curl command like this?
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Tried below curl command to get all the child pages under '/content/wknd/ca/en' . Hopefully you may modify the same depending on your need .
curl -u admin:admin --location --request POST 'http://localhost:4502/bin/querybuilder.json?type=cq:Page&path=/content/wknd/ca/en&path.flat=true&p.l...'
Query builder cheat sheet :- https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md
Thanks,
Somen
Hi @Tom_Fought
I don't think so there is dedicated API to list nodes except infinity.json API
you can use infinity.json if that works in your case.
Hi,
Tried below curl command to get all the child pages under '/content/wknd/ca/en' . Hopefully you may modify the same depending on your need .
curl -u admin:admin --location --request POST 'http://localhost:4502/bin/querybuilder.json?type=cq:Page&path=/content/wknd/ca/en&path.flat=true&p.l...'
Query builder cheat sheet :- https://github.com/paulrohrbeck/aem-links/blob/master/querybuilder_cheatsheet.md
Thanks,
Somen
Query builder will help to search for any specific node type but if you want to list all nodes then pagepath.infinity.json is one option. Alternatively, if you wan to narrow down the results with specific levels then you can also try with pagepath.<0-n>.json
Example:
http://localhost:4502/content/we-retail/us/en/experience.infinity.json - This results entire json with all the nodes details.
http://localhost:4502//content/we-retail/us/en/experience.1.json - this results only one level of node info. So, you can replace the number if you know the depths or nodes.
Views
Likes
Replies
Views
Likes
Replies