コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Curl command to list nodes

Avatar

Level 4

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

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

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

元の投稿で解決策を見る

3 返信

Avatar

Community Advisor

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.

Arun Patidar

AEM LinksLinkedIn

Avatar

正解者
Community Advisor

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

Avatar

Community Advisor

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.