Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

特定のアセットのローカル参照の一覧をJSONとしてエクスポートする方法

Avatar

Employee

【目的】

アセットの「プロパティ」を開き、「参照」を選択するとアセットの参照元のページ(ローカル参照)を一覧できます。

AEM外部でこの情報を使用したい場合などには、JSON形式でエクスポートして使用することができます。

AdobeIshiguro_0-1650864507464.png

 

【環境】

AEM as a Cloud Service、AEM 6.5

 

【対応方法】

次のURL[1]にアクセスするとJSON形式で結果が取得できます。

出力結果に含まれるpathの値から参照元のコンテンツパスが確認できます。

 

[1] http://localhost:4502/bin/wcm/references.json?path=<対象のアセットへのパス>

  

使用例:

http://localhost:4502/bin/wcm/references.json?path=/content/dam/wknd/en/activities/hiking/equipment_...

  

JSON出力例:

 

{
    pages: 
        [
            {
                srcPath: "/content/dam/wknd/en/activities/hiking/equipment_6.jpg",
                srcTitle: "equipment_6.jpg",
                path: "/content/wknd/language-masters/en/adventures/riverside-camping-australia",
                title: "Riverside Camping",
                references: 
                    [
                        "/content/wknd/language-masters/en/adventures/riverside-camping-australia/jcr:content/root/container/container/tabs/item_1570890147607/par0/image/fileReference"
                    ],
                    published: false,
                    isPage: "true"
            },
            {
                srcPath: "/content/dam/wknd/en/activities/hiking/equipment_6.jpg",
                srcTitle: "equipment_6.jpg",
                path: "/content/wknd/ca/en/adventures/riverside-camping-australia",
                title: "Riverside Camping",
                references: 
                    [
                        "/content/wknd/ca/en/adventures/riverside-camping-australia/jcr:content/root/container/container/tabs/item_1570890147607/par0/image/fileReference"
                    ],
                    published: false,
                    isPage: "true"
            },
            {
                srcPath: "/content/dam/wknd/en/activities/hiking/equipment_6.jpg",
                srcTitle: "equipment_6.jpg",
                path: "/content/wknd/us/en/adventures/riverside-camping-australia",
                title: "Riverside Camping",
                references: 
                    [
                        "/content/wknd/us/en/adventures/riverside-camping-australia/jcr:content/root/container/container/tabs/item_1570890147607/par0/image/fileReference"
                    ],
                published: false,
                isPage: "true"
            }
        ]
} 

 

<留意事項>
・上記は以下記事の抄訳/翻訳となります。
KB記事タイトル(英語). How to export Local References of an asset in JSON format, April 25, 2022, https://experienceleague.adobe.com/docs/experience-cloud-kcs/kbarticles/KA-19249.html, (参照 2022-04-25).
本記事にいただいたコメントへの返信はお約束できません。あらかじめご了承ください。

0 Replies