Adobe Experience Manager:Query Builder API を使用した公開済みページのリストアップ

この記事では、Adobe Experience Manager(AEM)オーサーインスタンスで公開されたページをリストする手順について詳しく説明します。

説明 description

環境

  • Adobe Experience Manager as a Cloud Service
  • Adobe Experience 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"
    },
    ...
  ]
}

多数のページを含むコンテンツパスに対してクエリを実行すると、パフォーマンスの問題が発生する場合があります。 1 回のクエリ実行ですべてのデータを取得するのではなく、パスを絞り込んで、クエリを複数回実行することをお勧めします。

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f