Adobe Experience Manager:使用查詢產生器API列出已發佈的頁面
本文詳細說明在Adobe Experience Manager (AEM)作者執行個體上列出已發佈頁面的步驟。
說明 description
環境
- Adobe Experience Manager as a Cloud Service
- AdobeExperience Manager 6.5
問題/症狀
本文說明如何列出在AEM作者上發佈的頁面。
解決方法 resolution
使用Query Builder API,搜尋具有cq:lastReplicationAction = Activate的頁面。
範例:
查詢
path=/content/wknd
1_property=sling:resourceType
1_property.value=wknd/components/page
2_property=cq:lastReplicationAction
2_property.value=Activate
3_daterange.property=cq:lastReplicated
3_daterange.lowerBound=2019-01-01T00:00:00.000+09:00
3_daterange.lowerOperation=>=
orderby=path
URL
http://localhost:4502/bin/querybuilder.json?1_property=sling%3aresourceType&1_property.value=wknd%2fcomponents%2fpage&2_property=cq%3alastReplicationAction&2_property.value=Activate&3_daterange.lowerBound=2019-01-01T00%3a00%3a00.000%2b09%3a00&3_daterange.lowerOperation=%3e%3d&3_daterange.property=cq%3alastReplicated&orderby=path&path=%2fcontent%2fwknd
結果
{
"success": true,
"results": 8,
"total": 8,
"more": false,
"offset": 0,
"hits": [
{
"path": "/content/wknd/language-masters/en/magazine/arctic-surfing/jcr:content",
"excerpt": "We traveled to Northern Norway to document the joy of surfing in extreme, but breathtakingly beautiful conditions.",
"name": "jcr:content",
"title": "Arctic Surfing",
"lastModified": "2019-10-14 11:08:42",
"created": "2023-04-10 21:56:45"
},
{
"path": "/content/wknd/language-masters/en/magazine/guide-la-skateparks/jcr:content",
"excerpt": "Breaking down the top skate destinations in all of Los Angeles. You don't want to miss this!",
"name": "jcr:content",
"title": "Ultimate Guide to LA Skateparks",
"lastModified": "2020-10-01 09:37:33",
"created": "2023-04-10 21:56:47"
},
...
]
}
對有許多頁面的內容路徑執行查詢可能會造成效能問題。 建議縮小路徑範圍並多次執行查詢,而非嘗試在單一查詢執行中擷取所有資料。
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f