Curl command for listing nodes | Community
Skip to main content
Level 4
April 18, 2023

Curl command for listing nodes

  • April 18, 2023
  • 2 replies
  • 1294 views

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
April 20, 2023

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

daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 10, 2025

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