Expand my Community achievements bar.

SOLVED

Expose content fragment from AEM publish environment

Avatar

Level 9

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

 

1 Accepted Solution

Avatar

Correct answer by
Level 5

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 5

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

Avatar

Level 7

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.