How to export Local References of an asset in JSON format

In this document, you will learn how to export the Local References of an asset in JSON format in Adobe Experience Manager.

Description description

Environment

  • Adobe Experience Manager as a Cloud Service

  • Adobe Experience Manager 6.5

Issue/Symptoms

You can see Local References of an asset on the References tab of Properties. (In Assets Console, select an asset, select Properties from the toolbar, and then select References tab.) When you use the information outside AEM, you can export them in JSON format.

Resolution resolution

Accessing the following URL*[ 1]* returns Local References in JSON format. The  path values in the response are the content paths referencing a target asset.

[ 1] http://localhost:4502/bin/wcm/references.json?path=< path to target asset>

Example usage:

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

Example JSON response:

{    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"            }        ] }
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f