Content fragment / Asset API / JSON : Integration working in Author but not in Publish | Community
Skip to main content
Level 2
December 6, 2024
Solved

Content fragment / Asset API / JSON : Integration working in Author but not in Publish

  • December 6, 2024
  • 2 replies
  • 496 views

I am working on React component to integrate the data from AEM content fragment. In React code I using the asset api to read the content json and populate in UI. asset api JSON response is working fine in author environemnt, but when I publish the page to my dev environment it is not working. I have published botth content frammen and UI components. 

The example in publish dev environment refereing like  "https://xyz-dev.mydomain.com/api/assets/mydomain/en/office/data/2024/subfolder/mkx.json"

the author enviornment refereing like below

https://author-pxxxxx-exxxxx.adobeaemcloud.com/api/assets/mydomain/en/office/data/2024/subfolder/mkx.json

 

Could you please provide some insights?

Best answer by PRATHYUSHA_VP

Hi @cxasha 

 

Did you check directly in publish environment or accessing via dispatcher URL ?

 

If accessing via dispatcher, please try to include this in the filter config file to check if that works ! 

 

/0001 { /type "allow" /path "/api/assets/{cf_folder_structure}/*" /extension "json" }

If accessing directly in publish environment, please check if any error in logs

 

Hope this helps

 

Thanks 

2 replies

PRATHYUSHA_VP
Community Advisor
PRATHYUSHA_VPCommunity AdvisorAccepted solution
Community Advisor
December 6, 2024

Hi @cxasha 

 

Did you check directly in publish environment or accessing via dispatcher URL ?

 

If accessing via dispatcher, please try to include this in the filter config file to check if that works ! 

 

/0001 { /type "allow" /path "/api/assets/{cf_folder_structure}/*" /extension "json" }

If accessing directly in publish environment, please check if any error in logs

 

Hope this helps

 

Thanks 

kautuk_sahni
Community Manager
Community Manager
January 27, 2025

@cxasha Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni