Skip to main content
Level 4
Apr 18, 2023 11:25 AM UTC

Curl command for listing nodes

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

2 replies

krishna_sai
Community Advisor
Community Advisor
Apr 20, 2023 2:58 PM UTC

Hi @tom_fought ,
Not sure exactly with your requirement when you said list of nodes and its children.
curl -u admin:admin --location --request POST 'http://localhost:4502/bin/querybuilder.json?p.limit=-1&path=%2fapps%2fweretail%2fcomponents%2fcontent'

you can change the path parameter as per your need.

Hope this helps,
Krishna

Translate
daniel-strmecki
Adobe Champion, Community Advisor, UG Leader
Adobe Champion, Community Advisor, UG Leader
Jan 10, 2025 10:22 PM UTC

Hi @tom_fought,

the OOTB JSON API will return you all the sub-nodes:

curl http://localhost:4503/content/my-site/com/en.infinity.json

 Given that the infinity selector is enabled in an environment.

 

Good luck,

Daniel

Translate