Expose content fragment from AEM publish environment | Community
Skip to main content
Level 7
January 23, 2025
Solved

Expose content fragment from AEM publish environment

  • January 23, 2025
  • 2 replies
  • 544 views

Hello Team,

 

I am able to access the CF data without logging in.

http://localhost:4503/api/assets/content-fragments/abc/mycf.json

 

But, wanted to check, how can I get the CF data from dev, stage, prod publish environment? What are all the steps I need to follow to enable content fragment access from 3rd party application. In my case, this is from Adobe IO runtime project

 

cc @shashi_mulugu  @aanchal-sikka  @arunpatidar 

Thanks

 

Best answer by SreenivasBr

If the dispatcher for those lower environments are public facing, you can use the dispatcher to access the json.

2 replies

SreenivasBr
SreenivasBrAccepted solution
Level 4
January 23, 2025

If the dispatcher for those lower environments are public facing, you can use the dispatcher to access the json.

AmitVishwakarma
Community Advisor
Community Advisor
January 24, 2025

To expose Content Fragments (CF) from AEM's publish environment to an external application (like Adobe IO Runtime), follow these steps:

1. Enable API Access: Ensure that the Content Fragment API is accessible in your AEM publish environment (e.g., http://<publish_host>/api/assets/content-fragments/abc/mycf.json).
2. Authentication: Use OAuth 2.0 or Basic Authentication for secure API access. Set up OAuth credentials in Adobe I/O Console and configure AEM to accept those credentials.
3. CORS Configuration: Allow cross-origin requests from the external app by configuring CORS settings in AEM.
4. Use Environment URLs: Ensure the external app is configured with the correct publish environment URLs (dev, stage, prod).
5. Test and Monitor: Test API access from the external app and monitor AEM logs for any issues.