How to export Local References of an asset in JSON format

Description

You can see Local References of an asset on 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.

Environments

AEM as a Cloud Service, AEM 6.5

Resolution

Accessing the following URL’1’ returns Local References in JSON format. 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"
            }

}

On this page